getUOMSummary
Requires permission products:product:read.
Counts for the unit-of-measure settings page: total, active and inactive units, units per category, conversions, the five newest units and the base unit of each category. Needs the products read permission.
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 GetUOMSummary {
getUOMSummary {
activeUOMs
inactiveUOMs
lastUpdated
totalConversions
totalUOMs
variantsOverSellableCap
baseUOMs {
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 GetUOMSummary {\n getUOMSummary {\n activeUOMs\n inactiveUOMs\n lastUpdated\n totalConversions\n totalUOMs\n variantsOverSellableCap\n baseUOMs {\n id\n code\n colorCode\n name\n pluralName\n createdAt\n }\n }\n}"
}
EOF
Response:
{
"data": {
"getUOMSummary": {
"activeUOMs": 0,
"inactiveUOMs": 0,
"lastUpdated": "2025-01-15T00:00:00Z",
"totalConversions": 0,
"totalUOMs": 0,
"variantsOverSellableCap": 0,
"baseUOMs": [
{
"id": "id",
"code": "string",
"colorCode": "string",
"name": "string",
"pluralName": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
]
}
}
}
getUOMSummary: UOMSummary!
Type
UOMSummary object
Counts and highlights for the unit-of-measure settings page.