Resolve an element
Canon module
GET/canon/elements/resolvecanonElements.resolve
Resolves free text, an MPN or a GTIN to a catalog element through `xpms.resolve_element`. No match returns a 422 refusal with `NO_ANSWER`; the resolver never guesses. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requires the capability canon.taxonomy.read.
- OAuth scopes: canon.
- Error statuses: 400, 401, 422, 429. Errors are RFC 9457 problem details.
Path and query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Free text, MPN or GTIN.Constraints: length 1 to any |
Response 200: ElementResolution
| Field | Type | Required | Description |
|---|---|---|---|
| element_id | ItemId | Yes | Catalog item identifier `{URID}-{ORG}-{SEQ}` (Section 3.6).Constraints: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}-[A-Z0-9]+-[0-9]+$ |
| urid | Urid | Yes | Category URID `DDDD.DD.DD` from `xpms.dim_category` (Section 3.3). There is no fourth segment.Constraints: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$ |
| item | string | Yes | Element name.Constraints: length 1 to 200 |
| match | string | Yes | How the element matched.Constraints: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
{
"element_id": "4000.01.01-XPMS-001",
"urid": "4000.01.01",
"item": "Ground Stage Deck",
"match": "gtin"
}Code samples
curl -X GET "$XOS_BASE_URL/canon/elements/resolve" \
-H "Authorization: Bearer $XOS_API_KEY"const { data } = await xos.canonElements.resolve();response = xos.canon_elements.resolve()xos canon-elements resolve