Get a canon cost center template
Módulo Canon
GET/canon/cost-center-templates/{cost_center_id}canonCostCenterTemplates.get
A cost center template (GL dimension 1). Returns one canon cost center template with its `ETag`. A canon cost center template 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 |
|---|---|---|---|
| cost_center_id | CostCenterCode | Sí | Cost center identifier (GL dimension 1).Restricciones: pattern ^CC-[A-Z0-9-]+$ |
| 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: CanonCostCenterTemplate
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| cost_center_id | CostCenterCode | Sí | Cost center identifier (GL dimension 1).Restricciones: pattern ^CC-[A-Z0-9-]+$ |
| cost_center | string | Sí | Cost center name.Restricciones: length 1 to 200 |
| kind | string | Sí | Cost center kind.Restricciones: length 1 to 200 |
| scope_code | string | null | Sí | Scope code the cost center belongs to.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
| note | string | null | Sí | Note from the Bible.Restricciones: length 1 to 20000 |
{
"cost_center_id": "CC-VENUE",
"cost_center": "Venue Standing Operations",
"kind": "Standing",
"scope_code": "E01",
"note": "Runs whether or not an event does."
}Ejemplos de código
curl -X GET "$XOS_BASE_URL/canon/cost-center-templates/CC-VENUE" \
-H "Authorization: Bearer $XOS_API_KEY"const { data, etag } = await xos.canonCostCenterTemplates.get("CC-VENUE");response = xos.canon_cost_center_templates.get("CC-VENUE")xos canon-cost-center-templates get CC-VENUE