Skip to main content

getProductUOMs

Requires an authenticated session.

List the units (packs) set up on a product, optionally for one variant. Packs on a deactivated unit are left out unless includeInactive is true.

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:

query GetProductUOMs($productId: String!) {
getProductUOMs(productId: $productId) {
id
createdAt
barcode
conversionFactor
deletedAt
deletedBy
uom {
id
code
colorCode
name
pluralName
createdAt
}
}
}

Variables:

{
"productId": "string"
}

Response:

{
"data": {
"getProductUOMs": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"barcode": "string",
"conversionFactor": 0,
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string",
"uom": {
"id": "id",
"code": "string",
"colorCode": "string",
"name": "string",
"pluralName": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
}
]
}
}
getProductUOMs(
includeInactive: Boolean
productId: String!
variantId: String
): [ProductUOM!]!

Arguments​

getProductUOMs.includeInactive ● Boolean scalar​

Set to true to include packs on deactivated units. Defaults to false.

getProductUOMs.productId ● String! non-null scalar​

The ID of the product.

getProductUOMs.variantId ● String scalar​

Limit the list to this variant's units: the product-wide ones plus the variant's own. Omit to list every row, as editor views do.

Type​

ProductUOM object​

A unit (pack) set up on a product or variant: its conversion factor to the base unit, the documents it can be used on, and its ordering and pricing rules.