v1
latestOpenAPI 3.1.02026-07-263644911022.4 KBIngestion
Replace an operator fixed-width layout template
Fully replaces a stored per-tenant fixed-width layout template (records/fields/discriminator/recordWidths/requiredFields) by its id — a PUT full replace, not a sparse patch, since the byte-range invariants are whole-layout properties. The replacement is run through the SAME well-formedness gate the submission path enforces BEFORE storage: overrun, overlap, missing-required, zero-field, or a mis-marked money column (money MUST be kind=decimal) rejects with 422 and the stored template is left unchanged. Returns 404 when no active template matches, 409 when the new format key collides with another active template. Tenant from the JWT; never the body.
put/v1/imports/formats/templates/{templateId}
Path parameters
templateIdstring uuid required
Layout template ID
Layout template ID
Request body
Example request
{
"discriminatorLength": 1,
"family": "cnab400",
"records": [
{
"fields": [
{
"kind": "decimal",
"length": 12,
"name": "amount",
"startByte": 11
}
],
"recordType": "1",
"width": 33
}
],
"region": "BR",
"variant": "acme-cobranca"
}Response
OK
Example response
{
"createdAt": "2025-01-15T10:30:00Z",
"discriminator": {
"length": 1
},
"formatKey": "br/cnab400/acme-cobranca",
"id": "550e8400-e29b-41d4-a716-446655440000",
"recordTypeCount": 1,
"records": [
{
"fields": [
{
"kind": "decimal",
"length": 12,
"name": "amount",
"startByte": 11
}
],
"recordType": "1",
"width": 33
}
],
"variantKey": "acme-cobranca"
}