latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

Template

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.

When to use: Prefer this endpoint when the column-to-field mapping is known in advance and no human review of suggestions is needed. Use the legacy two-step flow (POST /templates then PUT /templates/{id} then PUT /templates/{id}/approve) when you need to inspect or adjust auto-suggested mappings before committing.

How: Send a multipart/form-data request with the required tenant-id header and fields: name (display name), type (PRACTITIONER, FACILITY, or GROUP - GROUP requires the tenant's supportGroupRosters configuration, otherwise 400), description (optional), and file. The file must have a .csv extension (400 otherwise) and is a mappings-definition CSV: each row defines one roster column (header name, mapped Certify attribute, required flag, optional multiple-value group and separator). Every row must carry a mapped attribute; rows with missing mapping keys cause a 400.

Returns: A SingleStepTemplateFlowResponse with the new templateId, the resolved fields, the final status (success, or failure if schema generation failed - the record then stays in-progress), and the GCS object paths schemaUrl and templateUrl (paths, not signed URLs). On success the template is immediately usable for roster uploads.

post/templates/single-step

Headers

tenant-idstring required

Tenant the template is created in; scopes all reads and writes.

Response

The created template's ID, resolved column mappings, final 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"
}