Skip to content

Reserve inventory

POST
/merchants/{merchantCode}/reservations
curl --request POST \
--url https://catalog.shopgate.io/v1/merchants/example/reservations \
--header 'Content-Type: application/json' \
--data '{ "reservations": [ { "productCode": "productCode1", "locationCode": "DERetail1", "sku": "SKU-1", "salesOrderLineItemCode": "someCode", "fulfillmentOrderLineItemId": 1, "salesOrderNumber": "someCode", "fulfillmentOrderNumber": "someCode", "bin": "1203", "binLocation": "1203-4", "quantity": 1 } ] }'

Reserve inventory for multiple products

Note: The location has to be set up first.

merchantCode
required
string
<= 255 characters
Media typeapplication/json
object
reservations
required
Array<object>
object
productCode
required
string
<= 255 characters
Example
productCode1
locationCode
required
string
<= 36 characters
Example
DERetail1
sku
required
null | string
<= 255 characters
Example
SKU-1
salesOrderLineItemCode
required
string
<= 100 characters
Example
someCode
fulfillmentOrderLineItemId
number
<= 20 characters
Example
1
salesOrderNumber
required
string
Example
someCode
fulfillmentOrderNumber
string
Example
someCode
bin

Bin. (Location in warehouse)

null | string
<= 100 characters
Example
1203
binLocation

Bin location.

null | string
<= 100 characters
Example
1203-4
quantity
required
number
Example
1

Successfully created

Media typeapplication/json
object
codes
Array<string>
errors
Array<object>
object
code
number
entity
string
entityId
string | object
entityIndex
integer
reason
string
catalogCode
string
subentityPath
Array<string | number>
validationErrors
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>
Example
{
"codes": [
"someCode"
],
"errors": [
{
"catalogCode": "catalog1",
"code": 400,
"entity": "planet",
"entityId": "pluto",
"entityIndex": 9,
"reason": "Planet pluto was not found (did you mean dwarf planet pluto?)",
"subentityPath": [
"sunSystem",
"bodies"
],
"validationErrors": [
{
"code": "MAX_LENGTH",
"description": "Property Name is too long",
"message": "Name too long",
"path": [
"name"
]
}
]
},
{
"catalogCode": "catalog1",
"code": 400,
"entity": "planet",
"entityId": "jupiter",
"entityIndex": 5,
"reason": "The planet is too big",
"subentityPath": [
"sunSystem",
"bodies"
],
"validationErrors": [
{
"code": "MAX_LENGTH",
"description": "Property Name is too long",
"message": "Name too long",
"path": [
"name"
]
}
]
}
]
}

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, location or inventory not found

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

Reservation already exists

Media typeapplication/json
object
statusCode
number
code

Machine readable error code

string
message
required

Human readable error code

string
Examplegenerated
{
"statusCode": 1,
"code": "example",
"message": "example"
}