Skip to content

specification-templates

Specification template structure and custom-fields schemas (design-time)

Designed
Get custom-fields schema for a chapter type

Request

Returns the custom components the template places in one chapter type, each with its JSON Schema. Fetched once at design/integration time: the customFields entries of chapter writes are keyed by these componentIds and their values validated against these schemas. A published component and a published template never change, so the answer for a template never changes either. Only non-library chapters can carry custom fields: library chapters — production, testing, finished product — cannot be customized, hence the restricted chapterType values.

Security
oauth2(Required scopes: t1_api)
Path
templateIdstring, (uuid)required

The template identifier (communicated at onboarding)

chapterTypestringrequired

general, labelling, attestation (packaging), or a retailer-defined custom chapter type code — the values of TemplateStructure.chapters[].chapterType. Library chapter types are a 404 (they cannot carry custom fields).

Query
languageCodestring

Language of componentName, sectionName and the field titles. Defaults to English; a label missing in the requested language falls back to English (en-US).

curl -i -X GET \
  'https://apis.traceone.com/spec/v2/templates/{templateId}/chapters/{chapterType}/custom-fields-schema?languageCode=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The template's custom components for this chapter type

Bodyapplication/json
templateIdstring, (uuid)
chapterTypestring
componentsArray of objects
Response
{ "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d", "chapterType": "string", "components": [ { … } ] }