Attach a cession document to the lot that took the contract
Retains a cession-phase document, today the endorsed credit instrument (endorsed_credit_instrument, application/pdf, up to 5 MiB), for the lot a fund took the contract into, and publishes consignado.contract_document.retained. It only keeps the file: nothing is sent to Dataprev and no averbação is needed. The target is the contract’s latest take (assignment_receivable.taken), so a contract no fund took answers 409 CONTRACT_NOT_TAKEN. The same file (same digest) for the lot and type answers 200 with the stored record and no new fact, whatever its file_name; a different file is 409 DOCUMENT_ALREADY_RETAINED and a retained document is never replaced. An origination type is refused 422 DOCUMENT_PHASE_MISMATCH: those go through POST. One document per call. X-Idempotency is required. A bancarizador credential (consignado-rail/ccb:write) acts for every lot; a fundo credential only for the fund that took the contract; an originador credential only for its own contract, any other is refused 403.
Headers
Path Parameters
Body
Response
OK

