Resolve a GTIN
Canon module
GET/canon/element-gtins/resolvecanonElementGtins.resolve
Resolves a GTIN to its element through `xpms.resolve_gtin`. Many GTINs map to one element; one GTIN maps to at most one. An unknown GTIN returns a 422 `NO_ANSWER` refusal. 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 |
|---|---|---|---|
| gtin | string | Yes | GTIN to resolve.Constraints: pattern ^[0-9]{8,14}$ |
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/element-gtins/resolve" \
-H "Authorization: Bearer $XOS_API_KEY"const { data } = await xos.canonElementGtins.resolve();response = xos.canon_element_gtins.resolve()xos canon-element-gtins resolve