Skip to content

Update Inventory

POST
/product/202309/products/{product_id}/inventory/update

Update the inventory quantity of SKUs belonging to a product. The product must be in DRAFT, PENDING, FAILED, ACTIVATE, or SELLER_DEACTIVATED status.

product_id
required
string

The product ID generated by TikTok Shop.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

Media typeapplication/json
object
skus
required

A list of Stock Keeping Units (SKUs) used to identify distinct variants of the product.

Array<object>
object
id
required

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 FREEZE or DELETED status.
  • If you are updating multiple SKUs, all the SKU IDs must belong to the same product.
string
inventory
required

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.

Array<object>
object
warehouse_id

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.

string
quantity
required

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.

integer format: int64
>= 1 <= 99999
backorder_quantity

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_quantity and handling_time together.
  • If backorder_quantity is omitted, the existing backorder quantity remains unchanged.
integer format: int64
handling_time

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.

integer format: int64
Example
{
"skus": [
{
"id": "1729592969712207013",
"inventory": [
{
"warehouse_id": "7068517275539719942",
"quantity": 999,
"backorder_quantity": 888,
"handling_time": 5
}
]
}
]
}

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
errors

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.

Array<object>
object
code

The main error code.

integer format: int64
message

The main error message.

string
detail

The details of the main error.

object
sku_id

The ID of the SKU where the error occurred.

string
extra_errors

A list of secondary errors or issues related to the main error.

Array<object>
object
warehouse_id

The ID of the warehouse where the error occurred.

string
code

The secondary error code.

integer format: int64
message

The secondary error message.

string
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"
}