Create Product Supplier Inventory
POST/products/:lookupkey/:key/inventory/supplier
This endpoint allows creating supplier inventory data for a product based on a lookup key.
Available fields
Name | Required |
---|---|
quantity (integer) | yes |
supplier (string) | no Default value is product supplier |
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.
On creating a record, inventory type supplier is matching the product on the lookup key. If the product is found, inventory record will be created.
If an inventory record is found, matching on: supplier, supplierCode, warehouseId and location, error is thrown that duplicate record can't be created.
InventoryCompanyUsergroup Resource
A InventoryCompanyUsergroup
resource is a JSON object used for identifying a company or usergroup when creating company/ usergroup specific stock record. It can be identified by either an id or source/ sourceId.
{
"id": 56987
}
"sourceId": "1",
"source": "TECHDATA",
"language": "NL"
}
Request
Path Parameters
Available lookup keys: id, sourceId, sku, supplierCode
Lookup key value
- application/json
Body
usergroup
object
Responses
- 201
- 400
- 404
Create Product Supplier Inventory - 201 / Create Product Supplier Inventory for a usergroup - 201
Response Headers
Connection
string
Content-Length
string
Date
string
Keep-Alive
string
Return-Format
string
- application/json
- Schema
- Example (from schema)
- Create Product Supplier Inventory - 201
- Create Product Supplier Inventory for a usergroup - 201
Schema
data
object
{
"data": {
"companyId": 0,
"costPrice": 11.31,
"dateModified": "2022-03-11T11:06:39",
"id": 16195,
"location": "L5",
"nextDeliveryDate": "2022-02-20T00:00:00",
"notes": "",
"productId": 38952,
"quantity": 16,
"sku": "AA 0635613",
"supplier": "KERRIDGE",
"supplierCode": "AA 0635613",
"usergroupId": 0,
"warehouseId": 4
},
"messages": [
"Inventory created"
],
"total": 1
}
{
"data": {
"companyId": 0,
"costPrice": 11.31,
"dateModified": "2022-03-11T11:06:39",
"id": 16195,
"location": "L5",
"nextDeliveryDate": "2022-02-20T00:00:00",
"notes": "",
"productId": 38952,
"quantity": 16,
"sku": "AA 0635613",
"supplier": "KERRIDGE",
"supplierCode": "AA 0635613",
"usergroupId": 0,
"warehouseId": 4
},
"messages": [
"Inventory created"
],
"total": 1
}
{
"data": {
"companyId": 0,
"costPrice": 11.31,
"dateModified": "2023-10-02T15:03:49",
"id": 16146,
"location": "L5",
"nextDeliveryDate": "2022-02-20T00:00:00",
"notes": "",
"productId": 227235,
"quantity": 16,
"sku": "9789006953374",
"supplier": "KERRIDGE",
"supplierCode": "",
"usergroupId": 143,
"warehouseId": 0
},
"messages": [
"Inventory created"
],
"total": 1
}
Create Product Supplier Inventory - 400
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Product Supplier Inventory - 400
Schema
error
object
{
"error": {
"code": 13004,
"messages": [
"Inventory already exists"
],
"moreInfo": "https://www.propel.us/docs/errors/13004",
"status": 400,
"type": "InventoryExists"
}
}
{
"error": {
"code": 13004,
"messages": [
"Inventory already exists"
],
"moreInfo": "https://www.propel.us/docs/errors/13004",
"status": 400,
"type": "InventoryExists"
}
}
Create Product Supplier Inventory - 404
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Product Supplier Inventory - 404
Schema
error
object
{
"error": {
"code": 80006,
"messages": [
"Product with id [98952] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/80006",
"status": 404,
"type": "ProductNotFound"
}
}
{
"error": {
"code": 80006,
"messages": [
"Product with id [98952] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/80006",
"status": 404,
"type": "ProductNotFound"
}
}