latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

Template

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.

When to use: Use this to rename a template, change its description or type, or replace its mappings CSV without going through the full create flow. For confirming column mappings in the legacy two-step flow use PUT /templates/{id} instead.

How: Send a multipart/form-data request with the required tenant-id header, {id} identifying an existing template for the tenant (404 otherwise), and any subset of the updatable fields. If file is supplied it must have a .csv extension and every mapping row must carry a mapped attribute (400 otherwise). A type of GROUP requires the tenant's supportGroupRosters configuration.

Returns: A SingleStepTemplateFlowResponse, with side effects depending on the branch taken. With file: the template's existing column records are deleted, new template.csv/mappings.csv objects are uploaded to GCS, new column records are created, schema.json is regenerated, and the resulting status (success, or failure if schema generation failed) is persisted and returned with the refreshed fields. Without file: only the metadata changes; the stored columns, artifacts, and status are preserved, and the response echoes the existing fields and status with the stored artifact object paths.

patch/templates/{id}/single-step

Path parameters

idstring required

Server-generated ID of the template to update, as returned by the create endpoints.

Headers

tenant-idstring required

Tenant that owns the template; scopes all reads and writes. Blank values are rejected with a 400.

Response

The updated template's resolved column mappings, status, and artifact object paths.

statusstring

Final template status. success when the validation schema was generated and the template is ready for roster uploads; failure when schema generation failed with an I/O error. Metadata-only updates preserve and return the template's existing status.

templateIdstring

Server-generated ID of the created or updated template.

templateUrlstring

GCS object path (not a signed URL) of the stored template CSV. Fetch a signed download URL via GET /templates/{id}, which returns it as templateUrl in the record's data.

schemaUrlstring

GCS object path (not a signed URL) of the generated JSON validation schema. Fetch a signed download URL via GET /templates/{id}, which returns it as schemaUrl in the record's data.

Example response

{
  "fields": [
    {
      "name": "First Name",
      "mappedKey": "firstName",
      "mappedEntity": "practitioner",
      "entityGroup": "license",
      "validationRegex": "^\\d{10}$",
      "separator": ";"
    }
  ],
  "status": "success",
  "templateId": "3f8e2b6c-9d41-4a7b-b6a0-5e2f8c1d9a37",
  "templateUrl": "roster/templates/3f8e2b6c-9d41-4a7b-b6a0-5e2f8c1d9a37/template.csv",
  "schemaUrl": "roster/templates/3f8e2b6c-9d41-4a7b-b6a0-5e2f8c1d9a37/schema.json"
}