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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”TikTok Shop package ID.
Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
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_sizeis fixed to A4, and you don’t need to specifydocument_size.INVOICE_LABEL: For Brazil market only, document_size is fixed to A6, and you don’t need to specifydocument_size. Returns the invoice label in PDF format by default
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
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.
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. )
Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
The URL of the shipping document generated for the specified package according to the requested document_type. The URL is valid for 24 hours.
The package tracking number from the shipping carrier.
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"}