Create an order

CustomerApiCreateOrder

POST:/Api/Customer/CustomerAPICreateOrder

Headers

NameValue

ClientID

From login api

Token

From login api

Body

NameTypeDescription

ClientHubID*

integer

ClientHubID (Required when not passed CusWareHouseID)

ReceiverPhone

string

Recipient's phone.

ReceiverName

string

Recipient's name.

ReceiverAddress*

string

Recipient's full address (house number, Street name, Ward name, District name, Province name).

ReceiverProvinceName*

string

Recipient's Province name.

ReceiverDistrictName*

string

Recipient's District name.

ReceiverWardName

string

Recipient's Ward name.

RealWeight

number

Real weight(kg).

Length

number

Length (cm).

Width

number

Width (cm).

Height

number

Height (cm).

Quantity

integer

Quantity package.

Note

string

Note.

ServiceTypeID

string

Service code.

MailerType

string

Code type of freight: HH - Goods. TL - Document.

CODAmount

number

The amount of COD will be collected from the recipient.

ExternalCode

string

Customer's order code.

SpecialInstructionId

number

Special note code for COD orders only: 1 - Show the goods. 2 - Do not show the goods.

InformFee

number

Declared value. Cases to note when declaring: 1 - Price calculation volume >= 2.5kg need to choose type = HH (goods). 2 - Type = HH (goods), required to enter the declared value (InformFee). 3 - If you choose DVBH (insurance service), you must enter the declared value(InformFee)

ExtraServices

array

List of VAT Services

DirectSenderName

string

Direct sender name

Items

array

List of co-checked goods:

{
    "No": 1, //S Numerical order,
    "ItemID": "ITEM1", // ItemID,
    "ItemName": "ITEMNAME", // Goods name,
    "UnitName": "", // Unit name,
    "Qty": 3, // Quantity,
    "UnitPrice": 1200000, // Unit price,
    "Amount": 3600000, // Amount
    "Notes": "Thiết bị điện tử", //Item notes,
    "Imeis": //the emei number of each specific item (if this infomation is transmitted, will be check for each emei) 
    [
        {
            "No": 1, // Numerical order,
            "Imei": "AM0123456" // Imei number
        },
        {
            "No": 2,
            "Imei": "AM0123426"
        }
    ]
}

ContactName

string

Contact Name

ContactPhone

string

Contact Phone

CusWareHouseID

string

ShopID/WareHouseID (Required when not passed ClientHubID)

Packages

array

{
    "PackageID": "HD000003/1", //PackageID,
    "Length": 100, // Length (cm) (Required when entering in Height, Width),
    "Width": 50, // Width (cm)(Required when entering in Height, Length),
    "Height": 80, // Height (cm) (Required when entering in Width, Length),
    "RealWeight": 25 //Real weight (kg)
}

(*)The number of Packages must be equal to Quantity property. In case Quantity = 1 thenPackages = []

Response

{
    "Errors": [],
    "ErrorCode": "0",
    "OrderInfo": {
        "OrderCode": "HD000003",
        "TotalServiceCost": 44176,
        "ExtraServices": [
            {
                "ServiceName": "Chuyển phát nhanh",
                "ServiceID": "DE",
                "Cost": 16800
            },
            {
                "ServiceName": "Hàng đông lạnh",
                "ServiceID": "HDL",
                "Cost": 15000
            },
            {
                "ServiceName": "Báo phát",
                "ServiceID": "BP",
                "Cost": 5000
            },
            {
                "ServiceName": "Phí xăng dầu",
                "ServiceID": "Fuel",
                "Cost": 3360
            },
            {
                "ServiceName": "Phí VAT",
                "ServiceID": "VAT",
                "Cost": 4016
            }
        ],
        "DeliveryType": "1"
    },
    "ErrorMessage": ""
}
NameTypeDescription

Errors

array object

Array of Errors

ErrorCode

string

Error code

ErrorMessage

string

Error message

OrderInfo

object

Order Info

OrderCode

string

Order ID

TotalServiceCost

number

Total Service Cost

ExtraService

array object

Value-added services list

ServiceName

string

Value-added service name

ServiceID

string

Value-added service id

Cost

number

Value-added service cost

DeliveryTimeType

string

Delivery by: "1" - 247 Exprest "2" - Other

Example

{
   "OrderInfo":{
      "ClientHubID":11583,
      "CusWareHouseID":"30984",
      "ContactName": "Trần Văn B",
      "ContactPhone": "0332318317",      
      "ReceiverPhone":"0345555777",
      "ReceiverName":"Trương Chí Nhân",
      "ReceiverAddress":"326 Võ Văn Kiệt, phường Cô Giang, Quận 1, Hồ Chí Minh, Việt Nam",
      "ReceiverProvinceName":"Hồ Chí Minh",
      "ReceiverDistrictName":"Quận 1",
      "ReceiverWardName":"Phường Cô Giang",   
      "RealWeight":1,
      "Length":0,
      "Width":0,
      "Height":0,
      "Quantity":2,
      "Packages" :[
         {
            "PackageID":"HD000003/1",
            "Length":25,
            "Width":30,
            "Height": 10,
            "RealWeight": 5 
         },
         {
            "PackageID":"HD000003/2",
            "Length":33,
            "Width":25,
            "Height": 12,
            "RealWeight": 8.7
         }
      ],
      "Note":"Tài liệu",
      "ServiceTypeID":"DE",
      "MailerType":"HH",
      "CODAmount":0,
      "ExternalCode":"HD000003",
      "SpecialInstructionId":1,
      "InformFee":500000,
      "ExtraServices":[
         {
            "ServiceID":"PTN",
            "Type":2
         },
         {
            "ServiceID":"BP",
            "Type":2
         }
      ],
      "Items":[
         {
            "No":1,
            "ItemID":"IP11BLUE",
            "ItemName":"Mô hình Iphone 11 Blue",
            "UnitName":"CAI",
            "Qty":2,
            "UnitPrice":220000,
            "UnitPricePromo":220000,
            "Amount":440000,
            "Notes":"",
            "Imeis":[
               {
                  "No":1,
                  "Imei":"353344667789"
               },
               {
                  "No":2,
                  "Imei":"373344667788"
               }
            ]
         },
         {
            "No":2,
            "ItemID":"OPSAMSUNGS20",
            "ItemName":"Ốp Samsung Galaxy S20",
            "UnitName":"CAI",
            "Qty":2,
            "UnitPrice":30000,
            "UnitPricePromo":30000,
            "Amount":60000,
            "Notes":""
         }
      ]
   }
}

Errors Code

  • 1: Ward error

  • 2: District error

  • 3: Province error

  • 4: Duplicate ordercode

  • 5: Server error

  • 6: Was an exception

  • 9: SpecialInstruction is required

  • 10: ServiceType is required

  • 12: Account is invalid

  • 15: OrderCode is required

  • 16: OrderCode is invalid

  • 17: ReceiverAddress is invalid

  • 18: MailerType is invalid

  • 19: Quantity is invalid

  • 20: Packages is invalid

Last updated