Get Stock for Multiple Products
POST/inventories/multiple
Returns stock for all products matching the supplied unique identifiers.
Request
- application/json
Body
- Array [
- ]
data object[]
id string
The unique identifier of the product.
Responses
- 200
- 500
Success. Multiple products and their stock values are returned.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
data Inventory[]
id string
The unique identifier of the product.
type stringrequired
Possible values: [stock
]
Default value: stock
The type represents the object being returned. Always stock
.
total integer
The total amount of stock we have.
available integer
The amount of stock available for purchase.
allocated integer
The amount of paid for stock, also known as reserved.
{
"data": [
{
"id": "f976dace-450f-4a5d-8877-d119c5a550a1",
"type": "stock",
"total": 100,
"available": 75,
"allocated": 25
}
]
}
{
"data": [
{
"id": "ebc7652d-bb7d-4359-9a83-78f2998208d9",
"type": "stock",
"total": 100,
"available": 75,
"allocated": 25
},
{
"id": "5334e697-a576-4ac5-8075-ab457dfcaddd",
"type": "stock",
"total": 22,
"available": 18,
"allocated": 4
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors ErrorBody[]required
status intrequired
The HTTP response code of the error.
title stringrequired
A brief summary of the error.
detail string
Optional additional detail about the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred."
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": 500
}
]
}
Loading...