Get Inventory Quantities

You can use a REST API to get the quantity that is currently on hand for an item in inventory for a warehouse. For example, assume you create a solution that allows your customers to use a mobile client to connect to your partner application. The customer is a field technician who services high-end display monitors, and must determine whether or not video card VC110 is available in inventory in Warehouse M1. The user enters Warehouse M1 and inventory item number VC110 into fields in your application client. Your application then uses the Available Quantity Details resource to get the inventory quantity for the warehouse in the primary unit of measure, and then displays this quantity to the technician.

Flow that this example uses

Here's a typical application processing flow for the scenario:

  1. You send a request payload to determine the quantity this is currently available for item VC110.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the value of the QuantityOnhand attribute from the response payload, and then displays this value in your partner client.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/availableQuantityDetails"

Example Request

Here's an example of the request body in JSON format.

{
	"OrganizationCode" : "M1",
	"ItemNumber" : "VC110"
}

Example Response

Here's an example of the response body in JSON format.

{
	"OrganizationCode": "M1",
	"ItemNumber": "VC110",
	"PrimaryUnitOfMeasure": "Each",
	"QuantityOnhand": 2,
	"ReturnStatus": "SUCCESS",
	"ReturnMessageName": null,
	"ReturnMessageText": null,
	"links": [
	{
		"rel": "self",
		"href": "https://servername/fscmRestApi/resources/version/availableQuantityDetails/99999",
		"name": "availableQuantityDetails",
		"kind": "item"
	},
	{
		"rel": "canonical",
		"href": "https://servername/fscmRestApi/resources/version/availableQuantityDetails/99999",
		"name": "availableQuantityDetails",
		"kind": "item"
	}
	]
}