同步库存
同步库存
使用限制
无
接口说明
无
基本信息
HTTP URL | https://open.douyin.com/life/goods/stock/sync/ | |||
HTTP Method | POST | |||
Scope |
| |||
权限要求 |
|
请求头
参数 | 描述 | 必须 |
Content-Type | application/json | 是 |
请求 Query 参数
参数名称 | 参数类型 | 是否必传 | 参数描述 |
access_token | string | TRUE | 调用/oauth/client_token/生成的token,此token不需要用户授权。 |
请求 Body 参数
参数名称 | 参数类型 | 是否必传 | 参数描述 |
product_id | string | TRUE | 商品id(若有第三方id可不传) |
out_id | string | TRUE | 商品第三方id |
stock | StockStruct | TRUE | 库存信息 |
- limit_type | int | TRUE | 库存上限类型,为2时stock_qty和avail_qty字段无意义 1-有限库存 2-无限库存 |
- stock_qty | int | TRUE | 总库存,limit_type=2时无意义 |
请求 cURL 示例
curl --location --request POST 'https://open.douyin.com/life/goods/stock/sync/?access_token=clt.39b7626b0b59fd8dacf9979ddcd4f532wIbkKJ8NIDKeANyibUlKvAk1Ryi5' \ --header 'Content-Type: application/json' \ --header 'Cookie: passport_csrf_token=c668eb94b8bbe65a0b452466d06e329b; passport_csrf_token_default=c668eb94b8bbe65a0b452466d06e329b' \ --data-raw '{ "out_id": "hch-life-0314-yry01", "stock":{ "limit_type":2, "avail_qty":88 } }'
响应 Body 参数
参数名称 | 参数类型 | 是否必传 | 参数描述 |
base | struct | TRUE | 公共参数 |
- log_id | string | TRUE | 请求日志ID |
- gateway_code | int | TRUE | 网关状态码 |
- gateway_msg | string | TRUE | 网关状态信息 |
- biz_code | int | TRUE | 业务状态码 |
- biz_msg | string | TRUE | 业务状态信息 |