Skip to main content
POST
Close an agreement

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

Idempotency-Key
string
required

Client-supplied idempotency key, a UUID. Required: a request without it, with a value that is not a UUID, or with the nil UUID (00000000-0000-0000-0000-000000000000) is refused with 400 PBP-0012.

Path Parameters

agreement_id
string<uuid>
required

Identifier of the agreement.

Example:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a71"

Body

application/json
reason
string
required

Reason for the action, recorded in the audit trail. Must not carry personal data.

Required string length: 10 - 500
Example:

"Notice intake restored after the window."

Response

OK. The action is recorded in the audit trail. outcome is ENQUEUED when the exclusion goes to Núclea, or APPLIED when the agreement closed at once.

action
enum<string>
required

What the action did.

Available options:
RELEASE_WRITE_OFF,
CANCEL_SCHEDULED_RELEASE,
UNHOLD_WRITE_OFF,
REVERSE_WRITE_OFF,
REPROCESS_CREDIT_ENTRY,
REPROCESS_PCR_COMMAND,
CLOSE_PCR_COMMAND,
SETTLE_SUBMISSION_FAILURE,
ASSOCIATE_PCR_NOTICE,
DISCARD_PCR_NOTICE,
APPLY_PCR_NOTICE,
WRITE_OFF_LATE_REGISTRATION,
ENABLE_ACCOUNT,
CREATE_ENABLEMENT_BATCH,
APPROVE_ENABLEMENT,
REJECT_ENABLEMENT,
DISABLE_BENEFICIARY,
CORRECT_AGREEMENT_DIVERGENCE,
ADOPT_AGREEMENT_DIVERGENCE,
BULK_ADOPT_AGREEMENT_DIVERGENCES,
CREATE_AGREEMENT,
UPDATE_AGREEMENT,
CLOSE_AGREEMENT,
REPROCESS_AGREEMENT_CLOSURE,
FORCE_CLOSE_AGREEMENT,
LINK_POOLED_ACCOUNT,
REMOVE_POOLED_ACCOUNT_LINK,
PUT_PCR_CONNECTION,
PUT_COLLECTIONS_SETTINGS,
SYNC_PCR_SUBSCRIPTION,
ROTATE_PCR_NOTICE_SECRET,
REDELIVER_PCR_NOTICE
Example:

"REDELIVER_PCR_NOTICE"

auditActionId
string<uuid>
required

Entry created in the audit trail.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

outcome
enum<string>
required

APPLIED: the local effect is written and, when there is an external effect, it is confirmed. ENQUEUED: the action is recorded under a stable key and its effect follows asynchronously, at the PCR or the ledger.

Available options:
APPLIED,
ENQUEUED
Example:

"ENQUEUED"

targetId
string<uuid>
required

Identifier of the resource the action acted on.

Example:

"7c9e6679-7425-40de-944b-e07fc1f90ae7"

targetState
string
required

State of the target after the action, as far as collections knows it when it answers.

Maximum string length: 64
Example:

"FAILED"

targetType
enum<string>
required

Kind of resource the action acted on.

Available options:
TITLE,
WRITE_OFF,
CREDIT_ENTRY,
PCR_COMMAND,
PCR_NOTICE,
BENEFICIARY,
ENABLEMENT_BATCH,
AGREEMENT,
AGREEMENT_DIVERGENCE,
POOLED_ACCOUNT_LINK,
PCR_CONNECTION,
PCR_SUBSCRIPTION,
PCR_WEBHOOK_DELIVERY,
COLLECTIONS_SETTINGS,
ACCOUNT
Example:

"PCR_WEBHOOK_DELIVERY"