Returns the unit of measure groups that match the given filters.

POST /inventory/unit-of-measure-groups/search

Group: Inventory › Unit of Measure Groups · Operation ID: searchUnitOfMeasureGroups

Every criterion is exact and criteria combine with AND. Send an empty filters object to return every unit of measure group. There is no free-text search. The response is the whole group, with its base unit and conversion lines, which the collection cannot carry. This is the only endpoint that can find the groups that convert a given unit of measure.

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

Field Type Required Description
filters object yes The filters to apply. A unit of measure group must match every filter you send. Send an empty object to return all unit of measure groups.
filters.name string no Limits results to unit of measure groups with this name. The match is exact. Names are not unique, so this may match several groups.
filters.unitOfMeasureId string no Limits results to unit of measure groups with a conversion line for this unit of measure, including groups where it is the base unit. See id on GET inventory/unit-of-measures/:id.
filters.modifiedSince string (date-time) no Limits results to unit of measure groups changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. This tracks the group header only, so a changed conversion line does not affect it.
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 unit of measure groups per page. Defaults to 50. A value above 200 is treated as 200, not rejected.

Example:

{
  "filters": {
    "unitOfMeasureId": "8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"
  },
  "page": {
    "size": 50
  }
}

Response

200 Success

Under data (searchUnitOfMeasureGroupsOutput):

Field Type Required Description
items array of object yes The unit of measure groups on this page, ordered by id. An empty array when nothing matches.
items[].id string yes The unique identifier for the unit of measure group.
items[].name string yes The display name of the unit of measure group. Names are not unique.
items[].description string no A free-form description of what the group covers. Absent when none was given.
items[].baseUnitOfMeasureId string no The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Absent when the group has no lines. See id on GET inventory/unit-of-measures/:id.
items[].baseUnitCode string no The code of the base unit of measure. Absent when the group has no lines.
items[].lines array of object yes The group's conversion lines, ordered by line id. An empty array when the group has none.
items[].lines[].id string yes The unique identifier for the conversion line. This is what updateLines and deleteLines address on PATCH inventory/unit-of-measure-groups/:id, not the unit.
items[].lines[].unitOfMeasureId string yes The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id.
items[].lines[].unitCode string yes The code of that unit of measure.
items[].lines[].unitName string yes The display name of that unit of measure.
items[].lines[].conversionFactor string (decimal) yes How many base units of measure make up one of this unit. It is always greater than zero, and 1 on the base unit's own line.
items[].lines[].isBaseUnit boolean yes Whether this line is for the group's own base unit of measure. Exactly one line has it, and its conversionFactor is 1.
items[].lastModifiedDate string (date-time) no The date and time the unit of measure group's own fields last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or changing a conversion line does not change it.
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 unit of measure groups remain beyond this page.

Statuses