Create Shipment Label

This API describes how to create a shipment label.


Method: POST

Request Body

json
{
  "reference_no": "123abc",
  "shipping_method": "STANDARD",
  "currency": "USD",
  "duty_term": "DDP",
  "hazardous": false,
  "dangerous": false,
  "warehouse_code": "LAX",
  "from_address": {
    "name": "shipper name",
    "company_name": "",
    "address_1": "123 First St.",
    "address_2": "",
    "email": "help@email.com",
    "city": "Anytown",
    "state": "CA",
    "zip": "90210",
    "country": "US",
    "phone": "1234567890",
    "sender_id_no": "",
    "sender_tax_no": "",
    "sender_vat": ""
  },
  "to_address": {
    "name": "receiver name",
    "company_name": "",
    "address_1": "1 MAIN ST",
    "address_2": "",
    "email": "help@email.com",
    "city": "Anytown",
    "state": "CA",
    "zip": "90210",
    "country": "US",
    "phone": "1234567890",
    "residential_address": true,
    "consignee_id_type": "",
    "consignee_id_no": "",
    "consignee_id_expired": "",
    "consignee_tax_no": ""
  },
  "package": {
    "name": "",
    "weight": 20.35,
    "width": 12.55,
    "length": 15.2,
    "height": 4.7,
    "line_items": [
      {
        "sku": "sku-1",
        "unit_price": 10.05,
        "quantity": 1,
        "weight": 10,
        "product_name": "abc",
        "product_desc": "abc",
        "hs_code": "",
        "country_origin": "CN"
      },
      {
        "sku": "sku-2",
        "unit_price": 20.05,
        "quantity": 2,
        "weight": 5,
        "product_name": "def",
        "product_desc": "abc",
        "hs_code": "",
        "country_origin": "CN"
      }
    ]
  }
}

Request Body Explanation

Attribute NameTypeDescription
reference_noStringReference Number, must be unique
shipping_methodStringMethod of shipping
currencyStringCurrency code, only support USD for now
duty_termString(optional) Duty payment type, DDP(default) or DDU
hazardousBoolean(optional) If hazardous, False(default) or True
dangerousBoolean(optional) If dangerous, False(default) or True
warehouse_codeString(optional) code of the warehouse shipping from
from_addressObjectsender's address
to_addressObjectconsignee's address
nameStringname of sender or consignee
company_nameStringname of company
address_1Stringaddress line 1
address_2Stringaddress line 2
emailStringemail address
cityStringcity name
stateStringstate or province
zipStringzip code
countryStringcountry name
phoneStringphone number
sender_id_noString(optional) sender's ID number, ""(default)
sender_tax_noString(optional) sender's tax account number, ""(default)
sender_vatString(optional) sender's VAT value for some Europe destination, ""(default)
residential_addressBooleanif residential address, True or False
consignee_id_typeStringconsignee's ID type, "ID" or "PP", needed for countries CN/KR/TW
consignee_id_noStringconsignee's ID number, needed for countries CN/KR/TW
consignee_id_expiredStringconsignee ID's expiration date, YYYYMMDD
consignee_tax_noStringconsignee's tax account number
packageObjectpackage information
nameStringpackage name
weightFloatpackage weight, unit LB
widthFloatpackage width, unit inch
lengthFloatpackage length, unit inch
heightFloatpackage height, unit inch
line_itemsObjectitem information
skuStringsku number
unit_priceFloatprice of each unit
quantityIntegerquantity of this item
weightFloatitem weight, unit LB
product_nameString(optional) product's name, ""(default)
product_descString(optional) product's description, ""(default)
hs_codeString(optional) item's Harmonized System code, ""(default)
country_originString(optional) item's original country, ""(default)

Response Body

json
{
  "code": 200,
  "message": "success",
  "data": [
    {
      "reference_no": "123abc",
      "package": {
        "name": "",
        "shipping_method": "STAND",
        "tracking_number": "1ZGG47310324343941",
        "tracking_url": "https://www.goforgps.com/tracking/?search=1ZGG47310324343941",
        "label_pdf": "https://url-to-label.com/package1.pdf"
      }
    }
  ]
}

Response Body Explanation

Attribute NameTypeDescription
codeIntegerResponse code: 200 successful, 400/500 failed
reference_noStringReference Number
packagesListpackage shipping information
nameStringpackage name
shipping_methodStringMethod of shipping
tracking_numberStringShipping tracking number
tracking_urlStringLink of tracking trace
label_pdfStringDownload link of shipping label's PDF file