Skip to content

Get Package Shipping Document

GET
/fulfillment/202309/packages/{package_id}/shipping_documents

For packages shipped with TikTok Shipping, use this API to retrieve the URL of the shipping document selected by document_type for the package specified by package_id. First call Ship Package to arrange shipment, then retrieve the document before the package is picked up.

package_id
required
string

TikTok Shop package ID.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

document_type
required
string

Available document types:

  • SHIPPING_LABEL: Returns the shipping label in PDF format by default.
  • PACKING_SLIP: Returns the packing slip in PDF format by default.
  • SHIPPING_LABEL_AND_PACKING_SLIP: Returns both the shipping label and the packing slip for the package, both in PDF format by default.
  • SHIPPING_LABEL_PICTURE: Returns the shipping label in PNG format.
  • HAZMAT_LABEL: Returns the hazmat label in PDF format by default. You must only use this value when there are hazmat items in the package. When you use the value, document_size is fixed to A4, and you don’t need to specify document_size.
  • INVOICE_LABEL: For Brazil market only, document_size is fixed to A6, and you don’t need to specify document_size. Returns the invoice label in PDF format by default
document_size
string
Allowed values: A6 A5

Use this field to specify the size of the document to obtain. This parameter is only applicable to shipping labels, picking slips, and packing slips that are in the PDF format. It is not applicable for hazmat labels as these are fixed to A4. If you specify SHIPPING_LABEL_PICTURE for the document_type, any value specified in the document_size will be ignored.

Possible values:

  • A6 (Default)
  • A5
document_format
string
Allowed values: PDF ZPL

The format of the shipping document. Possible values:

  • PDF (Default)
  • ZPL (Only for BR and MX market)

Note: Not applicable for SHIPPING_LABEL_PICTURE document type.

shipping_period
string

Obtain shipping labels from designated last-mile delivery providers for cross-border scenarios. Possible values:

  • DEFAULT (Default)
  • LAST_MILE (Only cross-border services under the 4PL model with the business solution of 3PL for main transport & customs clearance + 4PL for last-mile delivery will return the last-mile shipping label; calls from all other scenarios will be invalid. )

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
doc_url

The URL of the shipping document generated for the specified package according to the requested document_type. The URL is valid for 24 hours.

string
tracking_number

The package tracking number from the shipping carrier.

string
Example
{
"code": 0,
"data": {
"doc_url": "https://magelng.bytedance.net2/wsos_v2/oec_fulfillment_doc_tts/object/wsos641232",
"tracking_number": "752455325694"
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}