Skip to main content

Create instruction batch

Allows sending, in a single request, multiple instructions of the same type (write-off, rebate, extension, protest, etc.) over distinct bank slips. QI Tech validates the whole batch and either accepts every item or processes none.

  • If any item fails semantic validation, no items in the batch are processed. The error response details, per rejected item, the reason for rejection.
  • If every item passes, the occurrences are created and processed individually, asynchronously. The requester is notified via webhook as each occurrence changes status.
Idempotency

The batch-level request_control_key guarantees idempotency: resending the same key returns the batch already created, without duplication.

Each item also has its own request_control_key and is individually idempotent. Resending an item with a request_control_key already used makes the entire batch be rejected.

Attention!

This operation is only available for wallets registered with the QI SCD registration institution.

Request

ENDPOINT
/v2/bank_slip/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/occurrence_batches
METHOD
POST

Path parameters

FieldTypeDescriptionCharacters
account_keyuuidv4Unique account identification key, in uuid v4 format36
requester_profile_keyuuidv4Unique wallet identification key, in uuid v4 format36
Request Body
{
"request_control_key": "614a451d-3b82-460e-bcc0-2caf3dde711f",
"occurrence_type": "extension",
"items": [
{
"bank_slip_key": "960f78d4-4426-4762-98da-3ce3713ae0a5",
"request_control_key": "c86d8902-a5ae-4d1f-8872-e6fea1268aab",
"new_due_date": "2026-08-15"
},
{
"bank_slip_key": "5e3a1b2c-7d9f-4e88-9012-3a4b5c6d7e8f",
"request_control_key": "b3a428fd-58ee-4d6f-8872-633874ebf5e2",
"new_due_date": "2026-08-20"
}
]
}

Request Body Params

FieldTypeDescriptionCharacters
request_control_key *stringUnique batch key, defined by the client. Ensures batch idempotency1–64
occurrence_type *stringInstruction type applied to every item. See occurrence_type enumerators-
items *Array of item objectList of instructions (minimum 1, maximum 10000)-

occurrence_type enumerators

EnumeratorDescription
extensionDue-date extension — requires new_due_date on each item
rebateApply rebate — requires rebate_amount on each item
cancel_rebateCancel a previously applied rebate
write_offWrite off the bank slip
protest_requestProtest request
protest_cancel_requestWithdraw a pending protest request
protest_remove_requestRemove (cancel) a registered protest

item object

FieldTypeDescriptionCharacters
bank_slip_key *uuidv4Key of the bank slip the instruction will be applied to36
request_control_key *stringUnique item key, defined by the client. Ensures per-item idempotency1–64
new_due_datestringNew due date (YYYY-MM-DD). Required when occurrence_type=extension10
rebate_amountfloatRebate amount. Required when occurrence_type=rebate-

Response

STATUS
201
Response Body
{
"batch_key": "f2d3e1b9-4a5c-46e7-8f12-9a8b7c6d5e4f",
"occurrence_quantity": 2,
"accepted_quantity": 2,
"semantic_errors": []
}

Response Body Params

FieldTypeDescriptionCharacters
batch_key *uuidv4Unique batch key. Use it to query the batch detail36
occurrence_quantity *integerTotal number of items sent in the batch-
accepted_quantity *integerNumber of items accepted in the batch-
semantic_errors *arrayEmpty array on success. On semantic rejection, see Error Response-

Error Response

STATUS
4xx
Response Body: Error
{
"title": "title",
"description": "description in English",
"translation": "descrição em português",
"code": "code",
"extra_fields": {}
}

On semantic rejection (BLP000112), the reasons field of the response details every rejected item:

Response Body: Semantic rejection
{
"title": "Unprocessable Entity",
"description": "Rejected Remittance",
"translation": "Remessa Rejeitada",
"code": "BLP000112",
"reasons": [
{
"occurrence_sequence": "0",
"bank_slip_key": "960f78d4-4426-4762-98da-3ce3713ae0a5",
"request_control_key": "c86d8902-a5ae-4d1f-8872-e6fea1268aab",
"errors": [
{
"reason_code": "15",
"translation_pt_br": "Boleto não encontrado",
"translation_en_us": "Bank slip not found",
"created_at": "2026-06-09T17:08:33"
}
]
}
]
}

reasons[] object fields

FieldTypeDescription
occurrence_sequence *stringItem position in the request's items array (starting at "0")
bank_slip_key *uuidv4Bank slip key of the rejected item
request_control_key *stringItem's client-provided control key
errors *arrayList of rejection reasons (an item may have multiple)
errors[].reason_code *stringRejection reason code (Febraban standard)
errors[].translation_pt_brstringPortuguese description of the reason
errors[].translation_en_usstringEnglish description of the reason
errors[].created_atstringCatalog registration date of the reason

Error codes

HTTP code
status
QI code
code
Title
title
Description (eng)
description
Description (pt-br)
translation
400QIT000001Bad RequestSchema ErrorSchema Inválido
400BKS000141Bad RequestBank slip registration is restricted to QI SCD.Registro de boleto permitido apenas para QI SCD.
404BKS000013Not FoundRequester profile not foundCarteira não encontrada
409BKS000014ConflictRequest control key already sent or duplicated sent: <request_control_key>Chave de controle da requisição já utilizada ou enviada duplicada: <request_control_key>
422BLP000112Unprocessable EntityRejected RemittanceRemessa Rejeitada