API ReferenceShipments
Create shipment
Create a new shipment from sender, receiver, cargo, and service information.
POST
/v3/bill/createSend order data to Nhất Tín and create a shipment.
Auth: Bearer access token
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ref_code | string | No | Customer reference order code. |
package_no | number | No | Number of packages. Default can be 1. |
weight | number | Yes | Shipment weight. |
width | number | No | Package width in cm. |
length | number | No | Package length in cm. |
height | number | No | Package height in cm. |
service_id | number | Yes | Shipping service code. |
payment_method_id | number | Yes | Shipping fee payment method. |
cargo_type_id | number | Yes | Cargo type. |
cod_amount | number | No | COD amount to collect on delivery. |
cargo_value | number | No | Declared cargo value. |
s_name | string | Yes | Sender name. |
s_phone | string | Yes | Sender phone number. |
s_address | string | Yes | Sender address. |
s_province_code | string | Yes | Sender province/city code from the new location system. |
s_ward_code | string | Yes | Sender ward code from the new location system. |
r_name | string | Yes | Receiver name. |
r_phone | string | Yes | Receiver phone number. |
r_address | string | Yes | Receiver address. |
r_province_code | string | Yes | Receiver province/city code from the new location system. |
r_ward_code | string | Yes | Receiver ward code from the new location system. |
is_return_doc | number | No | 1 when document return is required. Default is 0. |
is_return_org | number | No | 1 when using a separate return address. |
return_name | string | Conditional | Return receiver name when is_return_org = 1. |
return_phone | string | Conditional | Return phone number. |
return_address | string | Conditional | Return address. |
return_province_code | string | Conditional | Return province/city code. |
return_ward_code | string | Conditional | Return ward code. |
is_draft | number | No | 1 to create a draft shipment, 0 to create a shipment ready for pickup. |
other_fee | number | No | Additional fee by agreement. |
is_installation | number | No | 1 if delivery includes installation support. |
curl --request POST \
--url https://apisandbox.ntlogistics.vn/v3/bill/create \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{
"weight": 2,
"service_id": 91,
"payment_method_id": 10,
"cargo_type_id": 2,
"s_name": "TEST",
"s_phone": "0333333333",
"s_address": "so 10",
"s_province_code": "01",
"s_ward_code": "00004",
"r_name": "TEST",
"r_phone": "0333333333",
"r_address": "123",
"r_province_code": "79",
"r_ward_code": "25750"
}'Response
| Field | Type | Description |
|---|---|---|
success | boolean | true when the shipment is created successfully. |
message | string | Response message. |
data.bill_id | number | Shipment ID. |
data.bill_code | string | Nhất Tín shipment code. |
data.status_id | number | Initial shipment status. |
data.main_fee | number | Main shipping fee. |
data.total_fee | number | Estimated total fee. |
data.expected_at | string | Estimated delivery time, if available. |
{
"success": true,
"data": {
"bill_id": 0,
"bill_code": "CP17364792",
"status_id": 2,
"main_fee": 82000,
"total_fee": 82000,
"expected_at": "2023-08-12 09:26:00"
},
"message": "Create bill successfully"
}