Passer au contenu

Designed
Get custom-fields schema for a chapter type

Requête

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.

Sécurité
oauth2(Portées requises: t1_api)
Chemin
templateIdstring, (uuid)obligatoire

The template identifier (communicated at onboarding)

chapterTypestringobligatoire

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).

Requête
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>'

Réponses

The template's custom components for this chapter type

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