Update the inventory quantity of SKUs belonging to a product. The product must be in DRAFT, PENDING, FAILED, ACTIVATE, or SELLER_DEACTIVATED status.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The product ID generated by TikTok Shop.
Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Bodyrequired
Section titled “Request Bodyrequired”object
A list of Stock Keeping Units (SKUs) used to identify distinct variants of the product.
object
The 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
FREEZEorDELETEDstatus. - If you are updating multiple SKUs, all the SKU IDs must belong to the same product.
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.
object
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.
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.
The backorder_quantity is automatically converted to quantity when in-stock inventory is sold out. Its fulfillment follows the specified handling_time.
Note:
- Provide
backorder_quantityandhandling_timetogether. - If
backorder_quantityis omitted, the existing backorder quantity remains unchanged.
The estimated number of working days needed for a backorder to be shipped. Provide handling_time and backorder_quantity together. All warehouses for the same SKU must use the same handling_time.
Example
{ "skus": [ { "id": "1729592969712207013", "inventory": [ { "warehouse_id": "7068517275539719942", "quantity": 999, "backorder_quantity": 888, "handling_time": 5 } ] } ]}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
Inventory update errors for individual SKU and warehouse combinations. A successful top-level response can still include this list when individual updates fail, so inspect it before treating all updates as successful.
object
The main error code.
The main error message.
The details of the main error.
object
The ID of the SKU where the error occurred.
A list of secondary errors or issues related to the main error.
object
The ID of the warehouse where the error occurred.
The secondary error code.
The secondary error message.
Example
{ "code": 0, "data": { "errors": [ { "code": 12052990, "message": "Batch update inventory error.", "detail": { "sku_id": "1729592969712207013", "extra_errors": [ { "warehouse_id": "7068517275539719942", "code": 12052097, "message": "The warehouse does not exist" } ] } } ] }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}