563848e0ecc0
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.
Path parameters
Server-generated ID of the template to confirm mappings for, as returned by POST /templates.
Headers
Tenant that owns the template; scopes all reads and writes.
Request body
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.
Example response
{
"fields": [
{
"name": "First Name",
"mappedKey": "firstName",
"mappedEntity": "practitioner",
"entityGroup": "license",
"validationRegex": "^\\d{10}$",
"separator": ";"
}
]
}