Create Bill
Automatically transfer order information to Nhat Tin including details such as dimensions, weight, phone number, and many other information. From there, a delivery order will be created.
API Configuration
HTTP Request
POST /v2/bill/create
No. | Parameter | Type | Require | Description |
---|---|---|---|---|
1 | partner_id | Number | ID of partner. That registration on https://khachhang.ntlogistics.vn/ (opens in a new tab) | |
2 | ref_code | String | Customer's Reference Code - might be Invoice No or Purchase Order No | |
3 | package_no | Number | Number or Packages (Default 1) | |
4 | weight | Double | Estimated Weight of packages measured by client | |
5 | width | Double | Width of Package in Total (Measured in cm,Default 0) | |
6 | length | Double | Length of Package in Total (Measured in cm,Default 0) | |
7 | height | Double | Height of Package in Total (Measured in cm,Default 0) | |
8 | cargo_content | String | Breif description of Package Product Items | |
9 | service_id | Number | Shipping Service Id. Define in Master Data sheet | |
10 | payment_method_id | Number | Payment Method Id. Define in Master Data sheet | |
11 | is_return_doc | int | Return document or invoice (1: Yes, 0: no, Default is 0) | |
12 | cod_amount | Double | Amount of COD to collect when package delivered to receiver | |
13 | note | String | Additional note, delivery instruction of the order | |
14 | cargo_value | Double | Breif value of Package Product Items | |
15 | cargo_type_id | Number | Breif ID of Package Product Items. | |
16 | s_name | String | Fullname of sender | |
17 | s_phone | String | Sender contact phone number | |
18 | s_address | String | Address of sender | |
19 | s_ward_name | String | Ward name of sender | |
20 | s_district_name | String | District of sender | |
21 | s_province_name | String | Province of sender | |
22 | is_return_org | Number | Description of return address. (default is 0) - If set to 1, additional items 23 to 28 are required to be passed - If default is 0, it will be taken from the original address (sender's information). | |
23 | return_name | String | Name of the recipient for return information | |
24 | return_phone | String | Phone number of the return address | |
25 | return_address | String | Return address | |
26 | return_ward_name | String | Name of Ward in the return address | |
27 | return_district_name | String | Name of District / Town / City (not directly under the central government) in the return address | |
28 | return_province_name | String | Name of Province / City in the return address | |
29 | r_name | String | Full name of receiver | |
30 | r_phone | String | Receiver's contact phone number | |
31 | r_address | String | Full address of receiver (e.g., Tổ 5, KP7, 52A Nguyễn Thái Bình) | |
32 | r_ward_name | String | Ward name of receiver | |
33 | r_district_name | String | District of receiver | |
34 | r_province_name | String | Province of receiver | |
35 | r_email | String | Email address of receiver | |
36 | is_draft | Number | "Specifies the draft order. (default is 0) - If set to 1, the order is understood as a draft order - waiting for packaging from the customer. Nhat Tin is not ready to take the order. When the order has been packaged, the customer switches to the waiting for pickup status (status_id=2) - If default is 0, the order is understood to be ready for pickup (order is in the Waiting for pickup status)" | |
38 | other_fee | Number | Additional Fee as agreement with supplier |
JSON body respone
Name | Type | Description |
---|---|---|
success | boolean | Return true if create bill success, all other false means error. See message for further description. |
message | string | Return Message of API Respond. |
data | object | Data of API response. |
Request
{
"partner_id":111111,
"weight":2,
"width":0,
"length":0,
"height":0,
"service_id":90,
"payment_method_id":10,
"cod_amount":0,
"cargo_value":0,
"cargo_type_id":2,
"s_name":"Đồng hồ Galle",
"s_phone":"03xxxxxx",
"s_address":"số 10",
"s_ward_name":"Phường Việt Hưng",
"s_district_name":"Quận Long Biên",
"s_province_name":"Hà Nội",
"r_name":"Đồng hồ ABC",
"r_phone":"08xxxxxx",
"r_address":"123",
"r_ward_name": "Phường 15",
"r_district_name":"Tân Bình",
"r_province_name":"Hồ Chí Minh"
}
Response
{
"success": true,
"data": {
"bill_id": 173647,
"bill_code": "CP17364792",
"ref_code": "",
"status_id": 2,
"cod_amount": 0,
"service_id": 80,
"payment_method": 10,
"created_at": "2023-08-09 08:27:59",
"main_fee": 82000,
"cod_fee": 0,
"insurr_fee": 0,
"lifting_fee": 0,
"remote_fee": 0,
"counting_fee": 0,
"packing_fee": 0,
"total_fee": 82000,
"expected_at": "2023-08-12 09:26:00",
"partner_address_id": 0,
"receiver_name": "Đồng hồ ABC",
"receiver_phone": "08xxxxxxx",
"receiver_address": "123",
"package_no": 1,
"weight": 2,
"cargo_content": " | HÀNG DỄ VỠ 3",
"cargo_value": 0,
"note": ""
},
"message": "Create bill successfully"
}