Skip to main content
All CollectionsEMERGE API
EMERGE API: Product Inventory
EMERGE API: Product Inventory
Gigi Nguyen avatar
Written by Gigi Nguyen
Updated over a week ago

Real-time data on instock and available quantities for each product, broken down by location, section and batch

A. Endpoints

GET: {APIhost}/ProductInventory
Headers: x-emerge-api-key: [Your API Key]

C# example

using (var client = new HttpClient())
{
client.BaseAddress = new Uri("https://yourapi.com/");
client.DefaultRequestHeaders.Add("x-emerge-api-key", "YOUR_API_KEY");
// Get or Post Request
var response = client.GetAsync("ProductInventory").Result;
}

Java example

import requests

headers = {
'x-emerge-api-key': 'YOUR_API_KEY'
}
response = requests.get('https://yourapi.com/ProductInventory', headers=headers)

Java example

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() 
.uri(URI.create("http://exampleURL.com/aFile"));
requestBuilder.header("xxxx","yyyyy");
HttpRequest request = requestBuilder.build();

Object data example

[
{
"productId": 655,
"productType": 0,
"totalQtyInstock": 700.99,
"isBatchItem": true,
"availabilityExcludePO": 700.99,
"availabilityIncludePO": 707.99,
"warehousesInStock": [
{
"warehouseId": 9,
"warehouseName": "Main Distribution Center",
"qtyInstock": 500.00,
"warehouseSectionsInStock": [
{
"warehouseSectionId": 35,
"warehouseSectionName": "Aisle 3 - Shelf B",
"qtyInstock": 500.00,
"batchesInstock": [
{
"productBatchId": 337,
"productBatchName": "Summer 2024 Batch",
"productBatchCode": "S24B0215",
"qtyInStock": 500.00
}
]
}
]
},
{
"warehouseId": 10,
"warehouseName": "Online Store Location",
"qtyInstock": 100.99,
"warehouseSectionsInStock": [
{
"warehouseSectionId": 36,
"warehouseSectionName": "Digital Shelf 1",
"qtyInstock": 100.99,
"batchesInstock": [
{
"productBatchId": 336,
"productBatchName": "Spring 2024 Batch",
"productBatchCode": "SP24B00214",
"qtyInStock": 100.99
}
]
}
]
},
{
"warehouseId": 11,
"warehouseName": "Quality Check - Hold",
"qtyInstock": 100.00,
"warehouseSectionsInStock": [
{
"warehouseSectionId": 37,
"warehouseSectionName": "QC Hold Area",
"qtyInstock": 100.00,
"batchesInstock": [
{
"productBatchId": 338,
"productBatchName": "Winter 2023 Batch",
"productBatchCode": "W23B0216",
"qtyInStock": 100.00
}
]
}
]
}
]
}
]

B. Params

1. IDs

  • Data type: Int[]

  • Description: An array of integer IDs that represents a list of specific sales order ID to be included in the search.

C. Attributes

1. productId

  • Data type: int

  • Description: Unique identifier for the product

2. productType

  • Data type: int

  • Description: Unique identifier for the product

3. totalQtyInstock

  • Data type: decimal

  • Description: Instock quantity of the products in all locations

4. isBatchItem

  • Data type: boolean

  • Description: If = true then product has batch. If = fales then product doesn't have batch

5. availabilityExcludePO

  • Data type: decimal

  • Description: Available quantity (instock quantity - Sales Order quantity) exclude PO quantity in all locations

6. availabilityIncludePO

  • Data type: decimal

  • Description: Available quantity (instock quantity - Sales Order quantity) include PO quantity in all locations

7. warehousesInStock

warehouseId

  • Data type: int

  • Description: Identification of the location

warehouseName

  • Data type: string

  • Description: Location name

qtyInstock

  • Data type: string

  • Description: Instock quantity of the product in a specific location

warehouseSectionsInStock

  • Data type: array

  • Description: Instock quantity of the product in a specific section

8. batchesInstock

productBatchId

  • Data type: int

  • Description: Identification of the batch

productBatchName

  • Data type: string

  • Description: Batch name

productBatchCode

  • Data type: string

  • Description: Batch code

qtyInStock

  • Data type: string

  • Description: Instock quantity of the product in a specific batch

Did this answer your question?