stable本次发布有变化全部展示
来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Path: /product/202309/global_products/{global_product_id}/inventory/update
#§2 Method: [POST]
#§3 Function Description
Update the inventory of unpublished global products if you have access to the Multi-Warehouse feature. The inventory of published global products will not be affected by this update operation.
§4 Common Parameters
For common parameters, refer to How to call TikTok Shop APIs - Common Parameters
| Properties | Location | Type | Require | Sample | Properties description |
|---|---|---|---|---|---|
| content-type | header | string | Y | application/json | Allowed type: application/json |
§5 Request Path Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| global_product_id | string | Y | 1729592969712207013 | The global product ID to be updated. |
§6 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. |
§7 Request Body Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| global_skus | []object | Y | The list of global SKUs that need to be updated. | |
| ^id | string | Y | 1729592969712207013 | The global SKU ID in TikTok Shop. |
| ^inventory | []object | Y | Global SKU inventory information. | |
| ^^global_warehouse_id | string | Y | 7068517275539719942 | The ID of the global warehouse where the SKU is stored. Retrieve this value from Get Global Product or Get Global Seller Warehouse. |
| ^^quantity | int | Y | 999 | The updated SKU quantity. |
§8 Request Sample
Query
https://open-api.tiktokglobalshop.com/product/202309/global_products/1729592969712207013/inventory/update?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c×tamp=1625484268
Body
{"global_skus":[{"id":"1729592969712207013","inventory":[{"global_warehouse_id":"7068517275539719942","quantity":999}]}]}
§9 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 |
§10 Response Sample
{"code":0,"data":{},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}
§11 Error Code
For common error codes, refer to How to call TikTok Shop APIs - Common Error Code
| Code | Message |
|---|---|
| 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |
| 12019113 | product status is invalid |
| 12019114 | Seller has no permission |
| 12019117 | Missing variations (sales attributes). When there are multiple SKUs in a product, each SKU must include variation (sales attribute) details that explain how it is different from other SKUs in the product. |
| 12019150 | The product ID does not exist. |
| 12052048 | You cannot edit the specified product(s) as it isn't listed in your account or shop. |
| 12052055 | The SKU inventory quantity for the warehouse must be within allowed limits. |
| 12052094 | No multiple warehouse permission |
| 12052142 | no permission of multi global warehouse |
| 12052143 | sku warehouse must equal |
| 12052145 | activity warehouse not allowed to be deleted |
| 12052146 | The specified inventory quantity is too low. It must be greater than the locked quantity (e.g. for committed orders, campaigns, creators) to ensure a non-negative available stock. |
| 12052260 | The product ID does not exist |
| 12052379 | the cover region of share warehouse can not cover the the product region |
| 12052447 | You still have stock reserved for campaigns in your Chinese warehouse(s), so you cannot add an overseas warehouse yet. If you have an overseas warehouse, you must use it to fulfill orders for your {{country}} shop. |
| 12052448 | Local fulfillment is required for {{country}} shop. You must have at least one {{country}} overseas warehouse for it. |
| 12052530 | The warehouse ' {{warehouse ID}} ' does not belong to this shop/seller. |
| 12052531 | The warehouse is disabled. |
| 12052533 | Removal, addition, and change of warehouses are not permitted. Please specify the original warehouses for the SKUs. |
| 12052556 | The SKU id not exist. |
| 12052700 | The seller is inactive. |
| 12052902 | The SKU list is empty. Either omit the list entirely, or provide all required details. |
