Product Availability GET
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/warehouse-service/product-availability/{PRODUCT-ID-SET}
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Returns the product availability for the given
The return of the method is a list of product IDs with the following information given for each product:
- A summary giving the total product availability across all warehouses
- A breakdown of availability for each warehouse that currently contains the product
You may retreive additional information by adding a query parameter to the uri (includeOptional) that can take one or more of the following values:
- breakDownByLocation - Adds a list of summaries for each Location within the Warehouse(s) where the product(s) is situated.
-
allocatedOrders - Lists
Sales Orders on which the product is allocated. For each sales order the Goods Notes associated with the product are listed. -
allocatedTransfers - Lists
Stock Transfers on which the product is allocated. For each stock transfer the Goods Notes associated with the product are listed.
- /product-availability/1006-1008,1111/?includeOptional=breakDownByLocation,allocatedOrders,allocatedTransfers,onOrder
- /product-availability/1006-1008,1111/?includeOptional=breakDownByLocation
- /product-availability/1006-1008,1111/?includeOptional=allocatedOrders
- /product-availability/1006-1008,1111/?includeOptional=allocatedTransfers
- /product-availability/1006-1008,1111/?includeOptional=onOrder
Note: This message is only applicable to stock tracked products. If an ID-SET contains the ID of a non stock tracked product that ID will be ignored.
Example 1
Request URI
/product-availability/1007
Request body
{
}
Response
{
"response": {
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 2
},
"warehouses": {
"2": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 0
},
"3": {
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 2
}
}
}
}
}
Example 2
Request URI
/product-availability/1007,1008
Request body
{
}
Response
{
"response": {
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 2
},
"warehouses": {
"2": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 0
},
"3": {
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 2
}
}
},
"1008": {
"total": {
"inStock": 0,
"onHand": 0,
"allocated": 0,
"inTransit": 0
},
"warehouses": {
}
}
}
}
Example 3
Request URI
/product-availability/1007?includeOptional=breakDownByLocation
Request body
{
}
Response
{
"response": {
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 5
},
"warehouses": {
"2": {
"byLocation": {
"6": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 2
}
},
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 2
},
"3": {
"byLocation": {
"7": {
"inStock": 2,
"onHand": 2,
"allocated": 0,
"inTransit": 1
},
"8": {
"inStock": 5,
"onHand": 5,
"allocated": 0,
"inTransit": 2
}
},
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 3
}
}
}
}
}
Example 4
Request URI
/product-availability/1007?includeOptional=onOrder
Request body
{
}
Response
{
"response": {
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 2,
"onOrder": {
"total": 75,
"shipped": 30
}
},
"warehouses": {
"2": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 0,
"onOrder": {
"total": 50,
"shipped": 10
}
},
"3": {
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 2,
"onOrder": {
"total": 25,
"shipped": 20
}
}
}
}
}
}
Example 5
Request URI
/product-availability/1007?includeOptional=allocatedOrders
Request body
{
}
Response
{
"response": {
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 2
},
"warehouses": {
"2": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 0
},
"3": {
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 2
}
},
"allocatedToOrders": {
"25": [
{
"id": 3,
"typeCode": "RV"
}
]
}
}
}
}
Example 6
Request URI
/product-availability/1007?includeOptional=allocatedTransfers
Request body
{
}
Response
{
"response": {
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 2
},
"warehouses": {
"2": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 0
},
"3": {
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 2
}
},
"allocatedToTransfers": {
"5": [
{
"id": 27,
"typeCode": "GO"
}
]
}
}
}
}
Example 7
Request URI
/product-availability/1006-1008,1111/?includeOptional=breakDownByLocation,allocatedOrders
Request body
{
}
Response
{
"response": {
"1006": {
"total": {
"inStock": 0,
"onHand": 0,
"allocated": 0,
"inTransit": 0
},
"warehouses": {
}
},
"1007": {
"total": {
"inStock": 10,
"onHand": 9,
"allocated": 1,
"inTransit": 4
},
"warehouses": {
"2": {
"byLocation": {
"6": {
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 2
}
},
"inStock": 3,
"onHand": 2,
"allocated": 1,
"inTransit": 2
},
"3": {
"byLocation": {
"7": {
"inStock": 2,
"onHand": 2,
"allocated": 0,
"inTransit": 1
},
"8": {
"inStock": 5,
"onHand": 5,
"allocated": 0,
"inTransit": 1
}
},
"inStock": 7,
"onHand": 7,
"allocated": 0,
"inTransit": 2
}
},
"allocatedToOrders": {
"25": [
{
"id": 3,
"typeCode": "RV"
}
]
}
},
"1008": {
"total": {
"inStock": 0,
"onHand": 0,
"allocated": 0,
"inTransit": 0
},
"warehouses": {
}
},
"1111": {
"total": {
"inStock": 0,
"onHand": 0,
"allocated": 0,
"inTransit": 0
},
"warehouses": {
}
}
}
}