Get a canon identifier class
Módulo Canon
GET/canon/identifier-classes/{class}canonIdentifierClasses.get
Identifier grammar: identifier, code or token (Section 3.6). Returns one canon identifier class with its `ETag`. A canon identifier class the caller may not see returns 404.
- Requiere la capacidad canon.taxonomy.read.
- Alcances de OAuth: canon.
- Estados de error: 400, 401, 404, 429. Los errores son detalles de problema RFC 9457.
Parámetros de ruta y de consulta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| class | string | Sí | Identifier class.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
| fields | Fields | No | Sparse fieldset: a comma-separated list of top-level fields to return. `id` is always returned.Restricciones: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$ |
Respuesta 200: CanonIdentifierClass
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| class | string | Sí | Identifier class.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
| issued_by | string | Sí | Who issues it.Restricciones: length 1 to 300 |
| scope | string | Sí | Where it is unique.Restricciones: length 1 to 300 |
| is_mutable | boolean | Sí | Whether it may change. |
| rule | string | Sí | Rule.Restricciones: length 1 to 20000 |
| examples | string | Sí | Examples.Restricciones: length 1 to 300 |
{
"class": "identifier",
"issued_by": "An external authority",
"scope": "Global",
"is_mutable": false,
"rule": "Recorded and validated, never minted.",
"examples": "GTIN, MPN, UNSPSC"
}Ejemplos de código
curl -X GET "$XOS_BASE_URL/canon/identifier-classes/identifier" \
-H "Authorization: Bearer $XOS_API_KEY"const { data, etag } = await xos.canonIdentifierClasses.get("identifier");response = xos.canon_identifier_classes.get("identifier")xos canon-identifier-classes get identifier