Issue installment boletos
Autorizações
JWT bearer token issued by the identity provider.
Cabeçalhos
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.
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
Due date of the first installment, YYYY-MM-DD.
"2030-01-15"
Number of installments.
2
Days between consecutive installments.
30
Midaz account the series settles into.
Boleto type applied to every installment.
"TRADITIONAL"
Per-installment amounts, at most 36. When supplied, its length must match installments.
3632Midaz 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.
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.
36Series total as a decimal string. Optional: either this or installmentAmounts must be supplied.
32"100.00"
Resposta
Created
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.
Midaz ledger the installments were written with. Always present.
Midaz organization the installments were written with. Always present, and always the organization of the X-Organization-Id header.
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.
CREATED, COMPLETED, PARTIAL_FAILURE, FAILED 
