authoring-update-item-template
Update a Sitecore data template: modify or add sections and fields by ID, with optional deletion of missing items.
Instructions
Updates a Sitecore data template over the Authoring and Management API. Sections and fields carrying an ID are updated; those without one are created. Matching is by ID only, never by name: to add a field to a section that already exists you must pass that section's templateSectionId (read it as itemTemplateSectionId from authoring-get-item-template), otherwise the call is rejected for creating a second section of the same name. Nothing is removed unless deleteMissingFields is true — and when it is, every section and field absent from this call is deleted, along with the content stored in them, so read the template first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | A new icon for the template. | |
| name | No | A new name for the template. Omit to leave it unchanged. | |
| database | No | The database holding the template. Defaults to master. | |
| language | No | The language to write template text in. | |
| sections | No | Sections to update or add. Include templateSectionId / templateFieldId to update rather than create. | |
| templateId | Yes | The GUID of the template to update. | |
| baseTemplates | No | GUIDs of templates to inherit from. This replaces the current list rather than adding to it. | |
| deleteMissingFields | No | When true, delete every section and field not named in this call, discarding their content. Off by default. | |
| createStandardValuesItem | No | When true, create the __Standard Values item if the template does not have one. |