POST /2026-05/cloud/label
Method: POST
URL:
Sandbox URL:
Description: Creates a shipping label for a shipment on ZhenHub.
Parameters required to be sent
| Parameter | Description | Type |
|---|---|---|
shipping_address | Consignee (receiver) address. | Object, Required |
first_name | First name. Maximum length: 64. | String, Required |
last_name | Last name. Maximum length: 64. | String, Required |
company_name | Company name. Maximum length: 128. | String |
phone | Phone number. Maximum length: 32. | String, Required |
email | Email address. Maximum length: 128. | String |
address1 | Address line 1. Maximum length: 256. | String, Required |
address2 | Address line 2. Maximum length: 256. | String |
district | District. Maximum length: 64. | String |
city | City. Maximum length: 64. | String, Required |
province | State / Province. Maximum length: 64. | String |
province_code | Province code. Maximum length: 32. | String |
zip_code | Postal / ZIP code. Maximum length: 16. | String |
country | Full country or region name (e.g. United States, China, Hong Kong SAR China). | String, Required |
country_code | ISO 2-letter country code (e.g. CN, US, HK). | String, Required |
shipper_address | Sender (shipper) address. | Object, Required |
first_name | First name. Maximum length: 64. | String, Required |
last_name | Last name. Maximum length: 64. | String, Required |
company_name | Company name. Maximum length: 128. | String |
phone | Phone number. Maximum length: 32. | String, Required |
email | Email address. Maximum length: 128. | String |
address1 | Address line 1. Maximum length: 256. | String, Required |
address2 | Address line 2. Maximum length: 256. | String |
district | District. Maximum length: 64. | String |
city | City. Maximum length: 64. | String, Required |
province | State / Province. Maximum length: 64. | String |
province_code | Province code. Maximum length: 32. | String |
zip_code | Postal / ZIP code. Maximum length: 16. | String |
country | Full country or region name (e.g. United States, China, Hong Kong SAR China). | String, Required |
country_code | ISO 2-letter country code (e.g. CN, US, HK). | String, Required |
reference | Merchant order reference number. Maximum length: 64. | String, Required |
currency | ISO 4217 currency code (e.g. USD, EUR, GBP). | String, Required |
weight_unit | Weight unit. Supported values: kg, g, lb, oz. | String, Required |
length | Package length. The measurement unit is determined by length_unit. | Number |
width | Package width. The measurement unit is determined by length_unit. | Number |
height | Package height. The measurement unit is determined by length_unit. | Number |
length_unit | Dimension unit. Supported values: m, cm, mm, ft, in. | String |
expect_pickup_time | Expected carrier pickup time in ISO 8601 format. | String |
service | Shipping service selected from the carrier service query response. | Object, Required |
service_code | Carrier service code selected from the service query response. Maximum length: 32. | String, Required |
inco_term | Incoterm (e.g. DAP, DDP). Maximum length: 16. | String |
items | List of items included in the shipment. | Array, Required |
product_name | Product name. Maximum length: 100. | String, Required |
quantity | Quantity of the product. | Integer, Required |
weight | Weight per unit. The measurement unit is determined by weight_unit. | Number, Required |
length | Item length. The measurement unit is determined by length_unit. | Number |
width | Item width. The measurement unit is determined by length_unit. | Number |
height | Item height. The measurement unit is determined by length_unit. | Number |
unit_price | Selling price per unit. | Number, Required |
declared_unit_value | Declared customs value per unit used for customs clearance and duty assessment. | Number |
tax | Total tax amount for this item line. | Number |
sku_code | SKU code. Maximum length: 128. | String |
brand | Brand name. Maximum length: 64. | String |
unit | Unit of measure (e.g. pcs). Maximum length: 16. | String |
hs_code | HS code. Maximum length: 32. | String |
customs_description | Customs declaration description. Maximum length: 512. | String |
origin_country_code | ISO 3166-1 alpha-2 country code of the item's country of origin (e.g. US, CN, HK). | String |
package_attributes | Package attributes. | Object |
contains_alcohol | Indicates whether the package contains alcohol. This may affect carrier availability and shipping restrictions. | Boolean |
contains_liquid | Indicates whether the package contains liquids. This may affect carrier availability and shipping restrictions. | Boolean |
contains_battery | Indicates whether the package contains batteries. This may affect carrier availability and shipping restrictions. | Boolean |
contains_dangerous_goods | Indicates whether the package contains dangerous goods. This may affect carrier availability and shipping restrictions. | Boolean |
contains_prohibited_items | Indicates whether the package contains prohibited items. This may affect carrier availability and shipping restrictions. | Boolean |
weight | Total package weight. Unit is the same as weight_unit in the request body. | Number |
metadata | Additional metadata. | Object |
platform_order_no | Marketplace order number. | String |
platform | Marketplace or sales channel name. | String |
Body
json
{
"shipping_address": {
"address1": "3 Hoi Shing Rd, TML Tower",
"address2": "",
"zip_code": "000000",
"district": "Tsuen Wan",
"city": "New Territories",
"province": "Hong Kong",
"province_code": "NT",
"country": "Hong Kong SAR China",
"country_code": "HK",
"email": "arthur@zhenhub.com",
"first_name": "Arthur",
"last_name": "Chen",
"company_name": "",
"phone": "+852 3152xxxx"
},
"shipper_address": {
"address1": "3 Hoi Shing Rd, TML Tower",
"address2": "",
"zip_code": "000000",
"district": "Tsuen Wan",
"city": "New Territories",
"province": "Hong Kong",
"province_code": "NT",
"country": "Hong Kong SAR China",
"country_code": "HK",
"email": "arthur@zhenhub.com",
"first_name": "Arthur",
"last_name": "Chen",
"company_name": "",
"phone": "+852 3152xxxx"
},
"reference": "#Z00001",
"currency": "USD",
"weight_unit": "kg",
"length": null,
"width": null,
"height": null,
"length_unit": "cm",
"expect_pickup_time": "2026-06-01T10:00:00+08:00",
"service": {
"service_code": "DHL",
"inco_term": "DAP"
},
"items": [
{
"product_name": "iPhone 15",
"quantity": 1,
"weight": 1,
"length": null,
"width": null,
"height": null,
"unit_price": 6800,
"declared_unit_value": 6800,
"tax": 0,
"sku_code": "IPHONE15-BLK-128",
"brand": "Apple",
"unit": "pcs",
"hs_code": "",
"customs_description": "",
"origin_country_code": "HK"
}
],
"package_attributes": {
"contains_alcohol": false,
"contains_liquid": false,
"contains_battery": true,
"contains_dangerous_goods": false,
"contains_prohibited_items": false,
"weight": 1.25
},
"metadata": {
"platform_order_no": "SHOPEE20260530192101",
"platform": "Shopee"
}
}Response
The response body contains the generated label ID.
json
{
"code": 200,
"message": "OK – The request was successful.",
"data": 8050996080689152
}If the request fails, the data field will be null or omitted, and the error details will be returned in message.
Notes
- The returned data value is the generated label ID.
- The label ID is required for retrieving printable label content and shipment tracking information.
shipper_addressis the sender information.shipping_addressis the recipient information.- At least one item must be included in
items. country_codemust follow the ISO 3166-1 alpha-2 standard.expect_pickup_timemust be provided in ISO 8601 format.- The declared value and weight of each item may be used for customs clearance and freight calculation.
