Update Product Local Inventory
PATCH/products/:lookupkey/:key/inventory/local
This endpoint allows updating local inventory data for a product based on a lookup key.
Available fields
Name | Required |
---|---|
quantity (integer) | no |
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.
Inventory will be updated if record is found, matching on: product sku, warehouseId and location. Error is thrown if record can't be found.
Fields warehouseId and location can't be updated, used only to find the correct inventory record.
Request
Path Parameters
Available lookup keys: id, sourceId, sku, supplierCode
Lookup key value
- application/json
Body
usergroup
object
Responses
- 200
- 404
Update Product Local Inventory - 200 / Update Product Local Inventory for a usergroup - 200
Response Headers
Connection
string
Content-Length
string
Date
string
Keep-Alive
string
Return-Format
string
- application/json
- Schema
- Example (from schema)
- Update Product Local Inventory - 200
- Update Product Local Inventory for a usergroup - 200
Schema
data
object
{
"data": {
"companyId": 0,
"costPrice": 11.31,
"dateModified": "2022-03-11T10:46:50",
"id": 16162,
"location": "L5",
"nextDeliveryDate": "2022-02-15T00:00:00",
"notes": "",
"productId": 38952,
"quantity": 3,
"sku": "AA 0635613",
"supplier": "INTERN",
"supplierCode": "AA 0635613",
"usergroupId": 0,
"warehouseId": 4
},
"messages": [
"Inventory updated"
],
"total": 1
}
{
"data": {
"companyId": 0,
"costPrice": 11.31,
"dateModified": "2022-03-11T10:46:50",
"id": 16162,
"location": "L5",
"nextDeliveryDate": "2022-02-15T00:00:00",
"notes": "",
"productId": 38952,
"quantity": 3,
"sku": "AA 0635613",
"supplier": "INTERN",
"supplierCode": "AA 0635613",
"usergroupId": 0,
"warehouseId": 4
},
"messages": [
"Inventory updated"
],
"total": 1
}
{
"data": {
"companyId": 0,
"costPrice": 11.31,
"dateModified": "2023-10-02T16:05:26",
"id": 16148,
"location": "L5",
"nextDeliveryDate": "2022-02-15T00:00:00",
"notes": "",
"productId": 227235,
"quantity": 3,
"sku": "9789006953374",
"supplier": "INTERN",
"supplierCode": "",
"usergroupId": 143,
"warehouseId": 0
},
"messages": [
"Inventory updated"
],
"total": 1
}
Update Product Local Inventory - 404 / Update Product Local 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)
- Update Product Local 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": 13006,
"messages": [
"Inventory record not found"
],
"moreInfo": "https://www.propel.us/docs/errors/13006",
"status": 404,
"type": "InventoryNotFound"
}
}