Request TED Batch Transaction Scheduling
QI Tech offers the possibility to perform multiple scheduled TED transactions with a single call. If the initial call returns an HTTP status 4xx, none of the schedules will be performed.
In this type of scheduling, it is necessary to confirm the payment scheduling via token sent to the person with powers to approve account movements in the creditor account.
The request for batch TED scheduling by integrating partners configured to use two-factor authentication is performed similarly to what is described in request batch TED transaction scheduling.
The difference occurs in adding the tfa_info object, containing information about the transfer approver and the contact method, and the status of a successful request which will always be pending_2fa_approval.
The notification event for sending the token to the approver is baas.token_validation.ted.schedule.batch. It is possible to customize the message sent.
Request
/account/ACCOUNT_KEY/ted_schedule_batch{
"request_control_key": "6e4fc980-f8a1-4462-b6e2-d8a49f0ac055",
"ted_schedules": [
{
"request_control_key": "0c3d2a3e-c121-464e-b5a4-8e69e0c17bbd",
"target_account": {
"account_branch": "0001",
"account_number": "92796",
"account_digit": "1",
"owner_document_number": "23599885000192",
"owner_name": "Titular da Conta",
"ispb": "12345678",
"account_type": "checking_account"
},
"transaction_amount": 8.86,
"schedule_date": "2024-12-01"
}
],
"tfa_info": {
"approver_document_number": "98765432100",
"contact_type": "email"
}
}
Path Params
| Field | Type | Description | Characters |
|---|---|---|---|
account_key | uuidv4 | Unique account identification key. | 36 |
Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
request_control_key * | uuidv4 | Unique request identification key used by the client in uuid v4 format. | 36 |
ted_schedules * | array | List of ted_schedule objects linked to the batch. | list of ted_schedule Object |
tfa_info* | Object | Object containing the account approver's document and contact method. | tfa_info Object |
tfa_info Object
| Field | Type | Description |
|---|---|---|
approver_document_number* | string | Account approver's document number. |
contact_type* | string | Contact method with the account approver, can be sms or email |
ted_schedule Object
| Field | Type | Description | Characters |
|---|---|---|---|
request_control_key * | string | Unique request identification key used by the client in uuid v4 format. | 36 |
target_account * | object | Target account | target_account Object |
transaction_amount * | float | Transfer amount | 10 |
schedule_date* | string | Date when the transaction should be performed. | 10 |
target_account Object
| Field | Type | Description | Characters |
|---|---|---|---|
account_branch * | string | Branch. | 4 |
account_digit * | string | Account digit | 1 |
account_number * | string | Account number. | 20 |
owner_document_number * | string | CPF or CNPJ (numbers only) of the account holder. | 14 |
owner_name * | string | Account holder's name. | 50 |
account_type* | string | Account type. | account_type Enumerator |
ispb * | string | Based on financial institution's CNPJ (8 digits). | 8 |
account_type Enumerator
| Enumerator | Translation |
|---|---|
| checking_account | checking account |
| deposit_account | deposit account |
| guaranteed_account | guaranteed account |
| investment_account | investment account |
| payment_account | payment account |
| saving_account | savings account |
Response
Response Body: Batch Scheduling Requested
{
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"schedule_batch_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"schedule_batch_status": "pending_2fa_approval",
"created_at": "2021-10-22T20:30:23.459Z"
}
schedule_batch_status Enumerator
| Enumerator | Description |
|---|---|
| created | Batch scheduling created |
| approved | Batch scheduling approved |
| rejected | Batch scheduling rejected |
| pending_2fa_approval | Batch scheduling pending two-factor authentication approval |
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP Codestatus | QI Codecode | Titletitle | Description (eng)description | Description (ptbr)translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | schema error description | Schema Inválido |
| 404 | TED000006 | Target account Not Found | Target account was not found for given parameters | Conta destino não encontrada para os parâmetros informados |
| 404 | TED000009 | Not Found | Account not found for the given key: {account_key} | Conta não encontrada para a chave fornecida: {account_key} |
| 403 | TED000014 | Invalid target account | Invalid target account | Conta destino inválida |
| 400 | TED000015 | Bad Request | Account blocked or closed can not perform this action | A conta bloqueada ou fechada não pode executar esta ação |
| 400 | TED000016 | Bad Request | Hub account can not perform this action | A conta hub não pode executar esta ação |
| 403 | TED000018 | Unauthorized | Provided account not owned by SELECTED_AGENT | Conta fornecida não pertencente ao SELECTED_AGENT |
| 400 | TED000031 | Bad Request | ISPB number {ispb} does not exist or is inactive | ISPB {ispb} não existe ou está inativo |
| 400 | TED000044 | Invalid Timestamp Format sent | Given parameter is not in the correct format {timestamp_format} | Parametro enviado não está no formato correto {timestamp_format} |
| 400 | TED000045 | Search Params Error | Invalid integer value for page or size querystring parameters | Valor inválido para parâmetros de página ou tamanho de página |
| 400 | TED000046 | Invalid uuid v4 string sent | {key} was not accepted for not being a valid uuid v4 string | {key} não foi aceito por não ser uma palavra uuid v4 válida |
| 400 | TED000054 | Invalid Transaction Amount | Transaction Amount {transaction_amount} is invalid | Valor de transação {transaction_amount} é inválido |
| 400 | TED000057 | Invalid Document Number | Given {document_number} document number is invalid | CPF/CNPJ {document_number} fornecido não é valido |
| 409 | TED000064 | Bad Request | request_control_key {request_control_key} already in use | request_control_key {request_control_key} já utilizada |
| 400 | TED000065 | Bad Request | It has been identified by request_control_key that this request is already being processed | Foi identificado por request_control_key que está requisição está sendo processada |
| 403 | TED000079 | No approver permission | Given document number does not belong to an approver for this account | Número de documento enviado não pertence a um aprovador da conta |
| 400 | TED000080 | tfa_info is required | Client must send object tfa_info | Cliente deve enviar objeto tfa_info |
| 400 | TED000081 | Error occurred while sending token | An unexpected error occurred while sending token | Um erro inexperado ocorreu ao tentar enviar token |
| 400 | TED000089 | Invalid Schedule Date | Schedule date must be after current date for UTC-3 | Data de agendamento deve ser após a data atual em UTC-3 |
| 400 | TED000090 | Invalid Schedule Date | Schedule date must be a workday | Data de agendamento deve ser um dia útil |
| 400 | TED000091 | Target Account and Source Account must be different | Target Account must not be the same as Source Account | A conta de destino não pode ser a mesma da conta de origem |