Create Rebate
Creating a rebate for the bank slip means reducing part of the base value of the title to decrease the final amount.
Attention!
If there is any pending rebate request waiting for confirmation, or any active rebate, creating a new rebate is not allowed. If there is an active rebate and you want to change it, a rebate cancellation request must be sent first. Once it is confirmed, it is possible to create another rebate.
Note: the rebate amount (rebate_amount) sent in the bank slip registration does not count as a pending rebate request, but counts as an active rebate request.
Request
ENDPOINT
/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/bank_slip/BANK_SLIP_KEY/rebateMETHOD
POSTPath parameters
| Field | Type | Description | Characters |
|---|---|---|---|
account_key | uuidv4 | Unique account identification key, in uuid v4 format | 36 |
requester_profile_key | uuidv4 | Unique wallet identification key, in uuid v4 format | 36 |
bank_slip_key | uuidv4 | Unique bank slip identification key, in uuid v4 format | 36 |
Request Body
{
"request_control_key": "d66b807a-25fa-4e21-b198-9beb221a29ce",
"rebate_amount": 150.00
}
Request Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
request_control_key * | uuidv4 | Unique request identification key used by the client in uuid v4 format | 36 |
rebate_amount * | float | Absolute rebate amount | - |
Response
STATUS
202Response Body
{
"occurrence_key": "7f01165b-fdd0-4f59-b231-42170ea90131",
"bank_slip_key": "dad779c1-5e1c-422e-9f36-c704916a87cf"
}
Response Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
occurrence_key * | uuidv4 | Unique occurrence (instruction) identification key in uuid v4 format | 36 |
bank_slip_key * | uuidv4 | Unique bank slip identification key in uuid v4 format | 36 |
Error Response
STATUS
4xxResponse 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 (pt-br)translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | Schema Error | Schema Inválido |
| 404 | BKS000006 | Not Found | The source account key was not found. | A chave da conta de origem não foi encontrada. |
| 400 | BKS000007 | Bad Request | It was not possible to consult the source account at this time. Please try again in a few minutes. | Não foi possível consultar a conta de origem neste momento. Por favor, tente novamente em alguns minutos. |
| 400 | BKS000008 | Bad Request | The source account is closed. | A conta de origem está fechada. |
| 400 | BKS000009 | Bad Request | The source account is blocked. | A conta de origem está bloqueada. |
| 404 | BKS000013 | Not Found | Requester profile not found | Carteira não encontrada |
| 409 | BKS000014 | Conflict | Request control key already sent or duplicated sent: <request_control_key> | Chave de controle da requisição já utilizada ou enviada duplicada: <request_control_key> |
| 400 | BKS000022 | Bad Request | Requester profile is not opened. | Carteira não está aberta. |
| 404 | BKS000029 | Not Found | Bank slip not found for the given key ({bank_slip_key}). | Boleto não encontrado para a chave fornecida ({bank_slip_key}). |
| 409 | BKS000030 | Conflict | There is already a pending rebate occurrence for this bank slip. | Já existe uma ocorrência de rebate pendente para este boleto. |
| 400 | BKS000032 | Bad Request | Bank slip must be in 'registered' status. | O boleto deve possuir o status 'registered'. |
| 409 | BKS000033 | Conflict | This bank slip already has an active rebate. You must send a 'cancel_rebate' occurrence before trying to create another one. one. | Este boleto já possui um rebate ativo. Você deve mandar uma ocorrência do tipo 'cancel_rebate' antes de tentar criar outro. |
| 400 | BKS000045 | Bad Request | Rebate amount can not be equal or greater than the bank slip amount. | O valor do rebate não pode ser igual ou maior do que o valor do boleto. |