POST /2025-07/cloud/order
Method: POST
URL:
Sandbox URL:
Description: Creates an order on ZhenHub.
Parameters required to be sent
| Parameter | Description | Type |
|---|---|---|
shipping_address | Shipping address. | Object, Required |
first_name | First name. The maximum length is 64. | String, Required |
last_name | Last name. The maximum length is 64. | String, Required |
email | Email. The maximum length is 128. | String, Required, must have @ |
phone | Phone number. The maximum length is 32. | String, Required |
address1 | Address. The maximum length is 256. | String, Required |
address2 | Address 2. The maximum length is 256. | String |
zip_code | Zip code. The maximum length is 15. | String, Required |
district | District. The maximum length is 60. | String, Required |
city | City. The maximum length is 60. | String, Required |
province | Province. The maximum length is 60. | String, Required |
country | Country. The maximum length is 60. | String |
country_code | Country code, eg.CN, US. The maximum length is 2. | String, Required |
billing_address | Billing address. If “billing_address” is not filled, “shipping_address” is used by default. | Object |
first_name | First name. The maximum length is 64. | String, Required |
last_name | Last name. The maximum length is 64. | String, Required |
email | Email. The maximum length is 128. | String, Required, must have @ |
phone | Phone number. The maximum length is 32. | String, Required |
address1 | Address. The maximum length is 256. | String, Required |
address2 | Address 2. The maximum length is 256. | String |
zip_code | Zip code. The maximum length is 15. | String, Required |
district | District. The maximum length is 60. | String, Required |
city | City. The maximum length is 60. | String, Required |
province | Province. The maximum length is 60. | String, Required |
country | Country. The maximum length is 60. | String |
country_code | Country code, eg.CN, US. The maximum length is 2. | String, Required |
reference | Reference of the order. The maximum length is 47. | String |
currency | Currency of the order, default value is “USD”. The maximum length is 3. | String |
totals_include_tax | Indicates whether the total amount includes tax. If true, tax is included; otherwise, it's excluded. Default: false. | Boolean |
shipping_cost | Shipping cost of the order. The maximum total digits 12, with 2 decimal places. | Number |
service | Service | Object |
service_code | Service code. The maximum length is 63. | String |
inco_term | Incoterm. The maximum length is 8. | String |
warehouse_code | Warehouse code. The maximum length is 32. | String |
sku_items | Array containing product SKU details. | Array, Required |
sku_number | SKU No. of the product. The maximum length is 128. | String, Required |
quantity | Quantity of the product. | Integer, Required |
price | Price of the product. The maximum total digits 12, with 2 decimal places. | Number, Required |
discount | Discount of the product. The maximum total digits 12, with 2 decimal places. | Number |
tax | Tax of the product, 5%==>0.05. The maximum total digits 12, with 2 decimal places. | Number |
Notes: Use product variant ID for SKU.
Body
json
{
"shipping_address": {
"address1": "3 Hoi Shing Rd, TML Tower",
"address2": "",
"zip_code": "000000",
"district": "Tsuen Wan",
"city": "New Territories",
"province": "Guangdong",
"country": "Hong Kong SAR China",
"country_code": "HK",
"email": "arthur@zhenhub.com",
"first_name": "Arthur",
"last_name": "Chen",
"phone": "+852 3152xxxx"
},
"billing_address": {
"address1": "3 Hoi Shing Rd, TML Tower",
"address2": "",
"zip_code": "000000",
"district": "Tsuen Wan",
"city": "New Territories",
"province": "Hong Kong",
"country": "Hong Kong SAR China",
"country_code": "HK",
"email": "arthur@zhenhub.com",
"first_name": "Arthur",
"last_name": "Chen",
"phone": "+852 3152xxxx"
},
"reference": "#Z00001",
"currency": "USD",
"totals_include_tax": true,
"shipping_cost": 100.68,
"service": {
"service_code": "DHL",
"inco_term": "DAP",
"warehouse_code": "HongKong"
},
"sku_items": [
{
"sku_number": "iphone6",
"quantity": 1,
"price": 1681.68,
"discount": 168,
"tax": 5
}
]
}Response
Response payload.
Payload return an error with the description and data = empty. If the request is successful, the data contains an object with the result and the order ID.
json
{
"code": 200,
"message": "Successful!",
"data": 718554230536601611
}