Resolve an element
Módulo Canon
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`.
- Requiere la capacidad canon.taxonomy.read.
- Alcances de OAuth: canon.
- Estados de error: 400, 401, 422, 429. Los errores son detalles de problema RFC 9457.
Parámetros de ruta y de consulta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| query | string | Sí | Free text, MPN or GTIN.Restricciones: length 1 to any |
Respuesta 200: ElementResolution
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| element_id | ItemId | Sí | Catalog item identifier `{URID}-{ORG}-{SEQ}` (Section 3.6).Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}-[A-Z0-9]+-[0-9]+$ |
| urid | Urid | Sí | Category URID `DDDD.DD.DD` from `xpms.dim_category` (Section 3.3). There is no fourth segment.Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}$ |
| item | string | Sí | Element name.Restricciones: length 1 to 200 |
| match | string | Sí | How the element matched.Restricciones: 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"
}Ejemplos de código
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