Template
APIs for managing roster templates and configurations
Start legacy two-step template upload with field suggestions
Creates a template record with status `in-progress`, uploads the raw file to GCS as `template.csv`, and runs column-to-field suggestion matching against the file's header row, returning ranked mapping suggestions per column.
List tenant-scoped templates with filters
Returns a paginated list of roster templates belonging to the requesting tenant.
List distinct roster-template creators for the Created by filter
Returns the distinct `createdBy` values across the tenant's roster templates, each resolved to the creator's display name and email where possible (CP-39764), for the Manage Templates 'Created by' filter dropdown. Filter the list with `createdBy` matched against each entry's raw `id`.
Get available system fields for a roster type
Returns the catalog of mappable Certify attributes for the given roster type. Used by the 'create template from scratch' builder to populate the attribute dropdown.
Create a roster template from scratch
Creates a roster template from a UI-built list of column definitions, without uploading a file. Each column maps a CSV header name to a Certify attribute. A column's optional `notes` is stored in the `Notes` column of the template's mappings CSV (CP-40246).
Get the required-field policy for the scratch-template builder
Returns the tenant-aware required-field policy (mandatory attributes, identity one-of groups, and service-address co-requisite groups) for the given roster type. The builder uses it to mirror the server-side validation the create/update endpoints enforce.
Suggest column-to-attribute mappings for a not-yet-created template
Given a list of column names parsed client-side from an uploaded file (CP-31960), returns ranked mapping suggestions per column. Columns with a confirmed prior mapping in the tenant-scoped column mapping cache are returned as a single high-confidence suggestion; all other columns are fuzzy-matched against system fields.
Upload and fully approve a template in one call
Executes the complete template workflow in a single request: creates the template record, uploads `template.csv` and `mappings.csv` to GCS, records a column mapping per CSV row, generates the JSON validation schema (`schema.json`), and sets the template status to `success`.
Submit confirmed column mappings for a pending template
Records the consumer-confirmed column-to-field mappings for an `in-progress` template by creating a column record for every entry in `fields`. This is step 2 of the legacy three-step upload flow: it must follow `POST /templates` and precede `PUT /templates/{id}/approve`.
Retrieve full details for a single template
Returns the complete record for the template identified by `{id}` within the requesting tenant.
Permanently delete a template record
Deletes the template identified by `{id}` and all of its column-mapping records from the data layer. This is a hard delete and cannot be undone.
Finalize a template by generating its validation schema
Completes the legacy three-step template flow: generates the JSON validation schema from the submitted field mappings (honoring the tenant-specific schema, when one is configured), uploads it to GCS as `schema.json`, and moves the template record to status `success` with its `template`/`schema` object paths recorded.
Get the ordered column list for a scratch-built template
Returns the ordered column definitions for a template built via the column builder (CP-31959), so the builder can pre-populate when editing. Each column includes its `notes` when it has one (CP-40246).
Save one template column's note
Saves the free-text note of one column of a roster template (CP-40246) without changing anything else: only the `Notes` column of the template's mappings CSV is rewritten, so the template's schema, column records and status stay as they are.
Update a roster template built from scratch
Updates a scratch-built roster template (CP-31959) from a revised list of column definitions. Rewrites the template/mappings CSVs, replaces the column records, and regenerates the schema. Each column's `notes` is written as sent: absent or blank clears it (CP-40246).
Partially update a template, re-approving on file replacement
Updates one or more attributes (`name`, `description`, `type`, `file`) of an existing template. At least one must be provided; supplying none causes a 400.