快工助手跨境电商知识与商机助手

Get Package Shipping Document

TikTok Shop 官方资料 · TikTok Shop Partner Center 开发者文档 · 适合开发者

stable本次发布有变化全部展示

来自 TikTok Shop 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
TikTok Shop / profile.tiktok.docs_api
语言
en-US
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/tiktok_shopaudience/developercategory/api_doctopic/compliancetopic/developer

资料正文

§1 Path: /fulfillment/202309/packages/{package_id}/shipping_documents

#

§2 Method: [GET]

#

§3 Function Description

For orders shipped by TikTok Shop, this API retrieves the URL of shipping documents (shipping label and packing slip) for a package specified by the package ID. This API is only applicable to "TikTok Shipping" orders. To obtain the shipping documents URL via this API, first call "Ship Package" to ship the corresponding package.


#

§4 Common Parameters

For common parameters, refer to How to call TikTok Shop APIs - Common Parameters

Properties Location Type Require Sample Properties description
shop_cipherquerystringYGCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3Use this property to pass shop information in requesting the API. Failure in passing the correct value when requesting the API for cross-border shops will return incorrect response.
Get by API Get Authorization Shop
content-typeheaderstringYapplication/jsonAllowed type: application/json
#

§5 Request Path Parameters

Properties Type Require Sample Properties description
package_idstringY5433567853345TikTok Shop package ID.
#

§6 Request Query Parameters

Properties Type Require Sample Properties description
app_keystringY38abcdEvery single app will have a unique key. Please use the specific key assigned to your app.
signstringY5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8cSignature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders.
timestampintY1623812664Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time.
document_typestringYSHIPPING_LABELAvailable 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 |N |A6 |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 |N |PDF |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 |N |DEFAULT |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. ) |
#

§7 Request Sample

Query

https://open-api.tiktokglobalshop.com/fulfillment/202309/packages/5433567853345/shipping_documents?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c&timestamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY&document_type=SHIPPING_LABEL&document_size=A6&document_format=PDF&shipping_period=DEFAULT
#

§8 Response Parameters

Properties Type Sample Properties description
codeint0The success or failure status code returned in API response.
messagestringSuccessThe success or failure messages returned in API response. Reasons of failure will be described in the message.
request_idstring202203070749000101890810281E8C70B7Request log
dataobjectSpecific return information
^doc_urlstringhttps://magelng.bytedance.net2/wsos_v2/oec_fulfillment_doc_tts/object/wsos641232The URL of the shipping label and packing slip generated for the specified package.
The URL is valid for 24 hours.
^tracking_numberstring752455325694The package tracking number from the shipping carrier.
#

§9 Response Sample

{"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"}
#

§10 Error Code

For common error codes, refer to How to call TikTok Shop APIs - Common Error Code

Code Message
11006010Internal package status error, please try again later.
11034002This API is only applicable to TikTok Shipping orders. For seller shipping, please obtain the shipping label offline and upload it to TikTok Shop via API or Seller Center.
11034009Warehouse does not exist.
11034023Shipping document generation timeout error, please try again later.
11034025Internal package tag error, pleaser try again later.
11034037The shipping document is still being generated by the logistics provider, please try again later.
21008017This API is only applicable to TikTok Shipping orders. For seller shipping, please obtain the shipping label offline and upload it to TikTok Shop via API or Seller Center.
21008043This package is fulfilled by TikTok. Shipping documents cannot be printed.
21008109Unable to retrieve shipping information, please double check the order status.
21011001Package not found. If the error persists, please contact the platform for assistance.
21021010Failed to ship. You may cancel the order without penalty by selecting the following reason: Unable to deliver to buyer address.
21023022Unknown label print timeout error. If the error persists, please contact the platform for assistance.
21023034Internal package update error, please try again later.
21023035Please arrange shipment before retrieving the shipping document.
21023046Package has already been shipped.
21023059Package has already been cancelled.
21042102Documents couldn't be printed after the package has been pickup.
21042104Documents couldn't be printed before shipped.Please check shipping is arranged and try again.
36009003Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support.
#