Skip to main content
POST
Issue installment boletos

Autorizações

Authorization
string
header
obrigatório

JWT bearer token issued by the identity provider.

Cabeçalhos

X-Organization-Id
string

Midaz organization the account and every installment live under. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025.

Idempotency-Key
string
obrigatório

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.

Corpo

application/json
firstDueDate
string<date>
obrigatório

Due date of the first installment, YYYY-MM-DD.

Exemplo:

"2030-01-15"

installments
integer<int64>
obrigatório

Number of installments.

Exemplo:

2

intervalDays
integer<int64>
obrigatório

Days between consecutive installments.

Exemplo:

30

midazAccountId
string
obrigatório

Midaz account the series settles into.

payer
object
obrigatório
type
string
obrigatório

Boleto type applied to every installment.

Exemplo:

"TRADITIONAL"

discount
object
fine
object
installmentAmounts
string[] | null

Per-installment amounts, at most 36. When supplied, its length must match installments.

Maximum array length: 36
Maximum string length: 32
interest
object
ledgerId
string

Midaz ledger the account lives in and every installment is written with. Required: absent, blank or not a canonical UUID is refused with 400 PBP-0026.

ourNumbers
string[] | null

Bank-side identification (nosso numero) chosen by the payee for each installment: one number per installment, in installment order, at most 36. All or none: when absent or null, the provider assigns every number, and an empty list is refused with 422 PBP-0102, as is a list of another length. Each item follows the rule of ourNumber on POST /v1/boletos: surrounding spaces are removed, a hyphen is accepted only when followed by exactly one digit, which is discarded, and any other character that is not a digit is refused; the accepted width is set by the connected provider (11 significant digits for the current one). A format or width refusal answers 400 PBP-0001 naming the item as ourNumbers[], counted from 0. Two installments with the same number, leading zeros ignored, are refused with 422 PBP-0102, and the problem carries the installments, counted from 1, as duplicateInstallmentNumbers. A number already held by an active boleto of this tenant on the same provider account refuses the whole series with 422 PBP-0108 before the provider is called, and the problem carries the installment as installmentNumber and, when the holder can be read, its id as ourNumberHolderBoletoId. Only a series with numbers depends on the provider account discovery: 422 PBP-0017 when this instance has none, 422 PBP-0014 when the provider refuses it and 503 PBP-0015 when the provider does not answer.

Maximum array length: 36
totalAmount
string

Series total as a decimal string. Optional: either this or installmentAmounts must be supplied.

Maximum string length: 32
Exemplo:

"100.00"

Resposta

Created

boletos
object[] | null
obrigatório
closed
boolean
obrigatório

Whether no installment of the series can still be paid: true when every installment is SETTLED, CANCELED, INACTIVATED or FAILED. Always present. It can return to false when the provider reverts the cancellation of an installment.

installmentsCount
integer<int64>
obrigatório
ledgerId
string
obrigatório

Midaz ledger the installments were written with. Always present.

organizationId
string
obrigatório

Midaz organization the installments were written with. Always present, and always the organization of the X-Organization-Id header.

seriesId
string
obrigatório
status
enum<string>
obrigatório

Emission outcome of the series, derived from its installments on every read. CREATED: some installment has no emission outcome yet. COMPLETED: every installment has an outcome and none is FAILED. PARTIAL_FAILURE: every installment has an outcome and some, not all, are FAILED; those carry errorMessage. FAILED: every installment is FAILED. It does not depend on payment, cancellation or write-off, and it can move from COMPLETED to PARTIAL_FAILURE or FAILED when the provider later refuses an accepted installment: a client waiting for the final outcome reads closed.

Opções disponíveis:
CREATED,
COMPLETED,
PARTIAL_FAILURE,
FAILED
totalAmount
string
obrigatório