Create a Bill V2

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.ParameterTypeRequireDescription
1partner_idNumberAlt textID of partner. That registration on https://khachhang.ntlogistics.vn/ (opens in a new tab)
2ref_codeStringCustomer's Reference Code - might be Invoice No or Purchase Order No
3package_noNumberNumber or Packages (Default 1)
4weightDoubleAlt textEstimated Weight of packages measured by client
5widthDoubleWidth of Package in Total (Measured in cm,Default 0)
6lengthDoubleLength of Package in Total (Measured in cm,Default 0)
7heightDoubleHeight of Package in Total (Measured in cm,Default 0)
8cargo_contentStringBreif description of Package Product Items
9service_idNumberAlt textShipping Service Id. Define in Master Data sheet
10payment_method_idNumberAlt textPayment Method Id. Define in Master Data sheet
11is_return_docintReturn document or invoice (1: Yes, 0: no, Default is 0)
12cod_amountDoubleAmount of COD to collect when package delivered to receiver
13noteStringAdditional note, delivery instruction of the order
14cargo_valueDoubleBreif value of Package Product Items
15cargo_type_idNumberAlt textBreif ID of Package Product Items.
16s_nameStringAlt textFullname of sender
17s_phoneStringAlt textSender contact phone number
18s_addressStringAlt textAddress of sender
19s_ward_nameStringAlt textWard name of sender
20s_district_nameStringAlt textDistrict of sender
21s_province_nameStringAlt textProvince of sender
22is_return_orgNumberDescription 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).
23return_nameStringName of the recipient for return information
24return_phoneStringPhone number of the return address
25return_addressStringReturn address
26return_ward_nameStringName of Ward in the return address
27return_district_nameStringName of District / Town / City (not directly under the central government) in the return address
28return_province_nameStringName of Province / City in the return address
29r_nameStringAlt textFull name of receiver
30r_phoneStringAlt textReceiver's contact phone number
31r_addressStringAlt textFull address of receiver (e.g., Tổ 5, KP7, 52A Nguyễn Thái Bình)
32r_ward_nameStringAlt textWard name of receiver
33r_district_nameStringAlt textDistrict of receiver
34r_province_nameStringAlt textProvince of receiver
35r_emailStringEmail address of receiver
36is_draftNumber"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)"
38other_feeNumberAdditional Fee as agreement with supplier

JSON body respone

NameTypeDescription
successbooleanReturn true if create bill success, all other false means error. See message for further description.
messagestringReturn Message of API Respond.
dataobjectData 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"
}