Returns the inventory levels that match the given filters.

POST /inventory/inventory-levels/search

Group: Inventory › Inventory Levels · Operation ID: searchInventoryLevels

The same fields come back here as from GET inventory/inventory-levels/:id and GET inventory/inventory-levels. An itemId or locationId that matches no record returns an empty page rather than an error.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.

Request body

Required, application/json: searchInventoryLevelsInput.

Field Type Required Description
filters object yes The filters to apply. A level must match every filter you send. Omit to return all inventory levels.
filters.itemId string no Limits results to levels for the item with this identifier. An identifier that matches no item returns an empty page. See id on GET inventory/items/:id.
filters.locationId string no Limits results to levels at the location with this identifier. Combine with itemId to identify at most one level. An identifier that matches no location returns an empty page. See id on GET inventory/warehouses/:id.
filters.modifiedSince string (date-time) no Limits results to levels with lastModifiedDate at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
page object no Pagination controls. Omit for the first page.
page.cursor string no The cursor from the previous response's pagination.nextCursor. Omit on the first request.
page.size number no The maximum number of inventory levels to return. Defaults to 50. A value above 200 is treated as 200, not rejected.

Example:

{
  "filters": {
    "itemId": "5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"
  },
  "page": {
    "size": 50
  }
}

Response

200 Success

Under data (searchInventoryLevelsOutput):

Field Type Required Description
items array of object yes The inventory levels that match, ordered by id. An empty array when nothing matches.
items[].id string yes The unique identifier for the inventory level.
items[].itemId string yes The unique identifier for the item this level is for. See id on GET inventory/items/:id.
items[].itemCode string no The item's short code.
items[].itemName string no The item's name.
items[].locationId string yes The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id.
items[].locationCode string no The location's short code.
items[].locationName string no The location's name.
items[].onHandQuantity string (decimal) no The total physical quantity on hand at this location, in the item's stocking unit of measure.
items[].availableQuantity string (decimal) yes The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity.
items[].allocatedQuantity string (decimal) no The quantity allocated to outbound demand.
items[].reservedQuantity string (decimal) no The quantity reserved.
items[].inTransitQuantity string (decimal) no The quantity in transit to this location.
items[].damagedQuantity string (decimal) no The quantity flagged as damaged.
items[].qualityHoldQuantity string (decimal) no The quantity on quality hold.
items[].averageCost string (decimal) no The moving-average unit cost, in the currency given by currency.
items[].onHandValue string (decimal) no The value of the stock on hand, in the currency given by currency.
items[].currency string no The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet.
items[].lastTransactionTimestamp string (date-time) no The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves.
items[].lastModifiedDate string (date-time) no The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
pagination object yes The pagination cursor for this page.
pagination.nextCursor string no The cursor for the next page. Pass it as page.cursor. Absent on the last page.
pagination.hasMore boolean yes True when more matches remain beyond this page.

Statuses