Returns the item types that match the given filters.

POST /inventory/item-types/search

Group: Inventory › Item Types · Operation ID: searchItemTypes

Every criterion is exact and criteria combine with AND. Send an empty filters object to return every item type.

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: searchItemTypesInput.

Field Type Required Description
filters object yes The filters to apply. An item type must match every filter you send. Send an empty object to return all item types.
filters.name string no Limits results to the item type with this name. The match is exact. Names are unique, so this matches at most one item type.
filters.procurable boolean no Limits results to item types with the given procurable value.
filters.stockable boolean no Limits results to item types with the given stockable value.
filters.active boolean no Limits results to item types with the given active value.
filters.modifiedSince string (date-time) no Limits results to item types changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ.
page object no The pagination controls. Omit for the first page.
page.cursor string no The cursor from the previous response's pagination.nextCursor. Omit for the first page.
page.size number no The number of item types per page. Defaults to 50. A value above 200 is treated as 200, not rejected.

Example:

{
  "filters": {
    "stockable": false
  },
  "page": {
    "cursor": "<cursor>",
    "size": 0
  }
}

Response

200 Success

Under data (searchItemTypesOutput):

Field Type Required Description
items array of object yes The item types on this page, oldest first. An empty array when nothing matches.
items[].id string yes The unique identifier for the item type.
items[].name string no The display name of the item type, for example 'Stocked good'. Two item types cannot share a name.
items[].description string no A free-form description of the item type.
items[].procurable boolean no Whether items of this type can appear on purchase documents.
items[].stockable boolean no Whether items of this type hold stock.
items[].active boolean no Whether the item type can be chosen for new items.
items[].itemCount number no The number of items that name this item type.
items[].createdDate string (date-time) no The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
items[].lastModifiedDate string (date-time) no The date and time the item type 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 no True when more item types remain beyond this page.

Statuses