getProductUOM
Requires permission products:product:read.
One pack (a unit on a product or variant) by its id, or null when it was removed or is not this organization's.
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 GetProductUOM($id: String!) {
getProductUOM(id: $id) {
id
createdAt
barcode
conversionFactor
deletedAt
deletedBy
uom {
id
code
colorCode
name
pluralName
createdAt
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query GetProductUOM($id: String!) {\n getProductUOM(id: $id) {\n id\n createdAt\n barcode\n conversionFactor\n deletedAt\n deletedBy\n uom {\n id\n code\n colorCode\n name\n pluralName\n createdAt\n }\n }\n}",
"variables": {
"id": "string"
}
}
EOF
Variables:
{
"id": "string"
}
Response:
{
"data": {
"getProductUOM": {
"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"
}
}
}
}
getProductUOM(
id: String!
): ProductUOM
Arguments
getProductUOM.id ● String! non-null scalar
The ID of the product unit (pack).
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.