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.
Authorizations
Bearer token authentication (format: "Bearer {token}")
Path Parameters
Layout template ID
Body
Discriminator width in bytes
x >= 11
Zero-based byte offset of the record-type discriminator
x >= 00
Format family the template namespaces under
1"cnab400"
Record types declared by the layout
1ISO alpha-2 region (uppercased) or XX
1"BR"
Operator/brand variant axis
1"acme-cobranca"
Field names the variant must declare
Response
OK
Creation timestamp (RFC 3339, UTC)
"2025-01-15T10:30:00Z"
Record-type discriminator byte range the parser reads to select a record type
Canonical format descriptor key (region/family/variant) the template registers under
"br/cnab400/acme-cobranca"
Template identifier
"550e8400-e29b-41d4-a716-446655440000"
Number of record types the layout declares
1
Per-record-type fixed width in bytes, keyed by record type
Record types the layout declares, each with its fixed width and ordered byte-range fields, sorted by record type
Field names the variant must declare across its record types
In-file variant key the layout is keyed by
"acme-cobranca"

