This API adjusts the inventory count for a product at a location. It is different from Inventory Refresh because rather than stating the total quantity of the product, this adjustment specifies the amount of change in the form of increments and decrements (+/-). Increments do not require a + sign and may be sent as a simple integer, but decrements must include the – sign. For example, there would be a -2 quantity for an item if there were two fewer than in the previous count, a 2 quantity if there were two more, and a 0 quantity if there were no change.
Note that there are two endpoints that may be used. Each endpoint is associated with a different API key related to a package – either an “Inventory V5” or “Inventory Specific” package. The Inventory Specific package is the preferred endpoint to use, but some implementations may use Inventory V5 depending on their configuration.
In either case, the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoints, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.
V5 Production URL | https://{tenantId}-translation.mozu.com/api/v5/inventory/adjust |
V5 Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/api/v5/inventory/adjust |
Inventory Specific Production URL | https://{tenantId}-translation.mozu.com/inv/api/v5/inventory/adjust/ |
Inventory Specific Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/inv/api/v5/inventory/adjust/ |
Supported Formats | JSON |
HTTP Method | POST |
Example
The example case will adjust an inventory with the following properties:
- Location named “Location 1”
- Product 000-11111-22-A adjusted to a quantity of 0
Required Parameters
Adjusting an order requires:
Parameter | Type | Description |
locationName | string | Store Name for this request. The minimum length is 1. |
items | array | List of items to adjust. |
The items array is built as an object (/[object]) with the following parameters. The quantity and any one of the other parameters except binID are required.
Parameter | Type | Description |
partNumber | string | The product part number. The minimum length is 1. |
upc | string | The product’s Universal Product Code. The minimum length is 1. |
sku | string | The product’s Stock Keeping Unit code. The minimum length is 1. |
binID | integer | The bin location identifier. The minimum value is “1”. |
quantity | integer | The quantity of the product. The minimum value is “0”. |
inventoryLocatorName | string | An identifier to indicate where a particular SKU exists within a location. For example, “Aisle 5” would indicate that the bin this item belongs to is located in Aisle 5. The maximum length is 50. |
The Full Request
This is the entire body of the request that will adjust an inventory by adding 5 to the current stock. If there were 100 in inventory, there will be 105 after this request is processed.
{ "locationName":"Location 1", "items":[ { "partNumber":"testsku120", "sku":"testsku120", "quantity":5 }] }
The Full Response
The response will only return a jobID in the form of an integer.
{ "jobID": 76543210 }