Skip to main content
POST
Cancel a boleto batch

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Organization-Id
string

Organization the batch belongs to. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025. A batch of another organization is answered 404, exactly as one that does not exist.

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

batch_id
string<uuid>
required

Batch identifier (UUID), the batchId the creation answered. A value that is not a UUID is refused with 400 PBP-0001.

Example:

"0192a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b"

Body

application/json
reason
string
required

Reason for the cancellation, recorded on every item canceled as its cancellationReason. Required: absent, blank once trimmed or longer than 500 characters is refused with 400 PBP-0001, with the same messages as POST /v1/boletos/{id}/cancel.

Example:

"Cobrança emitida em duplicidade"

Response

One result per item of the batch, in ascending position: whether this request canceled the item (CANCELED), could not cancel it (NOT_CANCELABLE) or attempted it and was refused (CANCEL_FAILED), and the status of its boleto after the attempt. Canceling only part of a batch is not an error.

batchId
string<uuid>
required

Batch identifier.

Example:

"0192a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b"

items
object[] | null
required

One result per item of the batch, in ascending position.