Skip to content

Get product inventories

POST
/merchants/{merchantCode}/productInventories
curl --request POST \
--url https://catalog.shopgate.io/v1/merchants/example/productInventories \
--header 'Content-Type: application/json' \
--data '[ { "productCode": "someProductCode", "locationCode": "LOCATION123" } ]'

This endpoint returns the inventories for the given product and location combination. It can be used to revalidate cart actions or to indicates stock changes in the cart.

The location can be null in order to get the cumulated inventory for this product.

Note: The location has to be set up first.

merchantCode
required
string
<= 255 characters
Media typeapplication/json
Array<object>
object
productCode
required

Code of the product

string
Example
someProductCode
locationCode

Code of the location, can be null in order to get the cumulated inventory for this product.

null | string
Example
LOCATION123

OK

Media typeapplication/json
object
productInventories
Array<object>
object
productCode

Code of the product

string
locationCode

Code of the location

string
inventoryTreatmentSetting
object
code
required
string
name
required
string
isPurchasable
required
boolean
sequenceId
integer
isAvailable

This field indicates if a product is available or not. It combines all information of the inventory managment and the flags on the product

boolean
available

Available stock for this location

number
visible

Visible stock for this location

number
Example
{
"productInventories": [
{
"productCode": "jeans-1",
"locationCode": "LOCATION123",
"inventoryTreatmentSetting": {
"code": "its1",
"name": "testName",
"isPurchasable": true
},
"isAvailable": true,
"available": 10,
"visible": 5
}
]
}