Skip to content

Get inventories

GET
/merchants/{merchantCode}/inventories
curl --request GET \
--url 'https://catalog.shopgate.io/v1/merchants/example/inventories?limit=1000&offset=0&omitTotalItemCount=false'

Get inventories for merchant

merchantCode
required
string
<= 255 characters
filters
string format: json

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
limit
integer
default: 1000 >= 1 <= 1000

The limit of entries of one page

offset
integer
0

The offset where to start the page

after
string

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

omitTotalItemCount
boolean

Omit totalItemCount from meta object

sort
string

Sorting of the products (sequenceId only works with filter catalogCode)

fields
string format: csv

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

Returns inventories

Media typeapplication/json
object
meta

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
limit
number
offset
number
cursors

A base64 string or null if the result is empty

object
after
string
totalItemCount
number
inventories
Array<object>
object
productCode

Human readable code of the entity

string
>= 1 characters <= 255 characters
locationCode
string
<= 36 characters
sku

Stock keeping unit

null | string
<= 255 characters
onHand
number
onReserve
number
safetyStock
number
available

Available stock (onHand - onReserve)

number
visible

Visible stock in store (available - safetyStock)

number
bin

Bin. (Location in warehouse)

null | string
<= 100 characters
binLocation

Bin location.

null | string
<= 100 characters
status
string
Allowed values: active inactive
externalUpdateDate
null | string format: date-time
inventoryTreatmentSetting
object
code
required
string
name
required
string
isPurchasable
required
boolean
sequenceId
integer
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

Media typeapplication/json
object
statusCode
number
message
string
code
string
additionalInfo
object
validationErrors
Array<object>
object
code
number
reason
string
entity
string
entityId
string
subentityPath
Array<string | number>
error
object
paramName

The parameter-field, that failed to validate, like “userId”

string
paramValue

The value, that was sent, like “xxx”

null | string | number | array | object
code

Machine readable error code

string
Allowed values: SCHEMA_VALIDATION_FAILED VALIDATION_FAILED ENUM_MISMATCH MAXIMUM MAXIMUM_EXCLUSIVE MINIMUM MINIMUM_EXCLUSIVE MULTIPLE_OF ARRAY_LENGTH_LONG ARRAY_LENGTH_SHORT ARRAY_ADDITIONAL_ITEMS ARRAY_UNIQUE MAX_LENGTH MIN_LENGTH MAX_PROPERTIES MIN_PROPERTIES OBJECT_MISSING_REQUIRED_PROPERTY OBJECT_PROPERTIES_MAXIMUM OBJECT_PROPERTIES_MINIMUM OBJECT_ADDITIONAL_PROPERTIES OBJECT_DEPENDENCY_KEY ONE_OF_MISSING ONE_OF_MULTIPLE NOT_PASSED INVALID_FORMAT INVALID_TYPE UNKNOWN_FORMAT PATTERN
message
required

Human readable error code

string
results
object
errors
Array<object>
object
code

Machine readable error code

string
Allowed values: ENUM_MISMATCH MAXIMUM MAXIMUM_EXCLUSIVE MINIMUM MINIMUM_EXCLUSIVE MULTIPLE_OF ARRAY_LENGTH_LONG ARRAY_LENGTH_SHORT ARRAY_ADDITIONAL_ITEMS ARRAY_UNIQUE MAX_LENGTH MIN_LENGTH MAX_PROPERTIES MIN_PROPERTIES OBJECT_MISSING_REQUIRED_PROPERTY OBJECT_PROPERTIES_MAXIMUM OBJECT_PROPERTIES_MINIMUM OBJECT_ADDITIONAL_PROPERTIES OBJECT_DEPENDENCY_KEY ONE_OF_MISSING ONE_OF_MULTIPLE NOT_PASSED INVALID_FORMAT INVALID_CREDENTIALS INVALID_TYPE UNKNOWN_FORMAT PATTERN
message

Human readable error code

string
description
string
path
Array<string>
warnings
array
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

Media typeapplication/json
object
statusCode
number
code
required
string
message
required
string
Example
{
"code": "NotFound",
"message": "Merchant not found"
}