Using stock for eCommerce
As an eCommerce provider it is critical that stock is kept up to date. By using the Imagine Stock Lookup Resource we can lookup this information.
When placing Web Orders this will reserve the stock and update the Item quantityReserved property so when using the stock figures for an eCommerce store it is recommend to calculate the available quantity as quantityOnHand-QuantityReserved.
What you can do with Stock Lookup
The Imagine API lets you do the following with the Stock lookup resource. More detailed versions of these general actions may be available here https://postman.k3imagine.com
- GET /api/v1.0/StockLookup/barcode/{barcode}
Retrieves stock information for a single item by barcode
- GET /api/v1.0/StockLookup/figures?masterItemNo={masterItemNo}
Retrieves stock information for a single item by barcode
- GET /api/v1.0/StockLookup/paged/{after}/{recordsReturned}
Retrieves paginated stock records
Stock Lookup Properties
id READ-ONLY |
"id": 12 A unique order reference number for the order,usually this is the 3rd party order number. |
barcode |
"barcode": "10001" The item main barcode |
locationId |
"locationId": 3 the stock location id |
itemId |
"itemId": 1 The item id |
quantityOnHand |
"quantityOnHand": 110.000 The quantity on hand |
quantityOnPurchaseOrder |
"quantityOnPurchaseOrder": 1.000 The quantity on order |
quantityInTransit * |
"quantityInTransit": 0.000 quantity in transit from other stores |
quantityReserved |
"quantityReserved": 1.000 The quantity reserved to web orders |
quantityOffline |
"quantityOffline": 0.00 The quantity returned that cannot be resold |
defaultSubLocation * |
"defaultSubLocation": "" the default sub location of the item |
minimumQuantity * |
"minimumQuantity": 0.000 Item minimum quantity |
reorderQty |
"reOrderQty": 0.000 Item reorder point |
restockLevel |
"restockLevel": 0.000 Item restock level |
qtyInInspection * |
"qtyInInspection": 0.00 Thequantity in inspection |
lostiInTransit * |
"lostInTransit": 0.000 quantity lost in transit |
locationId * |
"location": null location id |
* properties not currently used in Imagine
Endpoints
Get stock lookup by ean
GET https://publicapi.k3imagine.com/api/v1.0/StockLookup/barcode/10001
Response: 200
Get stock lookup by Master Item No
GET https://publicapi.k3imagine.com/api/v1.0/StockLookup/figures?masterItemNo=10001
Accepts optional parameter:
locationName={ImagineLocationName}
Response: 200
Get all stock lookup paginated
GET https://publicapi.k3imagine.com/api/v1.0/StockLookup/paged/0/5000?shopId=3&excludeOutOfStock=false
Accepts search parameters:
shopId={shopId}
excludeOutOfStock={boolean}
Response: 200