- CategoryAPI
- ProductAPI
- Prices&StocksAPI
- Promos
- PricingStrategyAPI
- WarehouseAPI
- PolygonAPI
- FBS&rFBSMarks
- FBS
- ReturnsAPI
- CancellationAPI
- ChatAPI
- ReportAPI
- AnalyticsAPI
- FinanceAPI
- DeliveryFBS
- DeliveryrFBS
- Pass
- RFBSReturnsAPI
- BetaMethod
- Examples
- ReviewAPI
更新库存商品的数量
POST
/v2/products/stocks
Prices&StocksAPI
price_sent
时,才有可能设置其可用性。offer_id
和 product_id
,系统将优先根据 offer_id
应用更改。为避免歧义,建议仅使用一个参数。请求参数
Header 参数
Client-Id
string
用户识别号。
Api-Key
string
API-密钥。
Body 参数application/json
stocks
array[object (object) {4}]
仓库中商品的信息。
offer_id
string
可选
product_id
integer <int64>
必需
product_id
。stock
integer <int64>
必需
warehouse_id
integer <int64>
必需
示例
{
"stocks": [
{
"offer_id": "PH11042",
"product_id": 313455276,
"stock": 100,
"warehouse_id": 22142605386000
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-seller.ozon.ru/v2/products/stocks' \
--header 'Client-Id;' \
--header 'Api-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"stocks": [
{
"offer_id": "PH11042",
"product_id": 313455276,
"stock": 100,
"warehouse_id": 22142605386000
}
]
}'
返回响应
🟢200成功
application/json
Body
搜索结果。
result
array[object (object) {5}]
可选
errors
array[object (object) {2}]
可选
offer_id
string
可选
product_id
integer <int64>
可选
product_id
。updated
boolean
可选
true
。warehouse_id
integer <int64>
仓库编号。
示例
{
"result": [
{
"warehouse_id": 22142605386000,
"product_id": 118597312,
"offer_id": "PH11042",
"updated": true,
"errors": []
}
]
}
🟠400请求有误
🟠403禁止访问
🟠404记录不存在
🟠409409
🔴500服务器错误
修改于 2025-06-10 08:30:17