Bulk Inventory by lookup key / inventory type
POST/inventory/bulk/:lookupKey/:inventoryType
The bulk inventory endpoint is used to create or update inventory records. The products can be identified based on one of their lookup keys. The inventory record type can be either local
or supplier
.
When looking up an inventory record, the matching fields are: lookupKey
, warehouseId
and location
. If a record already exists it will be updated, otherwise a new record is created.
Available fields
Name | Required |
---|---|
quantity (integer) | yes |
sku (string) | only when lookup key is sku |
supplierCode (string) | only when lookup key is supplierCode |
supplier (string) | only when lookup key is supplierCode |
id (integer) | only when lookup key is id |
sourceId (string) | only when lookup key is sourceId |
source (string) | only when lookup key is sourceId |
language (string) | only when lookup key is sourceId |
warehouseId (integer) | no Default value is 0 |
company (InventoryCompanyUsergroupResource) | no |
usergroup (InventoryCompanyUsergroupResource) | no |
location (string) | no Default value is empty |
costPrice (integer) | no Default value is product costprice |
nextDeliveryDate (date) | no |
notes (string) | no |
dateModified
is always updated with the current date and time.
Request
Path Parameters
Lookup key. Read more about product lookup keys
Inventory type. local
or supplier
- application/json
Body
Array [
]
inventory
object[]
company
object
usergroup
object
Responses
- 200
- 400
Bulk supplier inventory by source id - 200 / Bulk local inventory by sourceId - 200 / Bulk supplier inventory by supplier code - 200 / Bulk local inventory by sku - 200 / Bulk local inventory by Id - 200 / Bulk supplier inventory by source id for company and usergroup - 200 / Bulk supplier inventory by source id for company and non existing usergroup - 200
Response Headers
Connection
string
Content-Length
string
Date
string
Keep-Alive
string
Return-Format
string
- application/json
- Schema
- Example (from schema)
- Bulk local inventory by Id - 200
- Bulk local inventory by sku - 200
- Bulk local inventory by sourceId - 200
- Bulk supplier inventory by source id - 200
- Bulk supplier inventory by source id for company and non existing usergroup - 200
- Bulk supplier inventory by source id for company and usergroup - 200
- Bulk supplier inventory by supplier code - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "update",
"id": 16134,
"success": true
},
{
"action": "update",
"id": 16135,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "update",
"id": 16131,
"success": true
},
{
"action": "create",
"id": 16138,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "update",
"id": 16131,
"success": true
},
{
"action": "update",
"id": 16132,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "create",
"id": 16136,
"success": true
},
{
"action": "create",
"id": 16137,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "update",
"id": 16134,
"success": true
},
{
"action": "update",
"id": 16135,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "create",
"message": "Usergroup with id [143111] not found",
"success": false
},
{
"action": "update",
"id": 16139,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "update",
"id": 16141,
"success": true
},
{
"action": "update",
"id": 16139,
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "create",
"message": "Product with supplierCode [757540] not found",
"success": false
},
{
"action": "update",
"id": 16125,
"success": true
},
{
"action": "update",
"id": 16126,
"success": true
}
],
"messages": [
"Completed"
],
"total": 3
}
Bulk supplier inventory by source id - 400 (invalid inventory type) / Bulk supplier inventory by sourceId - 400 (invalid lookup key)
Response Headers
Connection
string
Content-Length
string
Date
string
Return-Format
string
- application/json
- Schema
- Example (from schema)
- Bulk supplier inventory by source id - 400 (invalid inventory type)
- Bulk supplier inventory by sourceId - 400 (invalid lookup key)
Schema
error
object
{
"error": {
"code": 13007,
"messages": [
"Invalid inventory type [suppliers], type must contain one of the following values: [local,supplier]"
],
"moreInfo": "https://www.propel.us/docs/errors/13007",
"status": 400,
"type": "InvalidInventoryType"
}
}
{
"error": {
"code": 13007,
"messages": [
"Invalid inventory type [suppliers], type must contain one of the following values: [local,supplier]"
],
"moreInfo": "https://www.propel.us/docs/errors/13007",
"status": 400,
"type": "InvalidInventoryType"
}
}
{
"error": {
"code": 10006,
"messages": [
"Invalid lookup key [sourceIds], key must contain one of the following values: [id,sourceId,sku,suppliercode]"
],
"moreInfo": "https://www.propel.us/docs/errors/10006",
"status": 400,
"type": "InvalidLookupKey"
}
}