Record a correction to a registered contract
Records a correction to something the client already asserted about a registered contract, and publishes the fact that names it.
This is NOT a Dataprev operation: no rail credential is used and no government boundary is crossed. Manual 005 revision 1.13 states the rail’s retification fields are no longer used and always return null, so the client is the only authority a correction can have — source_authority is always client.
NOTHING IS MUTATED. A correction is an append that names what it supersedes, and the record it corrects stays immutable in the database exactly as it was. Correcting the same thing twice appends a second correction that supersedes the first.
The gateway takes custody of the corrected resource and computes its SHA-256 itself; a client-declared digest is never accepted. The published fact carries a same-origin path back to this gateway plus that digest, and the consumer fetches and verifies it over authenticated M2M.
| correction_type | payment_reference | supersedes |
|---|---|---|
ccb | must be empty | the previous CCB correction, or nothing on the first |
disbursement | required | the confirmed payment it repairs, then the previous correction of that payment |
A first CCB correction for a contract number this tenant never registered nor imported is refused with 404, before anything is retained: retained storage cannot delete, so a typo would otherwise stay for five years. A disbursement correction naming a payment this deployment holds no confirmation for is refused with 404 too: a supersession pointing at nothing is worse than no correction.
X-Idempotency is mandatory, opaque, 1..128 bytes, and never defaulted. PostgreSQL is the authority: the same key replays the identical 202 body and publishes no second fact, and the same key carrying a different correction answers 422 without ever returning the earlier body.
Encabezados
Parámetros de ruta
Cuerpo
Respuesta
The correction is durably recorded and its fact queued. A replay under the same key answers with the identical body.

