Single entry point for dealer-app order creation (VTP, GHTK, J&T, Grab). Gọi bằng API key bị giới hạn 1 đơn / 2 phút mỗi đại lý (429 kèm Retry-After); phiên đăng nhập trên app không bị siết.
Body
Required
-
Dealer sender profile UUID. Optional for PICKUP_AT_COMPANY (sender may be empty); required for other carriers.
-
Customer full name. Skipped for PICKUP_AT_COMPANY (backend fills from dealer).
Maximum length is
255. -
Customer phone. Skipped for PICKUP_AT_COMPANY.
Maximum length is
20. -
Customer street address. Skipped for PICKUP_AT_COMPANY.
Maximum length is
500. -
VTP receiver province id
-
VTP receiver district id
-
VTP receiver ward id
-
Receiver province name
Maximum length is
100. -
Receiver district name
Maximum length is
100. -
Receiver ward name
Maximum length is
100. -
Order line items (≥1)
-
Shipping carrier. Defaults to VTP for backward compatibility.
Values are
0,1,2,3,4, or99. -
Carrier service code (e.g., VTP service)
-
Who pays ship fee
Values are
1,2,3, or4. -
Product weight in grams
Minimum value is
1. -
COD money to collect on delivery
Minimum value is
0. -
Prepaid amount (decimal string)
-
Internal note
Maximum length is
500. -
Extra carrier service options
-
Save as draft (skip carrier API submit)
Default value is
false. -
Đơn có dùng thùng carton hay không. Bỏ trống → suy ra từ carrier (Grab / lấy tại công ty = không dùng).
curl \
--request POST 'https://api-dealer.dilisupplement.com/api/orders' \
--header "Content-Type: application/json" \
--data '{"sender_id":"string","customer_name":"string","customer_phone":"0912345678","customer_address":"string","receiver_province_id":42.0,"receiver_district_id":42.0,"receiver_ward_id":42.0,"receiver_province":"string","receiver_district":"string","receiver_ward":"string","items":[{"kind":"product","ref_id":"string","quantity":42.0}],"carrier":0,"order_service":"string","order_payment":1,"product_weight":42.0,"money_collection":42.0,"prepaid_amount":"0.00","notes":"string","order_service_add":"string","is_draft":false,"is_use_carton":true}'
{
"sender_id": "string",
"customer_name": "string",
"customer_phone": "0912345678",
"customer_address": "string",
"receiver_province_id": 42.0,
"receiver_district_id": 42.0,
"receiver_ward_id": 42.0,
"receiver_province": "string",
"receiver_district": "string",
"receiver_ward": "string",
"items": [
{
"kind": "product",
"ref_id": "string",
"quantity": 42.0
}
],
"carrier": 0,
"order_service": "string",
"order_payment": 1,
"product_weight": 42.0,
"money_collection": 42.0,
"prepaid_amount": "0.00",
"notes": "string",
"order_service_add": "string",
"is_draft": false,
"is_use_carton": true
}