Updating Inventory
Flow for registered Flipkart sellers to manage inventory
This call updates listing’s inventory against the specified SKUs. If the SKU doesn’t exist in the system, then an error will be returned against the SKU. The values that the listing attributes can take can change with time and selling constructs. It is recommended to explicitly handle errors and warnings returned by this API.
Request - v3 API
POST https://api.flipkart.net/listings/v3/update/inventory
Request Body Schema (v3)
const location = {
type: "object",
properties: {
id: { type: "string" },
status: { type: "string", enum: [ ENABLED, DISABLED ] },
inventory: { type: "integer($int32)" },
pending_inventory: { type: "integer($int32)" },
},
required: ["id", "status"],
}
const UpdateInventoryRequest = {
type: "object",
properties: {
product_id: { type: "string" },
locations: { type: "array", items: location },
},
required: ["product_id", "locations"],
}
const body = {
type: "object",
properties: {
randonSKUId: UpdateInventoryRequest,
},
required: ["randonSKUId"],
}
Request Body Example (v3)
{
"AN1004_RED_YELLOW": {
"product_id": "UMBF5D4DEAFDEWSG",
"locations": [
{
"id": "LOCbba44916f16b474da588ed9b28768c43",
"status": "ENABLED",
"inventory": 49,
"pending_inventory": 0,
},
]
}
}
Response Body Schema (v3)
const obj = {
type: "object",
properties: {
status: { type: "string", enum: [ SUCCESS, FAILURE, WARNING ] },
},
required: ["status"],
}
const body = {
type: "object",
properties: {
randonSKUId: obj,
},
}
Success Response Example (v3)
// status: 200
{
"shipments": [
{
"shipmentId": "df3d0605-06ef-4602-aacb-64f653e2e048",
"status": "SUCCESS"
}
]
}
Possible Error Response Codes (v3)
Error Codes | Reason for Error |
---|---|
400 | Bad request |
401 | Client unauthorized |
500 | Internal Server Error |
Edit this page on GitHub
Updated at Tue, Sep 6, 2022