This class provides RESTful services to get inventory availability details for products. It performs the service by delegating to the InventoryAvailability BOD service.
com.ibm.commerce.rest.inventory.handler.InventoryHandler
| HTTP Method | Path | Description |
|---|---|---|
| GET | /store/{storeId}/inventoryavailability/{productIds} | Gets inventory details for the specified product by it's identifier (Catalog Entry Id). Multiple product IDs can be passed to the URI separated by a comma (,). |
Gets inventory details for the specified product by it's identifier (Catalog Entry Id). Multiple product IDs can be passed to the URI separated by a comma (,).
getInventoryAvailabilityByProductId
false
true
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| productIds | The product identifiers. Multiple values are separated by commas. Example: /inventoryavailability/10001,10002 | path | string | true | N/A |
| onlineStoreId | The online store identifier. | query | string | false | false |
| physicalStoreId | The physical store identifiers. Multiple values are separated by commas. Example: physicalStoreId=10001,10002 | query | string | false | false |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 404 | If any of the specified product identifiers couldn't be found, or none of the specified online/physical stores exist. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
inventoryavailability-inventoryavailability
GET /wcs/resources/store/10001/inventoryavailability/12837?physicalStoreId=10039%2C10003&onlineStoreId=10001&responseFormat=json
200
{
"InventoryAvailability": [
{
"availableQuantity": "99.0",
"inventoryStatus": "Available",
"onlineStoreId": "10001",
"onlineStoreName": "Aurora",
"productId": "12837",
"unitOfMeasure": "C62"
},
{
"availabilityDateTime": "2015-02-22T20:25:45.474Z",
"availableQuantity": "0.0",
"inventoryStatus": "Backorderable",
"physicalStoreId": "10039",
"physicalStoreName": "Warden Plaza",
"productId": "12837",
"unitOfMeasure": "C62"
},
{
"availabilityDateTime": "2015-02-22T20:25:45.493Z",
"availableQuantity": "0.0",
"inventoryStatus": "Backorderable",
"physicalStoreId": "10003",
"physicalStoreName": "Markham Centre",
"productId": "12837",
"unitOfMeasure": "C62"
}
],
"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/inventoryavailability\/12837?physicalStoreId=10039%2C10003&onlineStoreId=10001&responseFormat=json",
"resourceName": "inventoryavailability"
}
| Name | Data Type | Required |
|---|---|---|
| InventoryAvailability | inventoryavailability-inventoryavailability_item array | false |
| Name | Data Type | Required |
|---|---|---|
| unitOfMeasure | string | false |
| availableQuantity | string | false |
| physicalStoreName | string | false |
| physicalStoreId | string | false |
| userDataField | inventoryavailability-inventoryavailability_item.userDataField array | false |
| availabilityDateTime | string | false |
| onlineStoreName | string | false |
| onlineStoreId | string | false |
| productId | string | false |
| inventoryStatus | string | false |
| Name | Data Type | Required |
|---|---|---|
| value | string | false |
| key | string | true |