latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

Template

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.

When to use: Call this after reviewing the suggestions returned by POST /templates and constructing the final mapping payload. Do not use it on templates created via the single-step or scratch flows - those are already approved; use PATCH /templates/{id}/single-step or PATCH /templates/{id}/scratch to change them.

How: Supply {id} and the required tenant-id header. The body's fields must map every header column of the template's stored template.csv (unmapped columns cause a 400; columns to ignore must be sent with the [skipped] sentinel as mappedKey), and each non-skipped entry's mappedKey must be a known system field unless mappedEntity is provided. jobType selects the system-field catalog used for validation, so it must match the template's own type; GROUP requires the tenant's supportGroupRosters configuration.

Returns: An echo of the confirmed fields in a TemplateUpdateRequest-shaped object whose jobType is always null - this is the endpoint's actual, intentional response shape. Side effect: one roster-template-column record is created per entry; repeat calls append further column records rather than replacing earlier ones, so this endpoint should be called once per template.

put/templates/{id}

Path parameters

idstring required

Server-generated ID of the template to confirm mappings for, as returned by POST /templates.

Headers

tenant-idstring required

Tenant that owns the template; scopes all reads and writes.

Request body

jobType'PRACTITIONER' | 'FACILITY' | 'GROUP'

Example request

{
  "fields": [
    {
      "name": "First Name",
      "mappedKey": "firstName",
      "mappedEntity": "practitioner",
      "entityGroup": "license",
      "validationRegex": "^\\d{10}$",
      "separator": ";"
    }
  ]
}

Response

The confirmed column mappings, echoed back. jobType is always null on the response.

jobType'PRACTITIONER' | 'FACILITY' | 'GROUP'

Example response

{
  "fields": [
    {
      "name": "First Name",
      "mappedKey": "firstName",
      "mappedEntity": "practitioner",
      "entityGroup": "license",
      "validationRegex": "^\\d{10}$",
      "separator": ";"
    }
  ]
}