Get inventories
const url = 'https://catalog.shopgate.io/v1/merchants/example/inventories?limit=1000&offset=0&omitTotalItemCount=false';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://catalog.shopgate.io/v1/merchants/example/inventories?limit=1000&offset=0&omitTotalItemCount=false'Get inventories for merchant
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Filter string. Supported filters:
- productCode
- locationCode
- sku
- status
- product.name
- product.identifiers.ean
- product.identifiers.upc
- product.identifiers.sku
- product.identifiers.isbn
- product.identifiers.mfgPartNum
- product.identifiers.distiPartNum
The limit of entries of one page
The offset where to start the page
The cursor after which the next entries will be queried; on routes supporting limit/offset and cursor pagination, offset will be ignored when after is set
Omit totalItemCount from meta object
Sorting of the products (sequenceId only works with filter catalogCode)
Fields which should be included in the response. This field is optional. If the field is not set the default fields will be shown: Supported values: qty, identifier
Responses
Section titled “Responses”Returns inventories
object
On routes supporting limit/offset and cursor pagination, offset will be ignored when after is set; however, both fields will always be present in the response
object
A base64 string or null if the result is empty
object
object
Human readable code of the entity
Stock keeping unit
Available stock (onHand - onReserve)
Visible stock in store (available - safetyStock)
Bin. (Location in warehouse)
Bin location.
object
Example
{ "meta": { "cursors": { "after": 16471 }, "limit": 10, "offset": 0, "totalItemCount": 1 }, "inventories": [ { "available": 95, "onHand": 100, "onReserve": 5, "safetyStock": 10, "visible": 85, "status": "active", "externalUpdateDate": "2018-12-15T00:00:23.114Z", "bin": "1203", "binLocation": "1203-4", "locationCode": "DERetail1", "productCode": "jeans-1", "inventoryTreatmentSetting": { "code": "its1", "name": "testName", "isPurchasable": true }, "sku": "54nf444" } ]}Validation error
object
object
object
object
The parameter-field, that failed to validate, like “userId”
The value, that was sent, like “xxx”
Machine readable error code
Human readable error code
object
object
Machine readable error code
Human readable error code
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } }}Merchant not found
object
Example
{ "code": "NotFound", "message": "Merchant not found"}
