来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Path: /fbt/202602/inbound_orders/label_print
#§2 Method: [POST]
#§3 Function Description
This API uses an asynchronous Long-Running Operation (LRO) pattern to generate label files. This pattern allows you to trigger a generation task and track its progress until completion. Workflow Steps
- Initiate Send a request with
order_idand the desiredprint_items. - Response: The API begins the print task and returns a
task_statusofPROCESSING. - Poll Send subsequent requests using the same fields from Step 1. If the print task is still processing, the API will continue to return
PROCESSING. - Frequency: We recommend polling every 3–5 seconds.
- Complete When the status returns
SUCCESS, the response body will include adownload_urlfor your generated ZIP file.
§4 Common Parameters
For common parameters, refer to How to call TikTok Shop APIs - Common Parameters
| Properties | Location | Type | Require | Sample | Properties description |
|---|---|---|---|---|---|
| shop_cipher | query | string | Y | GCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3 | Use 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-type | header | string | Y | application/json | Allowed type: application/json |
§5 Request Query Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| app_key | string | Y | 38abcd | Every single app will have a unique key. Please use the specific key assigned to your app. |
| sign | string | Y | 5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c | Signature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders. |
| timestamp | int | Y | 1623812664 | Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time. |
§6 Request Body Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| order_id | string | Y | 5766071177167344427 | The numeric identifier of the inbound order to print labels for. |
Note: Provide the numeric sequence only; do not include the "IBR" prefix (e.g., use 123456 instead of IBR123456). | ||||
| print_items | []string | N | [ |
"CARTON_PALLET_LABEL",
"FBT_BARCODE",
"PACKING_PICKING_LIST"
] |Specifies the types of documents to be generated in this request. Multiple values can be included to receive a combined output. Allowed Values:
CARTON_PALLET_LABEL: Identification labels to be stuck on at least two adjacent sides of each carton.PACKING_PICKING_LIST: Warehouse document for identifying and packing items.FBT_BARCODE: Fulfilled by TikTok barcodes.
Note: If this list is empty or omitted, CARTON_LABEL will be generated by default. |
carton_label_format |string |N |DEFAULT_1UP |Specifies the layout and dimensions for the carton labels. If this parameter is omitted or an invalid value is provided, the system will use the default single-label format.
Allowed Values:
DEFAULT_1UP: Standard format (1 label per page).A4_4UP: A4 paper format (4 labels per page).
Note: If no value is provided, DEFAULT_1UP will be used as the default format. |
barcode_format |string |N |DEFAULT_40MM_60MM |Specifies the layout and dimensions for the generated label PDF. If this parameter is omitted or an invalid value is provided, the system will use the default thermal label format.
Allowed Values:
Standard / Default
DEFAULT_40MM_60MM: Standard 40mm x 60mm thermal label format
A4 Paper Layouts
A4_21UP_60_0MM_40_0MM: 21-up labels (60.0mm x 40.0mm) on A4A4_21UP_63_5MM_38_1MM: 21-up labels (63.5mm x 38.1mm) on A4A4_24UP_63_5MM_33_9MM: 24-up labels (63.5mm x 33.9mm) on A4A4_24UP_64_6MM_33_8MM: 24-up labels (64.6mm x 33.8mm) on A4A4_24UP_66_0MM_33_9MM: 24-up labels (66.0mm x 33.9mm) on A4A4_24UP_66_0MM_35_0MM: 24-up labels (66.0mm x 35.0mm) on A4A4_24UP_70_0MM_36_0MM: 24-up labels (70.0mm x 36.0mm) on A4A4_24UP_70_0MM_37_0MM: 24-up labels (70.0mm x 37.0mm) on A4A4_27UP_63_5MM_29_6MM: 27-up labels (63.5mm x 29.6mm) on A4A4_40UP_52_5MM_29_7MM: 40-up labels (52.5mm x 29.7mm) on A4A4_44UP_48_5MM_25_4MM: 44-up labels (48.5mm x 25.4mm) on A4
US Letter Layouts
US_LETTER_30UP_1IN_2_625IN: 30-up labels (1" x 2-5/8") on US Letter
Note: If no value is provided, DEFAULT_40MM_60MM will be used as the default format. |
§7 Request Sample
Query
https://open-api.tiktokglobalshop.com/fbt/202602/inbound_orders/label_print?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c×tamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY
Body
{"order_id":"5766071177167344427","print_items":["CARTON_PALLET_LABEL","FBT_BARCODE","PACKING_PICKING_LIST"],"carton_label_format":"DEFAULT_1UP","barcode_format":"DEFAULT_40MM_60MM"}
§8 Response Parameters
| Properties | Type | Sample | Properties description |
|---|---|---|---|
| code | int | 0 | The success or failure status code returned in API response. |
| message | string | Success | The success or failure messages returned in API response. Reasons of failure will be described in the message. |
| request_id | string | 202203070749000101890810281E8C70B7 | Request log |
| data | object | Specific return information | |
| ^download_url | string | https://example.com/fbt/inbound_files.zip?download_token=sample_token | URL containing labels for the inbound order. |
| Please note: the URL will be unicode-escaped. If attempting to manually paste the URL into a browser, you will need to unescape the URL first (e.g. '\u0026'->'&') | |||
| ^task_status | string | PROCESSING | * PROCESSING: Task is currently being processed. Continue to periodically poll. |
SUCCESS: Task is finished.download_urlshould be included in response |
§9 Response Sample
{"code":0,"data":{"download_url":"https://example.com/fbt/inbound_files.zip?download_token=sample_token","task_status":"PROCESSING"},"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 |
|---|---|
| 39001002 | Request or request parameters are empty. Please recheck the input parameters. |
| 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |
| 39015007 | Access denied. The API requires the seller to be bound to exactly one merchant. |
| 39015009 | SellerId input is invalid |
| 39015010 | No inbound orders found for the merchant. |
