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.
Partner route: the text above describes the party’s own route. Here the register id in the path names the party: it must be in the partner credential’s scope and registered under the caller’s tenant, and the call runs as that party, exactly as the party’s own credential would. An originador the bancarizador deactivated is refused 403 ORIGINADOR_DEACTIVATED until it is reactivated.
Cabeçalhos
Parâmetros de caminho
Corpo
Resposta
OK

