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

Update Inventory

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: /product/202309/products/{product_id}/inventory/update

#

§2 Method: [POST]

#

§3 Function Description

Update the inventory quantity of SKUs belonging to a product. The SKU ID must belong to a product that is not in FREEZE or DELETED status.


#

§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
product_idstringY1729382561353664372The product ID generated by TikTok Shop.
#

§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.
#

§7 Request Body Parameters

Properties Type Require Sample Properties description
skus[]objectYA list of Stock Keeping Units (SKUs) used to identify distinct variants of the product.
^idstringY1729592969712207013The SKU ID generated by TikTok Shop. One product can contain multiple SKU IDs.

Note:

  • The SKU ID must belong to a product that is not in FREEZE or DELETED status.
  • If you are updating multiple SKUs, all the SKU IDs must belong to the same product. | ^inventory |[]object |Y | |SKU inventory information. Note: You must include all warehouse IDs assigned to this SKU, along with the respective quantity. Do not omit any or add unrelated warehouses. | ^^warehouse_id |string |N |7068517275539719942 |The ID of the warehouse where the SKU is stored. Retrieve this value from the Get Product API.

Note: Optional if there is only 1 warehouse. Otherwise, please provide this ID. | ^^quantity |int |Y |999 |The total SKU quantity available in the warehouse. Valid range: [1, 99,999] Note: This quantity specifically refers to the in-stock inventory that can be shipped immediately. | ^^backorder_quantity |int |N |888 |The backorder_quantity will automatically be converted to quantity once in-stock inventory is sold out. The fulfillment of this inventory follows the handling_time specified below. Note: Any existing backorder_quantity will persist if no update is provided during API call. | ^^handling_time |int |N |5 |The estimated number of working days needed for a backorder to be shipped. Currently, different warehouses for the same SKU are not allowed to have different handling_time |

#

§8 Request Sample

Query

https://open-api.tiktokglobalshop.com/product/202309/products/1729382561353664372/inventory/update?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c&timestamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY

Body

{"skus":[{"id":"1729592969712207013","inventory":[{"warehouse_id":"7068517275539719942","quantity":999,"backorder_quantity":888,"handling_time":5}]}]}
#

§9 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
^errors[]objectThe list of errors that occurred.
^^codeint12052990The main error code.
^^messagestringCheck failedThe main error message.
^^detailobjectThe details of the main error.
^^^sku_idstring1729592969712207013The ID of the SKU where the error occurred.
^^^extra_errors[]objectA list of secondary errors or issues related to the main error.
^^^^warehouse_idstring7068517275539719942The ID of the warehouse where the error occurred.
^^^^codeint12052097The secondary error code.
^^^^messagestringThe warehouse does not existThe secondary error message.
#

§10 Response Sample

{"code":0,"data":{"errors":[{"code":12052990,"message":"Check failed","detail":{"sku_id":"1729592969712207013","extra_errors":[{"warehouse_id":"7068517275539719942","code":12052097,"message":"The warehouse does not exist"}]}}]},"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
12019022SKU must contain a valid warehouse.
12019024stock count is invalid
12019028Multiple warehouses detected. Include all warehouse IDs and the corresponding details and try again.
12052031Invalid product ID(s) found
12052032The product does not exist
12052036The SKU ID is necessary
12052037Couldn't update inventory. Possible causes:
  • Inventory is automatically allocated and cannot be modified manually
  • Warehouse IDs provided are incorrect
  • Missing warehouse IDs (all warehouses that stock the product must be included) | 12052048 |You cannot edit the specified product(s) as it isn't listed in your account or shop. | 12052050 |A single product cannot have more than 100 different SKUs | 12052055 |The SKU inventory quantity for the warehouse must be within allowed limits. | 12052094 |No multiple warehouse permission | 12052096 |Unable to update the price for SKUs with no warehouse. Assign a warehouse and try again. | 12052097 |The warehouse does not exist | 12052115 |seller has no warehouse | 12052141 |please edit stock from global | 12052160 |sku count must be one and disable variables | 12052207 |receipt brand not support warehouse | 12052260 |The product ID does not exist | 12052308 |There's an ongoing appeal. If you wish to edit product details, please revoke the appeal first. | 12052364 |The warehouse is unavailable because this product cannot be shipped to the target market from this warehouse. | 12052371 |Auction product is bidding when it is not supported to change product info | 12052393 |Product locked for Promotion and stock can't be updated below current stock | 12052403 |The warehouse does not support fulfillment for the current shop. | 12052465 |warehouse is unavailable for eu gpr product | 12052530 |The warehouse ' {{warehouse ID}} ' does not belong to this shop/seller. | 12052531 |The warehouse is disabled. | 12052532 |the warehouse not delivery warehouse | 12052533 |Removal, addition, and change of warehouses are not permitted. Please specify the original warehouses for the SKUs. | 12052535 |Couldn't publish this product as you haven't set the return warehouse for your shop. Add the return warehouse information on TikTok Shop Seller Center first and try again. | 12052553 |Sku id duplicate | 12052556 |The SKU id not exist. | 12052700 |The seller is inactive. | 12052703 |Invalid seller tax number | 12052704 |seller id not exist | 12052849 |You don't have the permission to operate combo. | 12052850 |The stock of combo does not support being edited. | 36009003 |Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. | 12052901 |The product in its current status is not available for this operation. Change the product status and try again. | 12052902 |The SKU list is empty. Either omit the list entirely, or provide all required details. | 12052921 |Couldn't edit the inventory quantity because this product shares the inventory with the source shop | 12052990 |The check failed. |
#