Verdicts and confidence
Each item in the response carries a verdict and a confidenceScore (0–1) expressing the model's confidence in that verdict.
| Verdict↕ | Meaning↕ |
|---|---|
CORRECT | The item plausibly belongs in the assigned categories. |
WRONG | The item clearly does not belong in the assigned categories. |
When the verdict is WRONG, suggestedCategories is populated with plausible alternatives from your organization's category universe. Each suggestion has its own category hierarchy (root → leaf) and a confidence score—the model's probability that it is the best-fit category, sorted descending. When the verdict is CORRECT, suggestedCategories is empty.
Validate categories via API
Submit one or more items in a single request. name and categories are required for each item; including optional details like description, brand, material, and amount improves accuracy. The example below validates two items—one correctly categorized and one clearly mis-categorized.
mutation CategoriesValidate($input: [CategoryValidateInput!]!) { categoriesValidate(input: $input) { id name categories verdict confidenceScore suggestedCategories { category confidence } }}Input fields
| Field↕ | Type↕ | Description↕ |
|---|---|---|
name | String! | The product name or short description. Required. |
categories | [String!]! | The category hierarchy (root → leaf) to validate. Required. |
amount | Decimal | The price of the item. |
currencyCode | CurrencyCode | The currency the amount is in. |
brand | String | The brand of the item. |
description | String | The full description associated with the item. |
material | String | The material composition of the item. |
globalTradeItemNumber | String | A Global Trade Item Number (GTIN) such as UPC, EAN, GTIN-8, or GTIN-14. |
imageUrl | String | The location of an image related to the item. |
The descriptive fields are echoed back on each CategoryValidation in the response, so every stored validation is self-describing.
Category validation
Check whether the categories assigned to each item actually describe it.
GraphQL
The
categoriesValidatemutation validates whether each item's supplied categories correctly describe the item. For every item you submit, it returns averdictand aconfidenceScore. When the verdict isWRONG, the response also returns plausible alternative categories drawn from your organization's category universe.Use it to catch mis-categorized items before incorrect categories affect downstream classification, landed cost, or restriction results—and to suggest the right category back to whoever entered the item.