inventoryavailability

This class provides RESTful services to get inventory availability details for products. It performs the service by delegating to the InventoryAvailability BOD service.

Handler Class:

com.ibm.commerce.rest.inventory.handler.InventoryHandler

Method Summary

HTTP MethodPathDescription
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 (,).

Method Details

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 (,).

Handler Method:

getInventoryAvailabilityByProductId

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
productIdsThe product identifiers. Multiple values are separated by commas. Example: /inventoryavailability/10001,10002pathstringtrueN/A
onlineStoreIdThe online store identifier.querystringfalsefalse
physicalStoreIdThe physical store identifiers. Multiple values are separated by commas. Example: physicalStoreId=10001,10002querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404If any of the specified product identifiers couldn't be found, or none of the specified online/physical stores exist.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

inventoryavailability-inventoryavailability


Example

Request:
GET /wcs/resources/store/10001/inventoryavailability/12837?physicalStoreId=10039%2C10003&onlineStoreId=10001&responseFormat=json
HTTP Status Code:

200

Response:
{
	"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"
}

Data Type Details

inventoryavailability-inventoryavailability

Properties:
NameData TypeRequired
InventoryAvailabilityinventoryavailability-inventoryavailability_item arrayfalse

inventoryavailability-inventoryavailability_item

Properties:
NameData TypeRequired
unitOfMeasurestringfalse
availableQuantitystringfalse
physicalStoreNamestringfalse
physicalStoreIdstringfalse
userDataFieldinventoryavailability-inventoryavailability_item.userDataField arrayfalse
availabilityDateTimestringfalse
onlineStoreNamestringfalse
onlineStoreIdstringfalse
productIdstringfalse
inventoryStatusstringfalse

inventoryavailability-inventoryavailability_item.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue