Returns the units of measure that match the given filters.
POST /inventory/unit-of-measures/search
Group: Inventory › Units of Measure · Operation ID: searchUnitOfMeasures
Every criterion is exact and criteria combine with AND. Send an empty filters object to return every unit of measure. There is no free-text search. These filters are a subset of what GET inventory/unit-of-measures accepts, using the same names.
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: searchUnitOfMeasuresInput.
| Field | Type | Required | Description |
|---|---|---|---|
filters |
object | yes | The filters to apply. A unit of measure must match every filter you send. Send an empty object to return all units of measure. |
filters.unitCode |
string | no | Limits results to the unit of measure with this code. The match is exact. Codes are unique, so this matches at most one unit of measure. |
filters.modifiedSince |
string (date-time) | no | Limits results to units of measure 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 units of measure per page. Defaults to 50. A value above 200 is treated as 200, not rejected. |
Example:
{
"filters": {
"unitCode": "KG"
},
"page": {
"size": 50
}
}
Response
200 Success
Under data (searchUnitOfMeasuresOutput):
| Field | Type | Required | Description |
|---|---|---|---|
items |
array of object | yes | The units of measure on this page, ordered by id. An empty array when nothing matches. |
items[].id |
string | yes | The unique identifier for the unit of measure. |
items[].unitCode |
string | yes | The short code of the unit of measure, for example 'KG'. It is unique within the tenant. |
items[].unitName |
string | yes | The display name of the unit of measure, for example 'Kilogram'. |
items[].lastModifiedDate |
string (date-time) | no | The date and time the unit of measure 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 units of measure remain beyond this page. |
Statuses
400— Invalid request or business failure401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error