getUOMs
Requires an authenticated session.
List the organization's units of measure, optionally filtered and sorted. Omit skip and take to get the whole list, for unit pickers; send both to page, and use getUOMsCount for the total.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query GetUOMs {
getUOMs {
id
code
colorCode
name
pluralName
createdAt
conversionFrom {
id
createdAt
conversionFactor
deletedAt
deletedBy
enteredBy
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query GetUOMs {\n getUOMs {\n id\n code\n colorCode\n name\n pluralName\n createdAt\n conversionFrom {\n id\n createdAt\n conversionFactor\n deletedAt\n deletedBy\n enteredBy\n }\n }\n}"
}
EOF
Response:
{
"data": {
"getUOMs": [
{
"id": "id",
"code": "string",
"colorCode": "string",
"name": "string",
"pluralName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"conversionFrom": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"conversionFactor": 0,
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string",
"enteredBy": "string"
}
]
}
]
}
}
getUOMs(
filters: UOMFiltersInput
skip: Int
take: Int
): [UnitOfMeasure!]!
Arguments
getUOMs.filters ● UOMFiltersInput input
Optional filters and sorting.
getUOMs.skip ● Int scalar
Number of units to skip. Send with take for paging.
getUOMs.take ● Int scalar
Number of units to return. Omit skip and take to return the whole list.
Type
UnitOfMeasure object
A unit of measure in the organization's catalog, with its category, decimal rules and display settings.