# QI Tech — Lending-as-a-Service

Documentação da QI Tech em texto corrido, para colar em um LLM.
Fonte: https://docs.qitech.com.br
73 página(s).

Índice:
- Update credit debt purchaser (/en/documentation/emissao_de_divida/atualizar_cessionario_047911bb-d3fb-48fe-88fd-aebdeb7e11ad)
- Update Related Party Information for the Credit Contract (/en/documentation/emissao_de_divida/atualizar_dados_da_parte_relacionada)
- Authorize disbursement (/en/documentation/emissao_de_divida/autorizar_desembolso)
- Cancel debt before disbursement. (/en/documentation/emissao_de_divida/cancelamento/cancelar_divida_antes_de_desembolsar)
- Cancelar permanentemente (/en/documentation/emissao_de_divida/cancelamento/cancelar_permanentemente)
- Debt cancelation within 7 days of disbursement (/en/documentation/emissao_de_divida/cancelamento/desistencia/cancelamento_de_divida_em_ate_sete_dias_apos_o_desembolso)
- Query reversal pix qr code (/en/documentation/emissao_de_divida/cancelamento/desistencia/consulta_de_pix_qr_code_de_devolucao)
- Introduction (/en/documentation/emissao_de_divida/cancelamento/desistencia/introducao)
- Introduction (/en/documentation/emissao_de_divida/cancelamento/introducao)
- Error Catalog - Lending-as-a-Service (/en/documentation/emissao_de_divida/catalogo_de_erros_laas)
- Set disbursement date (/en/documentation/emissao_de_divida/configurar_data_de_desembolso)
- Debt inquiry (/en/documentation/emissao_de_divida/consulta_de_divida)
- Debt Query by Contract Number (/en/documentation/emissao_de_divida/consulta_por_contract_number)
- Debt Query by Credit Operation Key (/en/documentation/emissao_de_divida/consulta_por_credit_operation_key)
- Debt Inquiry by Requester Identifier Key (/en/documentation/emissao_de_divida/consulta_por_requester_identifier_key)
- Operation Disbursement (/en/documentation/emissao_de_divida/desembolso_da_operacao)
- Personal Debt Issuance (/en/documentation/emissao_de_divida/emissao/emissao_de_divida_pf)
- Issuance of Corporate debt (/en/documentation/emissao_de_divida/emissao/emissao_de_divida_pj)
- Example of disbursement payloads (/en/documentation/emissao_de_divida/emissao/exemplo_payloads_desembolso)
- Alternative Signatures (/en/documentation/emissao_de_divida/formalizacao/assinatura_de_contrato)
- Contract signing with OPT-IN (/en/documentation/emissao_de_divida/formalizacao/assinatura_opt_in)
- Sending the signed PDF (/en/documentation/emissao_de_divida/formalizacao/assinatura_pdf)
- Selfie Signatures (/en/documentation/emissao_de_divida/formalizacao/assinatura_selfie)
- Debt Formalization (/en/documentation/emissao_de_divida/formalizacao/introducao_formalizacao)
- Generate Bank Slip or PIX for an Installment (/en/documentation/emissao_de_divida/gerar_boleto_ou_pix_para_uma_parcela)
- Introduction (/en/documentation/emissao_de_divida/introducao)
- Banking correspondant monitoring (/en/documentation/emissao_de_divida/mcb)
- Metadata (/en/documentation/emissao_de_divida/metadata)
- Do not disturb (/en/documentation/emissao_de_divida/nao_me_perturbe)
- Introduction (/en/documentation/emissao_de_divida/reapresentacao_de_conta_bancaria)
- Resend related party documents for the credit contract (/en/documentation/emissao_de_divida/reenviar_documentos_das_partes_relacionadas)
- Reprocess post-disbursement action (/en/documentation/emissao_de_divida/reprocessar_acao_pos_desembolso)
- Editing disbursement bank account (/en/documentation/emissao_de_divida/reprocessar_multiplas_datas/trocar_conta)
- Editing disbursement date (/en/documentation/emissao_de_divida/reprocessar_multiplas_datas/trocar_data)
- Seguro (/en/documentation/emissao_de_divida/seguro)
- Legacy debt simulation (/en/documentation/emissao_de_divida/simulacao_de_divida_antigo)
- New debt simulation (/en/documentation/emissao_de_divida/simulacao_de_divida_novo)
- Error simulation in Sandbox (/en/documentation/emissao_de_divida/simulando_erros)
- Possible debt statuses (/en/documentation/emissao_de_divida/status_de_uma_divida)
- Consulta de instituições financeiras (/en/documentation/lista_de_instituicoes_financeiras/consulta_de_instituicoes_financeiras)
- Notification Configuration (/en/documentation/notificacoes/configuracao_de_notificacao)
- Template Configuration (/en/documentation/notificacoes/configuracao_template)
- Custom Notification Management (/en/documentation/notificacoes/introducao)
- Resending notifications (/en/documentation/notificacoes/reenvio_de_notificacoes)
- Templates (/en/documentation/notificacoes/template)
- Events (/en/documentation/notificacoes/tipos_de_evento)
- Setting Up the Webhook Receiving URL (/en/documentation/primeiros_passos/configurando_webhooks)
- Configuring Integration IP Allowlist (/en/documentation/primeiros_passos/configurar_ip_de_integracao)
- Introduction (/en/documentation/primeiros_passos/inicio)
- Test Endpoints (/en/documentation/primeiros_passos/teste_de_autenticacao/endpoints_de_teste)
- Possible errors: (/en/documentation/primeiros_passos/teste_de_autenticacao/possiveis_erros)
- Authentication test (/en/documentation/primeiros_passos/teste_de_autenticacao/teste_de_autenticacao_completo)
- Authentication test (/en/documentation/primeiros_passos/teste_de_autenticacao/teste_de_autenticacao_v2)
- Webhook (/en/documentation/primeiros_passos/teste_de_autenticacao/webhook_v2)
- Key Exchange (/en/documentation/primeiros_passos/troca_de_chaves)
- Consulta de valor presente de uma operação (/en/documentation/refinanciamento/consulta_de_valor_presente_de_uma_operacao)
- introducao (/en/documentation/refinanciamento/introducao)
- Refinancing Simulation (/en/documentation/refinanciamento/simulando_refinanciamento)
- Refinancing Creation (/en/documentation/refinanciamento/solicitando_refinanciamento)
- Cancelar uma renegociação (/en/documentation/renegociacao/cancelar_uma_renegociacao)
- Consult a renegotiation (/en/documentation/renegociacao/consultar_uma_renegociacao)
- Renegotiation Creation (/en/documentation/renegociacao/criacao_de_uma_renegociacao)
- List renegotiations (/en/documentation/renegociacao/listar_renegociacoes)
- Renegotiation Payment (/en/documentation/renegociacao/pagamento_renegociacao)
- Batch Renegotiation (/en/documentation/renegociacao/renegociacao_em_lote)
- Renegotiation simulation (/en/documentation/renegociacao/simulacao_de_uma_renegociacao)
- Document inquiry (/en/documentation/upload_de_documentos/consulta_documents)
- Documents upload (/en/documentation/upload_de_documentos/)
- Debt Webhooks (/en/documentation/webhooks/dividas)
- Risk management webhooks (/en/documentation/webhooks/gestao_de_risco)
- Overpayment webhooks (/en/documentation/webhooks/indevidos)
- Installment payment webhooks (/en/documentation/webhooks/pagamento_de_parcela)
- Installment Webhooks (/en/documentation/webhooks/parcelas)

---

# Update credit debt purchaser

URL: /en/documentation/emissao_de_divida/atualizar_cessionario_047911bb-d3fb-48fe-88fd-aebdeb7e11ad

    ### Important:

    To update the credit debt purchaser, the following requirements must be met:
    - the credit operation cannot be cancelled;
    - the credit operation cannot be in the assignment processing stage;
    - the credit operation cannot be assigned;
    - there must be an active assignment configuration with the new purchaser.

## Request

ENDPOINT /debt/ DEBT-KEY /purchaser
MÉTODO PATCH

**Request Body**

```json
{
  "purchaser_document_number": "01234567890001"
}
```

### PATH PARAMS

| Field        | Type   | Description |
|--------------|--------|-------------|
| `debt_key` * | string | Debt Id.    |

## Response

STATUS 201

**Response Body**

```json
{}
```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Credit Operation is already in assignment process for changing the purchaser.\", \"translation\": \"A opera\u00e7\u00e3o de cr\u00e9dito est\u00e1 em processo de cess\u00e3o e n\u00e3o pode ter seu comprador alterado.\", \"extra_fields\": {}, \"code\": \"COP000376\"}"
}
```

---

# Update Related Party Information for the Credit Contract

URL: /en/documentation/emissao_de_divida/atualizar_dados_da_parte_relacionada

## Request

ENDPOINT /debt/ DEBT-KEY /related_party/ RELATED-PARTY-KEY
METHOD PATCH

### Pessoa Física
**Request Body**

```json
{
  "name": "Teste teste",
  "email": "teste@teste.com",
  "address": {
    "street": "Rua teste",
    "neighborhood": "Bairro teste",
    "number": "123",
    "postal_code": "09725540",
    "city": "S\u00e3o Caetano do sul",
    "state": "SP"
  },
  "phone": {
    "country_code": "55",
    "area_code": "11",
    "number": "41234123"
  },
  "mother_name": "M\u00e3e Teste",
  "document_identification_number": "1234567",
  "nationality": "Brasileiro",
  "marital_status": "single",
  "profession": "Diretor Executivo",
  "birth_date": "1999-01-01",
  "document_identification_date": "2015-01-01",
  "document_identification_type": "cnh",
  "gender": "female"
}
```

### Pessoa Jurídica
**Request Body**

```json
{
	"name": "Teste teste",
	"email": "teste@teste.com",
	"address": {
		"street": "Rua teste",
		"neighborhood": "Bairro teste",
		"number": "123",
		"postal_code": "09725540",
		"city": "S\u00e3o Caetano do sul",
		"state": "SP"
	},
	"phone": {
		"country_code": "55",
		"area_code": "11",
		"number": "41234123"
	},
	"trading_name": "Nome fantasia teste",
	"foundation_date": "2020-01-01",
	"simples_nacional_participant": false
}
```

### PATH PARAMS

| Field | Type | Description |
|---|---|---|
| `debt_key` * | string | Operation debt_key. |
| `related_party_key` * | string |  Key of the related party to whom the documents will be sent. |

## Response

STATUS 201

**Response Body**

```json
{
	"status": "waiting_signature",
	"data": {
		"annual_cet": 26.0802,
		"cet": 1.95,
		"installments": [**],
		"disbursed_issue_amount": 2209.06,
		"contract_fees": [{
			"fee_amount": 22.71,
			"fee_type": "spread"
		}],
		"prefixed_interest_rate": {
			"created_at": "2023-07-21T16:30:07",
			"interest_base": "calendar_days_365",
			"annual_rate": 0.23872053,
			"monthly_rate": 0.018,
			"daily_rate": 0.00058669
		},
		"contract_fee_amount": 22.71,
		"requester_identifier_key": "af0e8a5d-650e-4348-b955-a424307c44df",
		"iof_charge_method": "financed",
		"external_contract_fee_amount": 0,
		"borrower": {
			"document_number": "04062377942",
			"related_party_key": "c3b213ee-897a-4e42-9697-6c0b56fb0020",
			"name": "TESTE TESTE"
		},
		"additional_iof": 8.629534,
		"entry": null,
		"external_contract_fees": [**],
		"collaterals": [**],
		"total_pre_fixed_amount": 1088.47822388,
		"contract": {
			"urls": [
				"https://storage.googleapis.com/live-doc-api/documents/a0e3678a-9d48-47e8-8e00-ed9435713588/teste.pdf"
			],
			"number": "0008938245/TT"
		},
		"net_external_contract_fee_amount": 0,
		"number_of_installments": 8,
		"total_iof": 61.87,
		"base_iof": 53.2421439,
		"issue_amount": 2270.93,
		"assignment_amount": 2293.64
	},
	"event_datetime": "2023-07-21 16:30:11",
	"webhook_type": "debt",
	"key": "01d62579-be1e-482f-b766-069786b44344"
}
```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Collateral type social_security is not allowed for update related party.\", \"translation\": \"O tipo de garantia social_security n\u00e3o permite atualizar a parte relacionada.\", \"extra_fields\": {}, \"code\": \"COP000328\"}"
}
```

---

# Authorize disbursement

URL: /en/documentation/emissao_de_divida/autorizar_desembolso

## Request

ENDPOINT /debt/ DEBT-KEY /allow_disbursement
METHOD POST

**Request Body**

```json
{
   "allow_disbursement": true
}

```

### PATH PARAMS

| Field | Type | Description |
|---|---| ---|
| `debt_key` *(mandatory)* | string | Issued debt KEY. |

### BODY PARAMS

| Field | Type | Description |
|---|---| ---|
| `allow_disbursement` | string | Disbursement authorization indication. |

## Response

STATUS 400

**Request Body**

```json

"encurtar o json"

```

STATUS 400

**Request Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Cancel debt before disbursement.

URL: /en/documentation/emissao_de_divida/cancelamento/cancelar_divida_antes_de_desembolsar

## Request

ENDPOINT /debt/ DEBT-KEY /cancel
METHOD PATCH

## Response

STATUS 200

Response Body

```json
{
  "data": [
    {
      "borrower": {
        "document_number": "68394265057",
        "name": "Xuxa Meneguel"
      },
      "contract_fee_amount": 5.56,
      "installments": [
        {
          "bank_slip_key": null,
          "calendar_days": 57,
          "due_date": "2020-09-30",
          "due_principal": -0.00217819,
          "fine_amount": null,
          "has_interest": true,
          "installment_key": "28eb5907-ed25-4a86-bb9d-b6dc944f13df",
          "installment_number": 1,
          "installment_status": "opened",
          "installment_type": "principal",
          "paid_amount": 0,
          "post_fixed_amount": 0,
          "pre_fixed_amount": 268.75782181,
          "principal_amortization_amount": 1111.9,
          "tax_amount": 0,
          "total_amount": 1380.66,
          "workdays": 40
        }
      ],
      "operation_key": "7986dcc7-4331-478f-af47-adfbdf7f4a36",
      "status": "opened"
    }
  ],
  "pagination": {
    "current_page": 1,
    "next_page": null,
    "rows_per_page": 100,
    "total_pages": 1,
    "total_rows": 55
  }
}

```

STATUS 400

Response Body

```json
{
  "title": "Bad Request",
  "description": "Operation cc5075bb-cfc3-4cd3-a9b5-527978de673c actual status does not allow cancel operation. Actual status is canceled",
  "translation": "Status da operação cc5075bb-cfc3-4cd3-a9b5-527978de673c não permite cancelamento.Status atual: canceled",
  "code": "LEG000073"
}
```

## PATH PARAMS

| Field | Type | Description |
|---|---| ---|
| `debt_key` * | string | Debt key returned at the moment of credit operation creation. |

---

# Cancelar permanentemente

URL: /en/documentation/emissao_de_divida/cancelamento/cancelar_permanentemente

## Request

ENDPOINT /debt/ debt_key /cancel_permanently
MÉTODO POST

## Response

STATUS 200

Response Body

```json
{
  "data": {
    "additional_iof": 38000,
    "annual_cet": "253,2642%",
    "assignment_amount": 10000000,
    "base_iof": 69331,
    "borrower": {
      "document_number": "89940878025962",
      "name": "Parmalat"
    },
    "cet": "11,0900%",
    "collaterals": [],
    "contract": {
      "external_contract_key": "2f0b8b6e-0b60-47f0-b27f-e291c028549b",
      "number": "1907258737/P",
      "signature_information": [
        {
          "signature_url": "https://sign.qitech.com.br/s/hNrwjda",
          "signer_document_number": "94632180173",
          "signer_email": "pedro.alves@yopmail.com",
          "signer_external_key": "07a1c438-43a4-49a9-85a9-29667507453b",
          "signer_name": "Pedro Felipe Henrique Alves",
          "signer_role": "issuer"
        },
        {
          "signature_url": "https://sign.qitech.com.br/s/EaTajda",
          "signer_document_number": "34651104630",
          "signer_email": "patricia.tereza@yopmail.com",
          "signer_external_key": "61a1ea50-769a-410a-8ef8-09f0ce4611f6",
          "signer_name": "Patrícia Tereza Bernardes",
          "signer_role": "guarantor"
        }
      ],
      "urls": [
        "https://storage.googleapis.com/sandbox-doc-api/documents/abedfeab-dcf8-4e13-897b-da02c222cef4/SALGADINHO_SALETE_LTDA-PARMALAT-CCB-1907258737-20220512165254.pdf"
      ]
    },
    "contract_fee_amount": 50000,
    "contract_fees": [
      {
        "fee_amount": 50000,
        "fee_type": "tac"
      }
    ],
    "external_contract_fee_amount": 0,
    "external_contract_fees": [],
    "installments": [
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2019-08-26",
        "calendar_days": 32,
        "digitable_line": null,
        "due_date": "2019-08-26",
        "due_interest": null,
        "due_principal": 10000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "81e4a732-d300-4e39-b6d5-2d9ac8df429b",
        "installment_number": 1,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 10000000,
        "original_pre_fixed_amount": 1125598.54,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 1125598.54,
        "principal_amortization_amount": 1000000,
        "tax_amount": 1312,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 22
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2019-09-25",
        "calendar_days": 30,
        "digitable_line": null,
        "due_date": "2019-09-25",
        "due_interest": null,
        "due_principal": 9000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "bac4fe3e-9559-4380-9f4b-bdda3492738e",
        "installment_number": 2,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 9000000,
        "original_pre_fixed_amount": 946509.06,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 946509.06,
        "principal_amortization_amount": 1000000,
        "tax_amount": 2542,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 22
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2019-10-25",
        "calendar_days": 30,
        "digitable_line": null,
        "due_date": "2019-10-25",
        "due_interest": null,
        "due_principal": 8000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "aaaec4d7-94a0-418d-8a8e-ac7af6787aec",
        "installment_number": 3,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 8000000,
        "original_pre_fixed_amount": 841341.39,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 841341.39,
        "principal_amortization_amount": 1000000,
        "tax_amount": 3772,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 22
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2019-11-25",
        "calendar_days": 31,
        "digitable_line": null,
        "due_date": "2019-11-25",
        "due_interest": null,
        "due_principal": 7000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "bead5a38-c56e-4cfc-98f9-af6d71ec7d65",
        "installment_number": 4,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 7000000,
        "original_pre_fixed_amount": 762003.23,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 762003.23,
        "principal_amortization_amount": 1000000,
        "tax_amount": 5043,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 20
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2019-12-26",
        "calendar_days": 31,
        "digitable_line": null,
        "due_date": "2019-12-26",
        "due_interest": null,
        "due_principal": 6000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "350a89e3-58a7-4879-b7ff-5fa0391da39c",
        "installment_number": 5,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 6000000,
        "original_pre_fixed_amount": 653145.63,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 653145.63,
        "principal_amortization_amount": 1000000,
        "tax_amount": 6314,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 22
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2020-01-27",
        "calendar_days": 32,
        "digitable_line": null,
        "due_date": "2020-01-27",
        "due_interest": null,
        "due_principal": 5000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "bf935dc2-3151-4f66-91c6-35e446b57f2e",
        "installment_number": 6,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 5000000,
        "original_pre_fixed_amount": 562799.27,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 562799.27,
        "principal_amortization_amount": 1000000,
        "tax_amount": 7626,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 20
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2020-02-26",
        "calendar_days": 30,
        "digitable_line": null,
        "due_date": "2020-02-26",
        "due_interest": null,
        "due_principal": 4000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "76aad8ce-3ee1-464c-90db-d72a2729560e",
        "installment_number": 7,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 4000000,
        "original_pre_fixed_amount": 420670.69,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 420670.69,
        "principal_amortization_amount": 1000000,
        "tax_amount": 8856,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 20
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2020-03-25",
        "calendar_days": 28,
        "digitable_line": null,
        "due_date": "2020-03-25",
        "due_interest": null,
        "due_principal": 3000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "fc190222-5baf-4023-9e93-95b25774a37e",
        "installment_number": 8,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 3000000,
        "original_pre_fixed_amount": 293473.82,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 293473.82,
        "principal_amortization_amount": 1000000,
        "tax_amount": 10004,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 20
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2020-04-27",
        "calendar_days": 33,
        "digitable_line": null,
        "due_date": "2020-04-27",
        "due_interest": null,
        "due_principal": 2000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "7c2972a8-def7-4b76-b215-0ade0a5bca13",
        "installment_number": 9,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 2000000,
        "original_pre_fixed_amount": 232548.93,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 232548.93,
        "principal_amortization_amount": 1000000,
        "tax_amount": 11357,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 21
      },
      {
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2020-05-25",
        "calendar_days": 28,
        "digitable_line": null,
        "due_date": "2020-05-25",
        "due_interest": null,
        "due_principal": 1000000,
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "d848c880-f489-4bc1-a9e4-101f8d664317",
        "installment_number": 10,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 1000000,
        "original_pre_fixed_amount": 97824.6,
        "original_principal_amortization_amount": 1000000,
        "original_total_amount": null,
        "paid_amount": 0,
        "paid_at": null,
        "payments": [],
        "post_fixed_amount": null,
        "pre_fixed_amount": 97824.6,
        "principal_amortization_amount": 1000000,
        "tax_amount": 12505,
        "total_amount": null,
        "total_paid_amount": 0,
        "workdays": 19
      }
    ],
    "iof_charge_method": "financed",
    "issue_amount": 10000000,
    "net_external_contract_fee_amount": 0,
    "number_of_installments": 10,
    "post_fixed_interest_base": "workdays",
    "post_fixed_interest_rate": 1,
    "prefixed_interest_rate": {
      "annual_rate": 2.32,
      "created_at": null,
      "daily_rate": 0.0033388,
      "interest_base": "calendar_days",
      "monthly_rate": 0.10516767
    },
    "requester_identifier_key": "b7ddbcfb-3de0-49d8-8014-07972d8b27f2",
    "total_iof": 107331,
    "total_pre_fixed_amount": 5935915.16
  },
  "event_datetime": "2022-05-12 16:53:10",
  "key": "b7ddbcfb-3de0-49d8-8014-07972d8b27f2",
  "status": "waiting_signature",
  "webhook_type": "debt"
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

---

# Debt cancelation within 7 days of disbursement

URL: /en/documentation/emissao_de_divida/cancelamento/desistencia/cancelamento_de_divida_em_ate_sete_dias_apos_o_desembolso

## Request

ENDPOINT /debt/reversal
METHOD POST

Request Body

```json
{
    "contract_number": "0000049343/TW"
}

```

## Response

STATUS 200

Response Body

```json
{
  "amount": "2026.93",
  "copy_paste_pix": "00020126930014br.gov.bcb.pix2571qrcode-h.dev.qitech.app/bacen/cobv/dece8d3e-32ce-439e-8204000053039865802BR5925Joao61080150400062070503***63046ECD",
  "expiration_date": "2022-09-28",
  "payer_document_number": "000000000008",
  "payer_name": "Teste",
  "reversal_key": "f98a1b7c-5e3c-4e6f-8887-c7fedfa0d5b5",
  "status": "waiting_payment"
}

```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

## Definições
| Field             | Type   | Description                      | Max. Caract. |
|-------------------|--------|--------------------------------|--------------|
| `contract_number` * | string | Credit contract number.      |              |

---

# Query reversal pix qr code

URL: /en/documentation/emissao_de_divida/cancelamento/desistencia/consulta_de_pix_qr_code_de_devolucao

Returns the reversal pix qr code previously generated for a credit operation that is being canceled. Use this endpoint after creating the reversal at `/debt/reversal` to retrieve the qr code data again (for example, to re-display it to the payer).

## Request

ENDPOINT /credit_operation/{credit_operation_key}/pix_qrcode
METHOD GET

:::info
This request has no body. The `credit_operation_key` must be provided as a path parameter in the URL.
:::

## Response

STATUS 200

Response Body

```json
{
  "amount": "2026.93",
  "copy_paste_pix": "00020126930014br.gov.bcb.pix2571qrcode-h.dev.qitech.app/bacen/cobv/dece8d3e-32ce-439e-8204000053039865802BR5925Joao61080150400062070503***63046ECD",
  "debt_key": "a1f3d9c0-8b7e-4c9f-9d1a-1234567890ab",
  "expiration_date": "2022-09-28",
  "payer_document_number": "000000000008",
  "payer_name": "Teste",
  "qr_code_key": "7c3e5b22-4d8e-4a6b-9f11-abcdef123456",
  "reversal_key": "f98a1b7c-5e3c-4e6f-8887-c7fedfa0d5b5",
  "status": "waiting_payment"
}
```

STATUS 404

Response Body — Credit Operation not found

```json
{
  "data": "{\"title\": \"Not Found\", \"description\": \"Credit Operation not found\", \"translation\": \"Operação não encontrada\", \"extra_fields\": {}, \"code\": \"COP000027\"}"
}
```

Response Body — Reversal not found

```json
{
  "data": "{\"title\": \"Not Found\", \"description\": \"Reversal not found.\", \"translation\": \"Estorno não encontrado.\", \"extra_fields\": {}, \"code\": \"COP000205\"}"
}
```

## Definitions

### Path parameters

| Field | Type | Description |
|-------|------|-------------|
| `credit_operation_key` * | string (uuid) | Unique key of the credit operation for which the reversal pix qr code was generated. |

### Response fields

| Field | Type | Description |
|-------|------|-------------|
| `amount` | string | Reversal pix qr code amount, in BRL. |
| `copy_paste_pix` | string | Pix copy-and-paste code to be used for payment. |
| `debt_key` | string (uuid) | Key of the credit operation (debt) associated with the reversal. |
| `expiration_date` | string (date) | Expiration date of the pix qr code, in `YYYY-MM-DD` format. |
| `payer_document_number` | string | Payer's CPF/CNPJ. |
| `payer_name` | string | Payer's name. |
| `qr_code_key` | string (uuid) | Unique key of the issued pix qr code. |
| `reversal_key` | string (uuid) | Unique key of the reversal associated with the pix qr code. |
| `status` | string | Current status of the pix qr code (e.g., `waiting_payment`). |

---

# Introduction

URL: /en/documentation/emissao_de_divida/cancelamento/desistencia/introducao

In order to comply with the Consumer Protection Code, which allows the borrower to cancel the debt within 7 days through digital means, QI Tech has enabled a specific functionality to accommodate these cases.

## Operation

In QI Tech's systems, there are two ways to cancel a debt due to withdrawal within 7 days:

### 1 -Through Pix chargeback

If the borrower received the disbursement via Pix, it is possible to cancel the operation through a chargeback of the full disbursed amount up to 7 days after the disbursement date.

### 2 - Through the cancellation API

Using the [POST /debt/reversal](cancelamento_de_divida_em_ate_sete_dias_apos_o_desembolso) endpoint, it is possible to generate a QR code which, once paid by the borrower, cancels the operation.

In both cases, once the money reaches QI Tech, the operation is canceled, and if the contract assignment has already occurred, the amount is refunded to the assignee. This endpoint can be used up to 7 days after disbursement, and the expiration of the QR Code is set to 14 days after its generation. After this period, it is no longer possible to cancel the contract.

## Requirements

For the proper functioning of this endpoint, it is necessary to contact the QI Tech support team to enable the endpoint and configure the assignee's account for funds reversal.

---

# Introduction

URL: /en/documentation/emissao_de_divida/cancelamento/introducao

There are two types of debt cancellations that can be performed through QI Tech's systems.

1 - Cancellation before disbursement;

2 - Cancellation up to seven days after disbursement;

---

# Error Catalog - Lending-as-a-Service

URL: /en/documentation/emissao_de_divida/catalogo_de_erros_laas

Below are all errors that may be returned by Lending-as-a-Service APIs.
Each error code has a unique identifier that can be used as a reference.

## Common Errors

Errors shared across all platform APIs.

| Code | HTTP | Message |
|-|-|-|
| <a id="QIT000001"></a>`QIT000001` | 400 | **Schema Validator Error**<br/>{description}<br/><small>Payload Inválido</small> |
| <a id="QIT000002"></a>`QIT000002` | 403 | **Permission Validator Error**<br/>Request must be internal |
| <a id="QIT000003"></a>`QIT000003` | 403 | **Permission Validator Error**<br/>The agent does not have enough roles.<br/><small>O agente não tem funções suficientes.</small> |
| <a id="QIT000004"></a>`QIT000004` | 403 | **Permission Validator Error**<br/>Selected agent and person_key are different<br/><small>Agente selecionado e person_key são diferentes</small> |
| <a id="QIT000005"></a>`QIT000005` | 403 | **Permission Validator Error**<br/>Selected agent do not own this item.<br/><small>O agente selecionado não é dono do item.</small> |
| <a id="QIT000006"></a>`QIT000006` | 403 | **Permission Validator Error**<br/>Selected agent do not own this item and has not enough roles.<br/><small>Agente selecionado não é dono deste item e não tem funções suficientes.</small> |
| <a id="QIT000007"></a>`QIT000007` | - | **External API Error (Rest Connector)**<br/>{description}<br/><small>{translation}</small> |
| <a id="QIT000010"></a>`QIT000010` | 400 | **Search Params Error**<br/>Invalid integer value for page or size querystring parameters<br/><small>Valor inválido para parâmetros página ou tamanho de página</small> |
| <a id="QIT000400"></a>`QIT000400` | 400 | **Bad Request**<br/>The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing)<br/><small>O servidor não pode ou não processará a requisição devido a um erro do cliente (por exemplo, corpo da requisição inválido, tamanho muito grande, formatação da mensagem inválida ou rota inválida)</small> |
| <a id="QIT000404"></a>`QIT000404` | 404 | **Not Found**<br/>The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible<br/><small>O resource solicitado não pôde ser encontrado, mas pode estar disponível no futuro. Requests subsequentes do cliente são permitidos</small> |
| <a id="QIT000500"></a>`QIT000500` | 500 | **Internal Error**<br/>An internal error has occurred and its being investigated.<br/><small>Um erro interno aconteceu e está sendo investigado.</small> |
| <a id="QIT000753"></a>`QIT000753` | 500 | **Internal Error**<br/>An internal error has occurred and its being investigated.<br/><small>Um erro interno aconteceu e está sendo investigado.</small> |

## Specific Errors

### COP — Credit Operations

468 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="COP000001"></a>`COP000001` | 400 | **Bad Request**<br/>Line: {index}. Invalid {value} value sent<br/><small>Linha: {index}. Valor enviado {value} inválido</small> |
| <a id="COP000002"></a>`COP000002` | 400 | **Bad Request**<br/>[{value}] Column missing<br/><small>[{value}] Coluna faltando</small> |
| <a id="COP000003"></a>`COP000003` | 400 | **Bad Request**<br/>No positions found<br/><small>Posições não encontradas</small> |
| <a id="COP000004"></a>`COP000004` | 400 | **Bad Request**<br/>Line: {index}. Invalid {value} date sent<br/><small>Linha: {index}. Data enviada {value} inválida</small> |
| <a id="COP000005"></a>`COP000005` | 400 | **Bad Request**<br/>CSV file not sent<br/><small>Arquivo CSV não enviado</small> |
| <a id="COP000006"></a>`COP000006` | 404 | **Not Found**<br/>Assignment not found for assignment_key {assignment_key}<br/><small>Cessão não encontrado para assignment_key {assignment_key}</small> |
| <a id="COP000007"></a>`COP000007` | 404 | **Not Found**<br/>No requester_configuration found for requester_key {requester_key}<br/><small>Configuração do solicitante não encontrada para a requester_key {requester_key}</small> |
| <a id="COP000008"></a>`COP000008` | 404 | **Not Found**<br/>Active configuration not found for requester_key {requester_key} and purchaser with CNPJ {document_number}<br/><small>Configuração ativa não encontrada para requester_key {requester_key} e cessionário com CNPJ {document_number}</small> |
| <a id="COP000009"></a>`COP000009` | 404 | **Not Found**<br/>Purchaser with CNPJ {purchaser_document_number} not found<br/><small>Cessionário com CNPJ {purchaser_document_number} não encontrado</small> |
| <a id="COP000010"></a>`COP000010` | 400 | **Bad Request**<br/>No purchaser defined for credit_operation {credit_operation_key}. Purchaser is required to assign a debt emission<br/><small>Cessionário não definido para a credit_operation {credit_operation_key}. Necessário para designar a emissao de dívida</small> |
| <a id="COP000011"></a>`COP000011` | 400 | **Bad Request**<br/>Different purchasers defined. Assignment operations can only assign debt emissions grouping them by the same purchaser.<br/><small>Cessionários diferentes. As cessões só podem atribuir a emissão de dívidas para um mesmo cessionário.</small> |
| <a id="COP000012"></a>`COP000012` | 422 | **Unprocessable Entity**<br/>Credit Operation {credit_operation_key} status is {co_status}. Can't create assignment<br/><small>O status da operação {credit_operation_key} é {co_status}. Não é possivel criar a cessão</small> |
| <a id="COP000013"></a>`COP000013` | 400 | **Bad Request**<br/>Different third_party_account_key between requester {requester_key} and credit_operation with key {credit_operation_key}<br/><small>third_party_account_key diferente entre o solicitante {requester_key} e credit_operation com a chave {credit_operation_key}</small> |
| <a id="COP000014"></a>`COP000014` | 400 | **Bad Request**<br/>Different credit operation ownership. Assignment operations can only assign debt emissions with the same owner.<br/><small>Propriedade diferente da operação de crédito. As cessões só podem atribuir emissões de dívida com o mesmo proprietário.</small> |
| <a id="COP000015"></a>`COP000015` | 400 | **Bad Request**<br/>Credit Operation {credit_operation_key} already has an assignment {assignment_key} with status {assignment_status_enumerator}.<br/><small>Operação {credit_operation_key} já foi cessionada {assignment_key} com status {assignment_status_enumerator}.</small> |
| <a id="COP000016"></a>`COP000016` | 400 | **Bad Request**<br/>Non existent document_key received, and requester doesn't have an assignment_template_key registered for purchaser with CNPJ {document_number}. One of them must exist to create an assignment.<br/><small>Chave do documento não existe e solicitante não possui assignment_template_key registrada para o cessionário com CNPJ {document_number}. Um dos dois deve existir para criar uma cessão.</small> |
| <a id="COP000017"></a>`COP000017` | 400 | **Bad Request**<br/>Document not found for key {document_key}<br/><small>Documento {document_key} não encontrado</small> |
| <a id="COP000018"></a>`COP000018` | 423 | **Locked**<br/>Operation window closed. System available from {OPENING_TIME} to {CLOSING_TIME}<br/><small>Operação encerrada. Sistema disponível de {OPENING_TIME} até {CLOSING_TIME}</small> |
| <a id="COP000019"></a>`COP000019` | 423 | **Locked**<br/>Operation window closed. System available only during work days.<br/><small>Operação encerrada. Sistema disponível somente em dias úteis.</small> |
| <a id="COP000020"></a>`COP000020` | 404 | **Not Found**<br/>No correspondent requester configuration exists in the database. Keep in mind that there is a fallback to null issuer_document_number<br/><small>requester_configuration correspondente não encontrada no banco de dados. Lembre-se de que existe um fallback para issuer_document_number nulo</small> |
| <a id="COP000021"></a>`COP000021` | 422 | **Invalid Data**<br/>Credit operation has invalid data: impossible to calculate values for expected disbursed amount<br/><small>A operação possui dados inválidos: impossível calcular valores para o desembolso esperado</small> |
| <a id="COP000022"></a>`COP000022` | 404 | **Not Found**<br/>Issuer not found<br/><small>Emissor não encontrado</small> |
| <a id="COP000023"></a>`COP000023` | 400 | **Bad Request**<br/>Document Key or document batch key must not be Null<br/><small>Chave do documento ou do lote de documentos não pode ser nula</small> |
| <a id="COP000024"></a>`COP000024` | 400 | **Bad Request**<br/>Status must not be Null<br/><small>Status não pode ser nulo</small> |
| <a id="COP000025"></a>`COP000025` | 400 | **Bad Request**<br/>Outgoing TED Key must not be Null<br/><small>Chave da TED de saída (outgoing_ted_key) não pode ser nula</small> |
| <a id="COP000026"></a>`COP000026` | 400 | **Bad Request**<br/>CO Key (credit_operation_key) must not be Null<br/><small>Chave da CO (credit_operation_key) não pode ser nula</small> |
| <a id="COP000027"></a>`COP000027` | 404 | **Not Found**<br/>Credit Operation not found<br/><small>Operação não encontrada</small> |
| <a id="COP000028"></a>`COP000028` | 400 | **Bad Request**<br/>{errors}<br/><small>{translated_errors}</small> |
| <a id="COP000029"></a>`COP000029` | 400 | **Bad Request**<br/>Parameter key or bank_slip_key is missing.<br/><small>O parâmetro key ou bank_slip_key está faltando.</small> |
| <a id="COP000030"></a>`COP000030` | 422 | **Unprocessable Entity**<br/>There is no rebate account in the requester configuration to send the rebate amount (payload external_contract_fee_amount is greater than 0)<br/><small>Não há uma conta de reembolso na configuração do solicitante para enviar o valor do reembolso (payload external_contract_fee_amount é maior que 0)</small> |
| <a id="COP000031"></a>`COP000031` | 422 | **Unprocessable Entity**<br/>External contract fee type was not specified in the requester configuration (payload external_contract_fee_amount is greater than 0)<br/><small>O tipo de taxa do contrato externo não foi especificado na configuração do solicitante (payload external_contract_fee_amount é maior que 0)</small> |
| <a id="COP000032"></a>`COP000032` | 422 | **Unprocessable Entity**<br/>Requester configuration has incomplete rebate data. In order to use requester configuration, either all rebate data must be filled or all of it has to be nullified<br/><small>A configuração do solicitante possui dados de descontos incompletos. Para usar a configuração do solicitante, todos os dados de descontos devem ser preenchidos ou todos devem ser anulados</small> |
| <a id="COP000034"></a>`COP000034` | 400 | **Bad Request**<br/>Missing purchaser configuration<br/><small>Configuração do cessionário ausente</small> |
| <a id="COP000035"></a>`COP000035` | 400 | **Bad Request**<br/>Requester not allowed to create a credit operation without purchaser<br/><small>Solicitante não tem permissão para criar uma operação sem o cessionário</small> |
| <a id="COP000036"></a>`COP000036` | 422 | **Unprocessable Entity**<br/>Invalid percentage receivable: total percentage is different than 100%<br/><small>Porcentagem inválida: o valor total é diferente de 100%</small> |
| <a id="COP000037"></a>`COP000037` | 400 | **Bad Request**<br/>Missing third_party_account<br/><small>conta de origem de desembolso não cadastrada</small> |
| <a id="COP000038"></a>`COP000038` | 422 | **Unprocessable Entity**<br/>Requester configuration fee amount is a percentage greater than 100%. Please check requester configuration data.<br/><small>O valor da taxa da configuração do solicitante é uma porcentagem superior a 100%. Verifique os dados da configuração do solicitante.</small> |
| <a id="COP000039"></a>`COP000039` | 400 | **Bad Request**<br/>Credit Operation with IF Code = {if_code} not found<br/><small>Operação com código da instituição financeira {if_code} não encontrada</small> |
| <a id="COP000040"></a>`COP000040` | 400 | **Bad Request**<br/>Credit Operation with IF Code = {if_code} does not have a payable installment yet<br/><small>Operação com código da instituição financeira {if_code} ainda não tem uma parcela a pagar</small> |
| <a id="COP000041"></a>`COP000041` | 400 | **Bad Request**<br/>CSV Complement for Credit Operation with IF Code = {if_code} already read<br/><small>CSV complementar para operação de crédito com código IF = {if_code} já lido</small> |
| <a id="COP000042"></a>`COP000042` | 400 | **Bad Request**<br/>Cetip Control Message LTR = {control_number_ltr} already processed<br/><small>Mensagem de controle da Cetip LTR = {control_number_ltr} já foi processada</small> |
| <a id="COP000043"></a>`COP000043` | 400 | **Bad Request**<br/>Cetip LTR Confirmation = {control_number_if} Request Message not found<br/><small>Confirmação Cetip LTR = {control_number_if} Mensagem solicitada não encontrada</small> |
| <a id="COP000044"></a>`COP000044` | 400 | **Bad Request**<br/>Cetip Control Message LTR Confirmation = {control_number_ltr} already processed<br/><small>Confirmação LTR da mensagem de controle Cetip = {control_number_ltr} já processada</small> |
| <a id="COP000045"></a>`COP000045` | 400 | **Bad Request**<br/>No CETIP Settlement found to confirm for the LTR Confirmation {control_number_ltr}<br/><small>Nenhuma liquidação encontrada está pendente confirmação para a Confirmação LTR {control_number_ltr}</small> |
| <a id="COP000046"></a>`COP000046` | 400 | **Bad Request**<br/>Expected value {expected_amount} is different from cetip message {amount}<br/><small>Valor esperado {expected_amount} é diferente da mensagem da cetip {amount}</small> |
| <a id="COP000048"></a>`COP000048` | 409 | **Conflict**<br/>Installment number {installment_number} from operation with IF Code = {if_code} is not ready for payment yet<br/><small>O número da parcela {installment_number} da operação com Código IF = {if_code} ainda não está pronto para o pagamento</small> |
| <a id="COP000049"></a>`COP000049` | 400 | **Bad Request**<br/>Number of installments  or 'number of installments - principal grace period' cannot be zero.<br/><small>O número de parcelas ou 'número de parcelas - período de carência  não pode ser zero.</small> |
| <a id="COP000050"></a>`COP000050` | 400 | **Bad Request**<br/>Credit Operation Information can not calculate cet<br/><small>Não foi possível calcular cet da operação</small> |
| <a id="COP000051"></a>`COP000051` | 400 | **Bad Request**<br/>To execute bankslip payment method without a creditor_bank_account, issuer must be a valid person on onboarding.<br/><small>Para executar o método de pagamento de boleto bancário sem uma creditor_bank_account, o emissor deve ser uma pessoa válida na integração.</small> |
| <a id="COP000052"></a>`COP000052` | 400 | **Bad Request**<br/>To execute bankslip payment method, issuer must be a valid person on onboarding.<br/><small>Para executar o método de pagamento de boleto bancário, o emissor deve ser uma pessoa válida na integração.</small> |
| <a id="COP000053"></a>`COP000053` | 400 | **Bad Request**<br/>Integrated Payment Method needs minimum of one disbursement account<br/><small>O método de pagamento integrado precisa de no mínimo uma conta de desembolso</small> |
| <a id="COP000054"></a>`COP000054` | 400 | **Bad Request**<br/>Internal disbursement account of number {account_number}-{account_branch} is invalid.<br/><small>Conta de desembolso interna com número {account_number}-{account_branch} inválida</small> |
| <a id="COP000055"></a>`COP000055` | 400 | **Bad Request**<br/>Integrated Payment Method needs settlement bank account key or a internal disbursement account to perform installment payment.<br/><small>O Método de pagamento integrado precisa da chave da conta bancária de liquidação ou de uma conta de desembolso interna para efetuar o pagamento parcelado</small> |
| <a id="COP000056"></a>`COP000056` | 400 | **Bad Request**<br/>Invalid settlement bank account key.<br/><small>Chave de conta bancária de liquidação inválida.</small> |
| <a id="COP000057"></a>`COP000057` | 400 | **Bad Request**<br/>Disbursement accounts' receivable specification must not be of mixed nature (absolute and percentage values).<br/><small>A especificação de recebimento das contas de desembolsos não deve ser de natureza mista (valores absolutos e percentuais).</small> |
| <a id="COP000058"></a>`COP000058` | 422 | **Unprocessable Entity**<br/>Resource account has invalid balance data<br/><small>Saldo inválido na conta de origem</small> |
| <a id="COP000059"></a>`COP000059` | 422 | **Unprocessable Entity**<br/>Total expenses are greater than issued amount for this operation<br/><small>O total de despesas é maior que o valor emitido para esta operação</small> |
| <a id="COP000060"></a>`COP000060` | 422 | **Unprocessable Entity**<br/>Issue amount is greater than resource account balance. Operation has been aborted<br/><small>O valor da emissão é maior que o saldo da conta de origem. A operação foi interrompida</small> |
| <a id="COP000061"></a>`COP000061` | 422 | **Unprocessable Entity**<br/>Rebate taxes are greater than rebate amount for this operation<br/><small>O valor da emissão é maior que o saldo da conta de origem. A operação foi interrompida</small> |
| <a id="COP000062"></a>`COP000062` | 422 | **Unprocessable Entity**<br/>This credit operation has no rebate account to transfer the rebate amount<br/><small>Esta operação não possui uma conta de reembolso para transferir o valor do reembolso</small> |
| <a id="COP000063"></a>`COP000063` | 400 | **Bad Request**<br/>Cannot ensure disbursed amount for non amount_receivable accounts<br/><small>Não é possível garantir o valor desembolsado para contas que não são amount_receivable</small> |
| <a id="COP000064"></a>`COP000064` | 400 | **Validation Error**<br/>{parse_error} |
| <a id="COP000065"></a>`COP000065` | 400 | **Validation Error**<br/>{parse_error} |
| <a id="COP000066"></a>`COP000066` | 400 | **Bad Request**<br/>Missing parameters for GET request<br/><small>GET request faltando parâmetros</small> |
| <a id="COP000067"></a>`COP000067` | 404 | **Not Found**<br/>Credit Operation was not found for the given parameters.<br/><small>Operação não encontrada para os parâmetros fornecidos.</small> |
| <a id="COP000068"></a>`COP000068` | 400 | **Bad Request**<br/>Please provide only one of {issue_amount, disbursed_issue_amount, final_disbursement_amount}. If one is valid, the other must be null<br/><small>Forneça apenas um dentre {issue_amount, disbursed_issue_amount, final_disbursement_amount}. Se um for válido, os outros devem ser nulos</small> |
| <a id="COP000069"></a>`COP000069` | 404 | **Not Found**<br/>Credit Operation with contract number {contract_number} not found<br/><small>Operação com número de contrato {contract_number} não encontrada</small> |
| <a id="COP000070"></a>`COP000070` | 400 | **Bad Request**<br/>Duplicated cetip assignments control numbers<br/><small>Números de controle de atribuições da cetip duplicados</small> |
| <a id="COP000071"></a>`COP000071` | 400 | **Bad Request**<br/>Total expected amount {total_expected_amount} is different from Credit Operation amount {issue_amount}<br/><small>O valor total esperado {total_expected_amount} é diferente do valor da operação de crédito {issue_amount}</small> |
| <a id="COP000073"></a>`COP000073` | 400 | **Bad Request**<br/>No active configuration found for requester {requester_key} and purchaser with CNPJ {purchaser_document_number}.<br/><small>Nenhuma configuração ativa encontrada para o solicitante {requester_key} e cessionário with CNPJ {purchaser_document_number}.</small> |
| <a id="COP000074"></a>`COP000074` | 400 | **Bad Request**<br/>Credit Operation with keys {endorsed_co_key_list} is already endorsed<br/><small>A operação de crédito com chaves {endorsed_co_key_list} já foi endossada</small> |
| <a id="COP000075"></a>`COP000075` | 404 | **Not Found**<br/>Credit Operation not found for the given key for {key}<br/><small>Operação de crédito não encontrada para a seguinte chave {key}</small> |
| <a id="COP000076"></a>`COP000076` | 400 | **Bad Request**<br/>Credit Operation with keys {key} does not have valid document<br/><small>A operação de crédito com chaves {key} não possui documento válido</small> |
| <a id="COP000077"></a>`COP000077` | 400 | **Bad Request**<br/>Credit Operation with keys {key} are waiting signature<br/><small>A operação de crédito com chaves {key} estão esperando assinatura</small> |
| <a id="COP000078"></a>`COP000078` | 400 | **Bad Request**<br/>Credit Operation with keys {key} are cancelled<br/><small>A operação de crédito com chaves {key} foram canceladas</small> |
| <a id="COP000079"></a>`COP000079` | 400 | **Bad Request**<br/>Missing mandatory parameter: document_number<br/><small>Parâmetro obrigatório ausente: document_number</small> |
| <a id="COP000080"></a>`COP000080` | 404 | **Not Found**<br/>No purchaser found with document number {document_number}.<br/><small>Cessionário com número de documento {document_number} não encontrado.</small> |
| <a id="COP000081"></a>`COP000081` | 400 | **Bad Request**<br/>Purchaser with document number {document_number} already registered. Use PUT /purchaser<br/><small>Cessionário com número de documento {document_number} já registrado. Use PUT /purchaser</small> |
| <a id="COP000082"></a>`COP000082` | 400 | **Bad Request**<br/>Purchaser with document number {document_number} não registered. Use PUT /purchaser<br/><small>Cessionário com número de documento {document_number} não registrado. Use PUT /purchaser</small> |
| <a id="COP000083"></a>`COP000083` | 400 | **Bad Request**<br/>Missing mandatory parameter: requester_key<br/><small>Parâmetro obrigatório ausente: requester_key</small> |
| <a id="COP000084"></a>`COP000084` | 409 | **Conflict**<br/>There already exists a configuration for the informed requester_key and issuer_document_number<br/><small>Já existe uma configuração para o requester_key e issuer_document_number</small> |
| <a id="COP000085"></a>`COP000085` | 404 | **Not Found**<br/>Requester configuration not found for the given parameters<br/><small>Configuração do solicitante não encontrada para os parâmetros fornecidos</small> |
| <a id="COP000086"></a>`COP000086` | 422 | **Unprocessable Entity**<br/>Invalid contract fee data: amount informed is greater than 100%<br/><small>Taxa de contrato inválida: o valor informado é superior a 100%</small> |
| <a id="COP000087"></a>`COP000087` | 422 | **Unprocessable Entity**<br/>Invalid external contract fee data: amount informed is greater than 100%<br/><small>Taxa de contrato externa inválida: o valor informado é superior a 100%</small> |
| <a id="COP000088"></a>`COP000088` | 400 | **Bad Request**<br/>Installment actual status does not allow this operation.<br/><small>O status da parcela não permite esta operação.</small> |
| <a id="COP000089"></a>`COP000089` | 400 | **Bad Request**<br/>Credit Operation {credit_operation_key} has no disbursement_date<br/><small>A operação de crédito {credit_operation_key} não tem data de desembolso</small> |
| <a id="COP000090"></a>`COP000090` | 400 | **Bad Request**<br/>{message_en}<br/><small>{message_br}</small> |
| <a id="COP000091"></a>`COP000091` | 400 | **Bad Request**<br/>No disbursement option found for credit operation<br/><small>Nenhuma opção de desembolso encontrada para operação de crédito</small> |
| <a id="COP000092"></a>`COP000092` | 400 | **Bad Request**<br/>Credit Operation's disbursement date has already been set<br/><small>A data de desembolso da operação de crédito já foi definida</small> |
| <a id="COP000093"></a>`COP000093` | 400 | **Bad Request**<br/>No disbursement option calculated to disbursement_date {disbursement_date}<br/><small>Nenhuma opção de desembolso calculada para disbursement_date {disbursement_date}</small> |
| <a id="COP000094"></a>`COP000094` | 400 | **Bad Request**<br/>More than one disbursement option calculated to {disbursement_date}<br/><small>Mais de uma opção de desembolso calculada para {disbursement_date}</small> |
| <a id="COP000095"></a>`COP000095` | 400 | **Bad Request**<br/>First due date invalid.<br/><small>Data de vencimento da primeira parcela inválida.</small> |
| <a id="COP000096"></a>`COP000096` | 400 | **Bad Request**<br/>Could not find last installment to early pay with provided key.<br/><small>NÃo foi possãvel encontrar a última parcela a ser liquidada.</small> |
| <a id="COP000097"></a>`COP000097` | 400 | **Bad Request**<br/>No installment found to early pay.<br/><small>NÃo foi possãvel encontrar a parcelas para serem liquidadas.</small> |
| <a id="COP000098"></a>`COP000098` | 400 | **Bad Request**<br/>Different credit operation ownership. Endorsement operations can only endorse debt emissions with the same owner.<br/><small>Propriedade diferente da operação de crédito. Os endossos só podem endossar emissões de dívida com o mesmo proprietário.</small> |
| <a id="COP000099"></a>`COP000099` | 400 | **Bad Request**<br/>Different credit operation ownership. Assignment operations can only assign debt emissions with the same owner.<br/><small>Propriedade diferente da operação de crédito. As cessões só podem ceder emissões de dívida com o mesmo proprietário.</small> |
| <a id="COP000100"></a>`COP000100` | 400 | **Bad Request**<br/>Credit operation cannot be early paid if it has delayed installments.<br/><small>A operação de crédito não pode ser liquidada antecipadamente porque tem parcelas atrasadas.</small> |
| <a id="COP000101"></a>`COP000101` | 400 | **Bad Request**<br/>Credit operation cannot be early paid if it has installments that are waiting payment.<br/><small>A operação de crédito não pode ser liquidada antecipadamente porque tem parcelas que foram pagas parcialmente ou estão aguardando pagamento.</small> |
| <a id="COP000102"></a>`COP000102` | 400 | **Bad Request**<br/>Credit operation cannot be early paid if it is not opened yet.<br/><small>A operação de crédito não pode ser liquidada antecipadamente porque ainda não foi desembolsada.</small> |
| <a id="COP000103"></a>`COP000103` | 400 | **Bad Request**<br/>Related party {related_party_name} provided an invalid email {email}.<br/><small>Email informado por assinante {related_party_name} é invalido: {email}.</small> |
| <a id="COP000104"></a>`COP000104` | 400 | **Bad Request**<br/>Related party {related_party_name} has no phone provided.<br/><small>Não foi informado celular para o assinante: {related_party_name}.</small> |
| <a id="COP000105"></a>`COP000105` | 400 | **Bad Request**<br/>Phone not found<br/><small>Telefone não encontrado</small> |
| <a id="COP000106"></a>`COP000106` | 400 | **Bad Request**<br/>There must be only one disbursement account, and it must be a QI SCD account<br/><small>É necessário ter apenas uma conta de desembolso, e esta conta precisa ser da QI SCD.</small> |
| <a id="COP000107"></a>`COP000107` | 400 | **Bad Request**<br/>Credit operation must be opened to execute action<br/><small>Operação de crédito precisa estar desembolsada para executar ação.</small> |
| <a id="COP000108"></a>`COP000108` | 400 | **Bad Request**<br/>Could not pay bankslip<br/><small>Não foi possível pagar o boleto</small> |
| <a id="COP000109"></a>`COP000109` | 400 | **Bad Request**<br/>Both first_due_date and first_due_date_delay were provided. Only one must be provided.<br/><small>Data da primeira parcela e Prazo até a primeira parcela foram recebidos. Envie apenas um deles.</small> |
| <a id="COP000110"></a>`COP000110` | 400 | **Bad Request**<br/>Payment type bankslip can only be used for credit operations with prefixed interest types<br/><small>Tipo de pagamento bankslip pode ser usado somente para operações de crédito com juros prefixados</small> |
| <a id="COP000111"></a>`COP000111` | 400 | **Bad Request**<br/>Received duplicated fee type. Please provide only one fee configuration per fee type.<br/><small>Por favor, envie apenas uma configuração de rebate por tipo de tarifa.</small> |
| <a id="COP000112"></a>`COP000112` | 400 | **Bad Request**<br/>Received fee type {fee_type} not pre-configured.<br/><small>O tipo de tarifa recebido {fee_type} não está pré-configurado.</small> |
| <a id="COP000113"></a>`COP000113` | 400 | **Bad Request**<br/>Cannot apply external fee. Missing external fee configuration. Please contact the operations team.<br/><small>Não é possível aplicar rebate sem pré-configuração. Por favor contatar equipe de operações.</small> |
| <a id="COP000114"></a>`COP000114` | 400 | **Bad Request**<br/>Please specify fee type to overwrite.<br/><small>Por favor, especifique o tipo de rebate para sobrescrever.</small> |
| <a id="COP000115"></a>`COP000115` | 400 | **Bad Request**<br/>Cannot disburse credit operation {credit_operation_key} due to TED closing time.<br/><small>Não é possível desembolsar a operação {credit_operation_key} porque a TED está fechada.</small> |
| <a id="COP000116"></a>`COP000116` | 400 | **Bad Request**<br/>Purchaser {document_number} already registered for requester_key {requester_key}. Use PUT request to update<br/><small>Cessionário {document_number} já cadastrado para o requester_key {requester_key}. Use request PUT para atualizar</small> |
| <a id="COP000117"></a>`COP000117` | 400 | **Bad Request**<br/>Issuer is not bank-slip payer or is not disbursable destination.<br/><small>Tomador não corresponde ao pagador do boleto, ou não é um destino de desembolso cadastrado.</small> |
| <a id="COP000118"></a>`COP000118` | 400 | **Bad Request**<br/>Duplicate entry for requester identifier key and requester key.<br/><small>Entrada duplicada de dados para requester_identifier_key e requester_key.</small> |
| <a id="COP000119"></a>`COP000119` | 400 | **Bad Request**<br/>Issue amount is missing more than permitted: {amount}. Disbursed amount: {disbursed_amount} External fee: {external_contract_fee_sum} Must be less than 20: {delta}<br/><small>Valor de emissão está faltando mais do que permitido: {amount} Desembolso líquido calculado: {disbursed_amount} Rebate: {external_contract_fee_sum} Deve ser menor que 20: {delta}</small> |
| <a id="COP000120"></a>`COP000120` | 400 | **Bad Request**<br/>Credit Operation is not waiting signature<br/><small>Operação não está no estado aguardando assinatura</small> |
| <a id="COP000121"></a>`COP000121` | 400 | **Bad Request**<br/>Resend notification is available only for clicksign and qi sign<br/><small>Reenvio de notificação está habilitado somente para clicksign e qi sign</small> |
| <a id="COP000122"></a>`COP000122` | 400 | **Bad Request**<br/>Signer {signer} is not part of the operation<br/><small>Assinante {signer} não faz parte da operação</small> |
| <a id="COP000123"></a>`COP000123` | 400 | **Bad Request**<br/>Total amortization from installment flow does not equal issue amount.<br/><small>O total de amortização das parcelas não é igual ao valor de emissão.</small> |
| <a id="COP000124"></a>`COP000124` | 400 | **Bad Request**<br/>Received credit_operation_key already registered for another operation. Please send a new one.<br/><small>A credit_operation_key recebida já está registrada para outra operação. Por favor, envie uma key não utilizada.</small> |
| <a id="COP000125"></a>`COP000125` | 400 | **Bad Request**<br/>There cannot be disbursement options when installment flow is pre-defined.<br/><small>Não pode haver opções de desembolso quando o fluxo de parcelas é pré-determinado.</small> |
| <a id="COP000126"></a>`COP000126` | 400 | **Bad Request**<br/>Total after disbursement actions amount ({after_disbursement_actions_total_amount}) greater than evaluated disbursed amount ({disbursed_amount}).<br/><small>Valor total das ações pós desembolso ({after_disbursement_actions_total_amount}) é maior que o valor liberado calculado ({disbursed_amount}).</small> |
| <a id="COP000127"></a>`COP000127` | 400 | **Bad Request**<br/>Can't create after disbursement action because bankslip {digitable_line} expiration date {expiration_date} is within disbursement period.<br/><small>Não é possível criar ações pós-desembolso porque a data de vencimento {expiration_date} do boleto {digitable_line} está dentro do período de desembolso.</small> |
| <a id="COP000128"></a>`COP000128` | 400 | **Bad Request**<br/>Can't create after disbursement action because disbursed amount is undefined.<br/><small>Não é possível criar ações pós-desembolso porque o valor do desembolso está indefinido.</small> |
| <a id="COP000129"></a>`COP000129` | 400 | **Bad Request**<br/>Size of received due_dates array does not match number of installments<br/><small>Tamanho da lista de datas de vencimento recebida não é compatível com o número de parcelas.</small> |
| <a id="COP000130"></a>`COP000130` | 400 | **Bad Request**<br/>One or more received due dates are before the disbursement date.<br/><small>Uma ou mais datas de vencimento recebidas ocorre antes do desembolso.</small> |
| <a id="COP000131"></a>`COP000131` | 400 | **Bad Request**<br/>All elements inside due dates list must be unique.<br/><small>Todos os elementos dentro da lista de datas de vencimento devem ser únicos.</small> |
| <a id="COP000133"></a>`COP000133` | 400 | **Bad Request**<br/>The disbursement need to be in a account with the same ownership as the borrower.<br/><small>O desembolso precisa ser feito para uma conta de mesma titularidade de quem está pegando o empréstimo, no caso o tomador.</small> |
| <a id="COP000134"></a>`COP000134` | 404 | **Not Found**<br/>No credit operation found for given batch.<br/><small>Nenhuma operação de crédito encontrada para o lote recebido.</small> |
| <a id="COP000135"></a>`COP000135` | 404 | **Not Found**<br/>Some credit operations were not found for given batch.<br/><small>Algumas operações de crédito não foram encontradas para o lote recebido.</small> |
| <a id="COP000136"></a>`COP000136` | 400 | **Bad Request**<br/>More than one requester found inside batch. Expected only one requester for all credit operations inside batch.<br/><small>Mais de um requester encontrado no lote de desembolso. Espera-se apenas um requester para todas as operações de crédito contidas no lote.</small> |
| <a id="COP000137"></a>`COP000137` | 400 | **Bad Request**<br/>No requester configuration found for requester {requester_key}.<br/><small>Não foi encontrado um RequesterConfiguration para o requester {requester_key}</small> |
| <a id="COP000138"></a>`COP000138` | 400 | **Bad Request**<br/>Requester {requester_key} is not configured to disburse in batch.<br/><small>Requester {requester_key} não está configurado para desembolsar em lote.</small> |
| <a id="COP000139"></a>`COP000139` | 400 | **Bad Request**<br/>Credit operations must all be waiting_disbursement to be disbursed<br/><small>Todas as operações de crédito precisam estar waiting_disbursement para serem desembolsadas</small> |
| <a id="COP000141"></a>`COP000141` | 400 | **Bad Request**<br/>Missing one or more RequesterConfigurations to disburse in batch.<br/><small>Um ou mais RequesterConfigurations estão faltando para desembolsar em lote.</small> |
| <a id="COP000142"></a>`COP000142` | 400 | **Bad Request**<br/>Bank compe code {bank_compe_code} in after disbursement action is not valid.<br/><small>Código compe {bank_compe_code} na ação pós-desembolso não é válido.</small> |
| <a id="COP000143"></a>`COP000143` | 400 | **Bad Request**<br/>Disbursed amount must be sent when there is a fee is over its value.<br/><small>Valor desembolsado deve ser informado quando a tarifa configurada é sobre valor desembolsado</small> |
| <a id="COP000144"></a>`COP000144` | 400 | **Bad Request**<br/>Related party {related_party_name} has cellphone number with less than 9 digits<br/><small>O assinante {related_party_name}, tem número de telefone celular com menos de 9 dígitos.</small> |
| <a id="COP000145"></a>`COP000145` | 400 | **Bad Request**<br/>Duplicate Operation was found<br/><small>Operação duplicada encontrada.</small> |
| <a id="COP000146"></a>`COP000146` | 400 | **Bad Request**<br/>Cannot add external fees without a rebate account.<br/><small>Impossível adicionar tarifas externas sem a conta de rebate.</small> |
| <a id="COP000147"></a>`COP000147` | 400 | **Bad Request**<br/>Purchaser account key must be sent along with automatic debt set on.<br/><small>Chave da conta do cessionário deve ser fornecida com configuração de débito automático ligada.</small> |
| <a id="COP000148"></a>`COP000148` | 400 | **Bad Request**<br/>The field disburse_before_assign: '{disburse_before_assign}' must be boolean, it was sent {type}.<br/><small>O campo disburse_before_assign: '{disburse_before_assign}' deve ser boleano, foi enviado {type}.</small> |
| <a id="COP000149"></a>`COP000149` | 400 | **Bad Request**<br/>Disbursement already completed.<br/><small>Desembolso já concluído.</small> |
| <a id="COP000150"></a>`COP000150` | 400 | **Bad Request**<br/>Unable to update assignment amount for interest type {interest_type}. Automatic update not available for this type.<br/><small>Não foi possível atualizar o valor de cessão para o tipo de juros {interest_type}. Atualização automática não disponível para este tipo.</small> |
| <a id="COP000151"></a>`COP000151` | 404 | **Not Found**<br/>Installment not found for {attribute} {value}<br/><small>Parcela não encontrada para {attribute} {value}</small> |
| <a id="COP000152"></a>`COP000152` | 400 | **Bad Request**<br/>Simulation date {simulation_date} is less than due date {due_date} for installment number {installment_number}.<br/><small>Data de simulação {simulation_date} é menor que data de vencimento {due_date} para parcela de número {installment_number}</small> |
| <a id="COP000153"></a>`COP000153` | 400 | **Bad Request**<br/>It was not possible to consult the bank slip (digitable line: {digitable_line}). Please try again in a few minutes.<br/><small>Não foi possível consultar o boleto (linha digitável: {digitable_line}). Por favor tente novamente em alguns minutos.</small> |
| <a id="COP000154"></a>`COP000154` | 400 | **Bad Request**<br/>Unable to do action, because collaterals are not constituted. Credit operation key {credit_operation_key};<br/><small>Ação não permitida, porque a garantia não foi constituído. Credit Operation Key {credit_operation_key}</small> |
| <a id="COP000155"></a>`COP000155` | 400 | **Bad Request**<br/>Unable to proceed with pix disbursement. Target account document number does not match one provided.<br/><small>Não foi possível prosseguir com o desembolso em pix. Número de documento da conta de destino não corresponde ao fornecido.</small> |
| <a id="COP000156"></a>`COP000156` | 400 | **Bad Request**<br/>Unable to proceed with pix disbursement. Target account number and branch do not match those retrieved from pix key.<br/><small>Não foi possível prosseguir com o desembolso em pix. Agência e conta fornecidos não correspondem àqueles da chave pix.</small> |
| <a id="COP000157"></a>`COP000157` | 400 | **Bad Request**<br/>Invalid Disbursement Account Payload. Please make sure it contains target Financial Institution and account data.<br/><small>Payload da conta de desembolso inválido. Certifique que dados da instituição financeira de destino e da conta estejam contidos.</small> |
| <a id="COP000158"></a>`COP000158` | 400 | **Bad Request**<br/>Payroll amount has not been informed or is zero. Please set payroll amount as decimal greater than zero.<br/><small>Valor de payroll para crédito consignado não foi informado ou é nulo. Favor informar o payroll_amount como decimal maior que zero.</small> |
| <a id="COP000159"></a>`COP000159` | 400 | **Bad Request**<br/>Payment not allowed for settlement agent {settlement_agent}<br/><small>Pagamento não autorizado para agente {settlement_agent}</small> |
| <a id="COP000160"></a>`COP000160` | 400 | **Bad Request**<br/>Payment for operations with multiple installments not allowed.<br/><small>Pagamento não autorizado para operações com multiplas parcelas.</small> |
| <a id="COP000161"></a>`COP000161` | 400 | **Bad Request**<br/>Payment for cetip operations not allowed.<br/><small>Pagamento não autorizado para operações cetipadas.</small> |
| <a id="COP000162"></a>`COP000162` | 400 | **Bad Request**<br/>Payment not allowed for current installment status: {installment_status}.<br/><small>Pagamento não autorizado para o status da parcela: {installment_status}.</small> |
| <a id="COP000163"></a>`COP000163` | 400 | **Bad Request**<br/>Action not found;<br/><small>Action não encontrada</small> |
| <a id="COP000164"></a>`COP000164` | 400 | **Bad Request**<br/>action_key is mandatory;<br/><small>Action e mandatoria</small> |
| <a id="COP000165"></a>`COP000165` | 400 | **Bad Request**<br/>The value of the new action must be lower or equal to the action to be updated<br/><small>O valor da nova action deve ser menor ou igual a action a ser atualizada</small> |
| <a id="COP000166"></a>`COP000166` | 400 | **Bad Request**<br/>Action is already done.<br/><small>action ja realizada.</small> |
| <a id="COP000167"></a>`COP000167` | 400 | **Bad Request**<br/>It's not possible to run after disbursement action  .<br/><small>Nao foi possivel rodar a acao pos desembolso</small> |
| <a id="COP000168"></a>`COP000168` | 400 | **Bad Request**<br/>Periods sent did not match the installments received.<br/><small>Os periodos enviados não batem com as parcelas enviadas</small> |
| <a id="COP000169"></a>`COP000169` | 400 | **Bad Request**<br/>Different purchaser document number. Endorsement operations can only endorse debt emissions with the same purchaser document number.<br/><small>Documento do comprador diferente da operação de crédito. Os endossos só podem endossar emissões de dívida com o mesmo comprador.</small> |
| <a id="COP000170"></a>`COP000170` | 400 | **Bad Request**<br/>Impossible to settle operation with the installments sent.<br/><small>Impossível de quitar operação com as parcelas enviadas.</small> |
| <a id="COP000171"></a>`COP000171` | 423 | **Locked**<br/>PIX Operation window closed. System available from {PIX_OPENING_TIME} to {PIX_CLOSING_TIME}<br/><small>Operação PIX encerrada. Sistema disponível de {PIX_OPENING_TIME} até {PIX_CLOSING_TIME}</small> |
| <a id="COP000172"></a>`COP000172` | 400 | **Bad Request**<br/>Interest type not allowed at this endpoint. Payment refused.<br/><small>Tipo de juros não permitido para este endpoint. Pagamento recusado.</small> |
| <a id="COP000173"></a>`COP000173` | 400 | **Bad Request**<br/>Recalculate canceled credit operation must regenerate document when certifier is not notary office<br/><small>Recálculo de operação de crédito cancelada precisa regerar documento quando a certificadora não é cartular.</small> |
| <a id="COP000174"></a>`COP000174` | 400 | **Bad Request**<br/>Denied Operation. The chosen disbursement account institution is not an active PIX participant.<br/><small>Operação Negada. A conta de desembolso não é de uma instituição participante ativa do PIX.</small> |
| <a id="COP000175"></a>`COP000175` | 400 | **Bad Request**<br/>Denied Operation. The chosen disbursement account institution was not found.<br/><small>Operação Negada. A conta de desembolso informada não é de uma instituição financeira encontrada.</small> |
| <a id="COP000176"></a>`COP000176` | 404 | **Not Found**<br/>Assignment not found for the given parameters.<br/><small>Cessão não encontrado para os parâmetros informados.</small> |
| <a id="COP000177"></a>`COP000177` | 404 | **Not Found**<br/>Assignment not found for credit_operation_key {credit_operation_key}<br/><small>Cessão não encontrado para a credit_operation_key {credit_operation_key}</small> |
| <a id="COP000178"></a>`COP000178` | 400 | **Bad Request**<br/>transaction status does not allow changing the disbursement account<br/><small>status da operação não permite alteração da conta de desembolso</small> |
| <a id="COP000179"></a>`COP000179` | 400 | **Bad Request**<br/>Number of accounts differs from those already registered in this operation<br/><small>Quantidade de contas diverge com as já cadastradas nessa operação</small> |
| <a id="COP000180"></a>`COP000180` | 400 | **Bad Request**<br/>Credit operation status does not allow this operation.<br/><small>O status da operação de crédito não permite esta operação.</small> |
| <a id="COP000181"></a>`COP000181` | 400 | **Bad Request**<br/>Related Parties with invalid document number was found<br/><small>Partes relacionadas com documentos inválidos foram encontrados</small> |
| <a id="COP000182"></a>`COP000182` | 400 | **Bad Request**<br/>Error while doing disbursement split. Percentage differ 100% was found for credit operation.<br/><small>Error ao executar split do desembolso. Porcentagem diferente de 100% foi encontrada para a operação.</small> |
| <a id="COP000183"></a>`COP000183` | 404 | **Not Found**<br/>No RequesterConfigurationPurchaser found for requester {requester_key}.<br/><small>Não foi encontrado um RequesterConfigurationPurchaser para o requester {requester_key}</small> |
| <a id="COP000184"></a>`COP000184` | 404 | **Not Found**<br/>No RequesterConfigurationPurchaser found for key {key}.<br/><small>Não foi encontrado um RequesterConfigurationPurchaser para a key {key}</small> |
| <a id="COP000185"></a>`COP000185` | 404 | **Not Found**<br/>No RequesterConfigurationPurchaser found for requester {requester_key} with document number {document_number}.<br/><small>Não foi encontrado um RequesterConfigurationPurchaser para o requester {requester_key} com o número de documento {document_number}.</small> |
| <a id="COP000186"></a>`COP000186` | 400 | **Bad Request**<br/>The contract number already exists or is duplicated.<br/><small>O número de contrato ja existe ou está duplicado.</small> |
| <a id="COP000187"></a>`COP000187` | 400 | **Bad Request**<br/>Operation must be issued to proceed to entry generation.<br/><small>A operação precisa estar assinada para prosseguir com a geração da entrada.</small> |
| <a id="COP000188"></a>`COP000188` | 400 | **Bad Request**<br/>Entry deadline must be one day less to operation disbursement date.<br/><small>A data de vencimento da entrada, deve ser um dia menor que a data de desembolso da operação.</small> |
| <a id="COP000189"></a>`COP000189` | 400 | **Bad Request**<br/>Requester must have a requester profile in bankslip.<br/><small>O solicitante precisa possuir um perfil de solicitante na bankslip.</small> |
| <a id="COP000190"></a>`COP000190` | 400 | **Bad Request**<br/>Requester need to configure a requester_account_key in configurations before proceed.<br/><small>O solicitante precisa configurar uma requester_account_key nas configurações antes de prosseguir.</small> |
| <a id="COP000191"></a>`COP000191` | 404 | **Not Found**<br/>Entry type not found.<br/><small>Tipo de entrada não encontrada.</small> |
| <a id="COP000192"></a>`COP000192` | 400 | **Bad Request**<br/>Entry must be of one type to proceed.<br/><small>Entrada precisa ter um tipo para continuar.</small> |
| <a id="COP000193"></a>`COP000193` | 400 | **Bad Request**<br/>Entry must be paid to proceed.<br/><small>A entrada precisa ser paga para prosseguir.</small> |
| <a id="COP000194"></a>`COP000194` | 404 | **Not Found**<br/>Entry not found.<br/><small>A entrada não foi encontrada.</small> |
| <a id="COP000195"></a>`COP000195` | 400 | **Bad Request**<br/>Unable to do action, because entry is not paid. Credit operation key {credit_operation_key};<br/><small>Ação não permitida, porque a entrada não foi paga. Credit Operation Key {credit_operation_key}</small> |
| <a id="COP000196"></a>`COP000196` | 400 | **Bad Request**<br/>Disbursement date can not be in the past when recalculate credit operation, Key=  {credit_operation_key}.<br/><small>Data de desembolso não pode ser no passado para o recalculo da credit operation, Key= {credit_operation_key}</small> |
| <a id="COP000197"></a>`COP000197` | 404 | **Not Found**<br/>There's no bank_slip linked to a credit transaction.<br/><small>Não há um boleto vinculado a uma operação de crédito.</small> |
| <a id="COP000198"></a>`COP000198` | 400 | **Bad Request**<br/>ISPB Number is None and not found financial institution with code number: {code_number}<br/><small>Numero ISPB é nulo e não foi possível encontrar instituição financeira com o número: {code_number}</small> |
| <a id="COP000199"></a>`COP000199` | 400 | **Bad Request**<br/>Base day must be a working day while recalculate interest for credit_operation: {co_key}.<br/><small>Base day deve ser um dia útil para recalculo de juros da credit_operation: {co_key}.</small> |
| <a id="COP000200"></a>`COP000200` | 400 | **Bad Request**<br/>This action is allowed only for canceled credit operations<br/><small>Esta ação é permitida apenas para operações de crédito canceladas</small> |
| <a id="COP000201"></a>`COP000201` | 400 | **Bad Request**<br/>The credit Operation can be uncanceled only in disbursement date range<br/><small>A operação de crédito só pode ser descancelada no período de desembolso</small> |
| <a id="COP000202"></a>`COP000202` | 400 | **Bad Request**<br/>The credit Operation can be uncanceled only before the disbursement date<br/><small>A operação de crédito só pode ser descancelada antes da data de desembolso</small> |
| <a id="COP000203"></a>`COP000203` | 400 | **Bad Request**<br/>Installments must be after disbursement_date.<br/><small>Parcelas devem ser após data de desembolso.</small> |
| <a id="COP000204"></a>`COP000204` | 400 | **Bad Request**<br/>Assignment with key {assignment_key} is not canceled and cannot be changed to waiting_signature.<br/><small>Cessão com a chave {assignment_key} não está cancelada e não pode ser mudada pra aguardando assinatura.</small> |
| <a id="COP000205"></a>`COP000205` | 404 | **Not Found**<br/>Reversal not found.<br/><small>Estorno não encontrado.</small> |
| <a id="COP000206"></a>`COP000206` | 409 | **Conflict**<br/>This KYC was already finalized with status {kyc_status}<br/><small>Essa KYC já foi finalizada com status {kyc_status}</small> |
| <a id="COP000207"></a>`COP000207` | 404 | **Not Found**<br/>A KYC with key {kyc_key} was not found for operation {credit_operation_key}<br/><small>Uma KYC com chave {kyc_key} não foi encontrada para a operação {credit_operation_key}</small> |
| <a id="COP000208"></a>`COP000208` | 400 | **Bad Request**<br/>Cancel reason {enumerator} already exists.<br/><small>Motivo de cancelamento {enumerator} já existe.</small> |
| <a id="COP000209"></a>`COP000209` | 404 | **Not Found**<br/>Cancel reason {enumerator} not found.<br/><small>Motivo de cancelamento {enumerator} não encontrado.</small> |
| <a id="COP000210"></a>`COP000210` | 400 | **Bad Request**<br/>Assignment date must be after or equal disbursement date.<br/><small>Data da cessão deve ser maior ou igual à data de desembolso.</small> |
| <a id="COP000211"></a>`COP000211` | 409 | **Conflict**<br/>This installment/entry is already paid.<br/><small>Essa parcela/entrada já está paga.</small> |
| <a id="COP000212"></a>`COP000212` | 400 | **Bad Request**<br/>The sum of the tax percentages must be less than 100%.<br/><small>Soma das porcentagens dos impostos deve ser menor que 100%.</small> |
| <a id="COP000213"></a>`COP000213` | 400 | **Bad Request**<br/>Rate fields cannot have more than 8 decimal places.<br/><small>Campos de taxa não podem ter mais de 8 casas decimais.</small> |
| <a id="COP000214"></a>`COP000214` | 400 | **Bad Request**<br/>Delay Rate field higher than allowed.<br/><small>Campo de taxa de atraso maior que o permitido.</small> |
| <a id="COP000215"></a>`COP000215` | 400 | **Bad Request**<br/>Annual CET field higher than allowed.<br/><small>Custo efetivo anual total maior que o permitido.</small> |
| <a id="COP000216"></a>`COP000216` | 400 | **Bad Request**<br/>The date to schedule payment is not valid.<br/><small>A data para agendar o pagamento não é válida.</small> |
| <a id="COP000217"></a>`COP000217` | 400 | **Bad Request**<br/>The {method} signature method is not allowed for this certifier<br/><small>O método de assinatura {method} não é permitido para essa certificadora.</small> |
| <a id="COP000218"></a>`COP000218` | 400 | **Bad Request**<br/>The disbursement account must be the same of requester account.<br/><small>A conta de desembolso precisa ser a mesma que a conta do solicitante.</small> |
| <a id="COP000219"></a>`COP000219` | 400 | **Bad Request**<br/>The final disbursement amount, added to the entry payment, must be the same as the total payment amount.<br/><small>O valor final do desembolso, somado com a entrada, precisa ser o mesmo que o valor total do pagamento.</small> |
| <a id="COP000220"></a>`COP000220` | 409 | **Bad Request**<br/>Integrity error, already exists data with this value on field: {field}.<br/><small>Erro de integridade, já existe dados com esse valor no campo: {field}.</small> |
| <a id="COP000221"></a>`COP000221` | 400 | **Bad Request**<br/>Action cannot be executed, transfer work time is out of window.<br/><small>A ação não pode ser executada, o tempo de trabalho de transferência está fora da janela.</small> |
| <a id="COP000222"></a>`COP000222` | 400 | **Bad Request**<br/>New disbursement date must be within 15 days of the actual disbursement date.<br/><small>Nova data de desembolso deve ser dentro de 15 dias da data atual de desembolso.</small> |
| <a id="COP000223"></a>`COP000223` | 400 | **Bad Request**<br/>Issuer document number must be 11 or 14 characters long.<br/><small>O document do emissor deve ter 11 ou 14 caracteres.</small> |
| <a id="COP000224"></a>`COP000224` | 400 | **Bad Request**<br/>Credit operation cannot be disbursed until is allowed.<br/><small>A operação de crédito não pode ser desembolsada até que seja permitida.</small> |
| <a id="COP000225"></a>`COP000225` | 400 | **Bad Request**<br/>Informed total IOF amount is out of calculated range.<br/><small>O IOF total informado está fora do intervalo calculado.</small> |
| <a id="COP000226"></a>`COP000226` | 400 | **Bad Request**<br/>Custom IOF request not allowed for this requester.<br/><small>Solicitação de IOF customizada não permitida para este requisitante.</small> |
| <a id="COP000227"></a>`COP000227` | 409 | **Bad Request**<br/>Integrity error, already exists operation with the same requester identifier key.<br/><small>Erro de integridade, já existe operação com a mesma chave de identificação do solicitante.</small> |
| <a id="COP000228"></a>`COP000228` | 404 | **Not Found**<br/>Financial institution not found.<br/><small>Instituição Financeira não encontrada.</small> |
| <a id="COP000229"></a>`COP000229` | 400 | **Bad Request**<br/>Pix transfer type not found, or is incorrect.<br/><small>Tipo de transferência pix não encontrado, ou está incorreto.</small> |
| <a id="COP000230"></a>`COP000230` | 404 | **Not Found**<br/>Source account not found.<br/><small>Conta de origem não encontrada.</small> |
| <a id="COP000231"></a>`COP000231` | 400 | **Bad Request**<br/>Pix operation denied, institution is not on list of participants.<br/><small>Operação Pix negada, instituição não consta na lista de participantes.</small> |
| <a id="COP000232"></a>`COP000232` | 400 | **Bad Request**<br/>Pix operation denied, pix key does not exist.<br/><small>Operação Pix negada, chave pix não existe.</small> |
| <a id="COP000233"></a>`COP000233` | 400 | **Bad Request**<br/>The disbursement account amount receivable is different from the amount of bankslip.Bankslip amount:{bankslip_amount}<br/><small>O valor a receber da conta de desembolso é diferente do valor do boleto.Valor do boleto:{bankslip_amount}</small> |
| <a id="COP000234"></a>`COP000234` | 400 | **Bad Request**<br/>Bankslip not registered.{extra_info}<br/><small>Boleto não registrado.{extra_info_br}</small> |
| <a id="COP000235"></a>`COP000235` | 400 | **Bad Request**<br/>Cannot disburse credit operation {credit_operation_key} due to BankSlip closing time.<br/><small>Não é possível desembolsar a operação {credit_operation_key} devido ao horário de fechamento do boleto.</small> |
| <a id="COP000236"></a>`COP000236` | 400 | **Bad Request**<br/>Bankslip disbursement account must have amount_receivable.<br/><small>Desembolso com boleto precisa ter o amount_receivable.</small> |
| <a id="COP000237"></a>`COP000237` | 400 | **Bad Request**<br/>Credit operation must have portability and collateral_type must be 'dataprev_reservation' or 'social_security_portability'.<br/><small>A operação de crédito precisa ter portabilidade, e o collateral_type precisa ser 'dataprev_reservation'.</small> |
| <a id="COP000238"></a>`COP000238` | 400 | **Bad Request**<br/>final_disbursement_amount field is allowed only for refinancing operations.<br/><small>O campo final_disbursement_amount só é permitido para operações de refinanciamento.</small> |
| <a id="COP000240"></a>`COP000240` | 400 | **Bad Request**<br/>Social benefit operation must have only one disbursement account<br/><small>Operações do Auxílio Brasil devem ter uma única conta de desembolso</small> |
| <a id="COP000242"></a>`COP000242` | 400 | **Bad Request**<br/>The credit operation does`not have a registration institution linked to it.<br/><small>A operação de crédito não possui instituição de registro vinculada a ela.</small> |
| <a id="COP000243"></a>`COP000243` | 400 | **Bad Request**<br/>Credit operation already in final status.<br/><small>A operação de crédito já está no status final.</small> |
| <a id="COP000244"></a>`COP000244` | 400 | **Bad Request**<br/>No collateral found for informed params.<br/><small>Nenhuma garantia encontrada para os parâmetros informados.</small> |
| <a id="COP000245"></a>`COP000245` | 400 | **Bad Request**<br/>Operation with status {credit_operation_status} cannot be cancelled.<br/><small>Essa operação com {credit_operation_status} não permite cancelamento.</small> |
| <a id="COP000246"></a>`COP000246` | 400 | **Bad Request**<br/>Assignment status does not allow this operation. status: {assignment_status}<br/><small>Status da cessão não permite essa operação. status: {assignment_status}</small> |
| <a id="COP000247"></a>`COP000247` | 400 | **Bad Request**<br/>It is not possible to carry out the assignment with the operation settled.Operation_key: {key}<br/><small>Não é possível realizar a cessão com a operação liquidada.Chave da operação: {key}</small> |
| <a id="COP000248"></a>`COP000248` | 400 | **Bad Request**<br/>Central depositories of credit operations are not the same<br/><small>Depósitos centrais das operações de crédito não são iguais</small> |
| <a id="COP000249"></a>`COP000249` | 400 | **Bad Request**<br/>The entry deadline cannot be less than disbursement date.<br/><small>A prazo da entrada não pode ser inferior à data de desembolso.</small> |
| <a id="COP000250"></a>`COP000250` | 400 | **Bad Request**<br/>Cannot recalculate operation with a reversed entry.<br/><small>Não é possível recalcular a operação com uma entrada revertida.</small> |
| <a id="COP000251"></a>`COP000251` | 400 | **Bad Request**<br/>Reversal operation is not allowed, because the status of the credit operation is not disbursed.<br/><small>A operação de estorno não é permitida, porque o status da operação de crédito não está como desembolsado.</small> |
| <a id="COP000252"></a>`COP000252` | 400 | **Bad Request**<br/>Reversal operation is not allowed when any installment is paid.<br/><small>A opera��o de estorno n�o � permitida quando h� alguma parcela paga.</small> |
| <a id="COP000253"></a>`COP000253` | 400 | **Bad Request**<br/>Purchaser account must be registered for the requester.<br/><small>A conta do fundo precisa estar cadastrada para o requester.</small> |
| <a id="COP000254"></a>`COP000254` | 400 | **Bad Request**<br/>Credit Operation cannot be reversed after 7 days<br/><small>Operação de Credito nao pode ser cancelada depois de 7 dias</small> |
| <a id="COP000255"></a>`COP000255` | 400 | **Bad Request**<br/>Must have a transaction key for the disbursement account.<br/><small>Operação de crédito precisa estar desembolsada para gerar um qr code de estorno.</small> |
| <a id="COP000256"></a>`COP000256` | 409 | **Bad Request**<br/>Reversal to this contract number is already registered.<br/><small>A reversão para este número de contrato já está registrada.</small> |
| <a id="COP000257"></a>`COP000257` | 400 | **Bad Request**<br/>Bank slip payment was rejected.<br/><small>O pagamento do boleto foi rejeitado.</small> |
| <a id="COP000258"></a>`COP000258` | 404 | **Not Found**<br/>Related_party not found for key {related_party_key}<br/><small>Parte relacionada não encontrada para a chave {related_party_key}</small> |
| <a id="COP000259"></a>`COP000259` | 400 | **Bad Request**<br/>{person_type} type related party not allow {document_type} document type<br/><small>Parte relacionada do tipo {person_type} não permite documento do tipo {document_type}</small> |
| <a id="COP000261"></a>`COP000261` | 409 | **Conflict**<br/>Credit operation already canceled: {credit_operation_key}<br/><small>Operação de crédito já cancelada: {credit_operation_key}</small> |
| <a id="COP000262"></a>`COP000262` | 400 | **Bad Request**<br/>The colateral {collateral_type} does not accept the given interest type.<br/><small>A garantia {collateral_type} não aceita o tipo de juros fornecido.</small> |
| <a id="COP000264"></a>`COP000264` | 400 | **Bad Request**<br/>Duplicate credit operation key.<br/><small>Chave da operação duplicada.</small> |
| <a id="COP000265"></a>`COP000265` | 400 | **Bad Request**<br/>Refinancing object was not sent<br/><small>Objeto com as informações do refinancimento não foi enviado corretamente</small> |
| <a id="COP000266"></a>`COP000266` | 400 | **Bad Request**<br/>Disbursed amount is not enough to refinance the operations received<br/><small>Valor desembolsado da operação não é suficiente para quitar as operações recebidas</small> |
| <a id="COP000267"></a>`COP000267` | 400 | **Bad Request**<br/>There is no opened installments to settle refinanced credit operation.<br/><small>Não há parcelas abertas para fechar uma operação refinanciada.</small> |
| <a id="COP000268"></a>`COP000268` | 400 | **Bad Request**<br/>Refinanced operation status does not allow this operation.<br/><small>Status da operação refinanciada não permite essa operação.</small> |
| <a id="COP000269"></a>`COP000269` | 400 | **Bad Request**<br/>Missing data to settle refinancing or portability operation.<br/><small>Faltando dados para fechar operação de refinanciamento ou portabilidade</small> |
| <a id="COP000270"></a>`COP000270` | 400 | **Bad Request**<br/>Refinancing disbursing amount doesn't match percentage receivable in disbursement accounts.<br/><small>Valor de desembolso do refinanciamento não está de acordo com os valores de percentage receivable.</small> |
| <a id="COP000271"></a>`COP000271` | 400 | **Bad Request**<br/>Operation status does not permit change disbursement date.<br/><small>Status da operação não permite a reapresentação.</small> |
| <a id="COP000272"></a>`COP000272` | 400 | **Bad Request**<br/>There is another refinancing credit operation created with the same sent refinanced operation.<br/><small>Já eixste uma operação de crédito de refinanciamento vinculada a uma das operações enviadas.</small> |
| <a id="COP000273"></a>`COP000273` | 400 | **Bad Request**<br/>Assignment type or document key must be in request.<br/><small>O assignment type ou a document key devem estar presentes na requisição.</small> |
| <a id="COP000274"></a>`COP000274` | 400 | **Bad Request**<br/>The document number {document_number} already exists for this requester disbursable destinations.<br/><small>O número de documento {document_number} ja existe nos destinos desembolsáveis desse solicitante.</small> |
| <a id="COP000275"></a>`COP000275` | 400 | **Bad Request**<br/>Sent ispb number doesn't match financial institution ispb number.<br/><small>O número de ispb enviado deve ser igual ao número ISPB da instituição financeira.</small> |
| <a id="COP000276"></a>`COP000276` | 400 | **Bad Request**<br/>Collateral type doesn't allow to recalculate operation.<br/><small>Garantia do contrato não permite que a operação seja recalculada.</small> |
| <a id="COP000277"></a>`COP000277` | 400 | **Bad Request**<br/>Changing disbursement date is not allowed after {number_of_days} days after {collateral_type} collateral reservation.<br/><small>Não é permitido alterar data de desembolso após {number_of_days} dias da reserva da garantia {collateral_type}.</small> |
| <a id="COP000278"></a>`COP000278` | 400 | **Bad Request**<br/>The field limit_days_to_disburse must be informed for operations with this collateral type: {collateral_type}.<br/><small>O campo limit_days_to_disburse deve ser informado para operações com esse tipo de garantia: {collateral_type}.</small> |
| <a id="COP000279"></a>`COP000279` | 400 | **Bad Request**<br/>Disbursement date must be informed for operations with this collateral type: {collateral_type}.<br/><small>Data de desembolso deve ser informada para operações com esse tipo de garantia: {collateral_type}.</small> |
| <a id="COP000280"></a>`COP000280` | 400 | **Bad Request**<br/>Bank slip is already paid or scheduled.<br/><small>O boleto ja foi pago ou agendado.</small> |
| <a id="COP000281"></a>`COP000281` | 400 | **Bad Request**<br/>Installment paid at date is invalid.<br/><small>Data de pagamento da parcela não é uma data válida.</small> |
| <a id="COP000282"></a>`COP000282` | 403 | **Unauthorized**<br/>Refinanced credit operations must be from the same requester.<br/><small>As operações refinanciadas devem ser do mesmo requester que está pedindo a operação de refinanciamento.</small> |
| <a id="COP000283"></a>`COP000283` | 400 | **Bad Request**<br/>Refinanced operations issuer document must be the same as the refinancing operation.<br/><small>O número de documento das operações refinanciadas deve o mesmo que da operação de refinanciamento.</small> |
| <a id="COP000284"></a>`COP000284` | 400 | **Bad Request**<br/>The percentage between global tc plus insurance and issue amount ({tac_percentage}%) is greater than the maximum tc percentage ({maximum_tac_percentage}%). The global tc plus insurance sent was R${global_tac} and, to be valid, the global tc plus insurance amount must be until R${valid_tac}.<br/><small>A porcentagem entre a tc global mais seguro e o valor de emissão ({tac_percentage}%) é maior que a porcentagem máxima de tc ({maximum_tac_percentage}%). A tc global mais seguro enviada foi de R${global_tac} e, para ser válido, o valor de tc global mais seguro deve ser de até R${valid_tac}.</small> |
| <a id="COP000285"></a>`COP000285` | 400 | **Bad Request**<br/>The percentage between rebate and issue amount ({rebate_percentage}%) is greater than the maximum rebate percentage ({maximum_rebate_percentage}%). The rebate amount sent was R${rebate_amount} and, to be valid, the rebate amount must be until R${valid_rebate}.<br/><small>A porcentagem entre o rebate e o valor de emissão ({rebate_percentage}%) é maior que a porcentagem máxima de rebate ({maximum_rebate_percentage}%). O valor de rebate enviado foi de R${rebate_amount} e, para ser válido, o valor de rebate deve ser de até R${valid_rebate}.</small> |
| <a id="COP000286"></a>`COP000286` | 400 | **Bad Request**<br/>Invalid disbursement information payload. Bank slip disbursement type must have a digitable line(digitable_line).<br/><small>Informações de desembolso inválido. Desembolso por boleto deve possuir linha digitavel(digitable_line).</small> |
| <a id="COP000287"></a>`COP000287` | 400 | **Bad Request**<br/>Invalid disbursement information payload. The disbursement account must have account number, digit and branch or a pix key.<br/><small>Informações de desembolso inválido. A conta de desembolso precisa possuir número, digito e agência ou uma chave pix.</small> |
| <a id="COP000288"></a>`COP000288` | 400 | **Bad Request**<br/>Invalid disbursement information payload. The target bank ispb number or financial institution code number must be informed.<br/><small>Informações de desembolso inválido. O número ispb ou código da instituição financeira deve ser informado.</small> |
| <a id="COP000289"></a>`COP000289` | 400 | **Bad Request**<br/>Requester configuration for car collateral fee not found. Please contact support.<br/><small>Configuração do requester para gravame não encontrada. Por favor entre em contato com o suporte.</small> |
| <a id="COP000290"></a>`COP000290` | 400 | **Bad Request**<br/>The date field {field_en} must have a date lower or equal from today.<br/><small>O campo de data {field_pt} precisa ter uma data menor ou igual a hoje</small> |
| <a id="COP000291"></a>`COP000291` | 400 | **BadRequest**<br/>Installment Accrual from day before needs to be calculated first.<br/><small>Accrual da parcela do dia anterior precisa ser calculado primeiro.</small> |
| <a id="COP000292"></a>`COP000292` | 400 | **BadRequest**<br/>Operation {credit_operation_key} is assigned on reference date.<br/><small>Operação {credit_operation_key} está cedida na data de referência.</small> |
| <a id="COP000293"></a>`COP000293` | 400 | **BadRequest**<br/>Operation {credit_operation_key} is canceled on reference date.<br/><small>Operação {credit_operation_key} está cancelada na data de referência.</small> |
| <a id="COP000294"></a>`COP000294` | 400 | **BadRequest**<br/>Operation {credit_operation_key} is settled on reference date.<br/><small>Operação {credit_operation_key} está quitada na data de referência.</small> |
| <a id="COP000296"></a>`COP000296` | 400 | **Bad Request**<br/>The interest rate informed/calculated for the operation exceeds what is permitted by law for the collateral type informed.  Informed/calculated interest rate: {montlhy_rate}.  Limit allowed by law for the collateral type {collateral_type}: {max_interest_rate}.<br/><small>A taxa informada/calculada da operação, ultrapassa o permitido por lei para o tipo de garantia informada.  Taxa informada/calculada da operação: {montlhy_rate}.  Limite permitido por lei para o tipo de garantia {collateral_type}: {max_interest_rate}.</small> |
| <a id="COP000297"></a>`COP000297` | 400 | **Bad Request**<br/>The INSS product is temporarily unavailable<br/><small>O produto de INSS está temporariamente indisponível</small> |
| <a id="COP000298"></a>`COP000298` | 400 | **Bad Request**<br/>The card benefit INSS product is temporarily unavailable<br/><small>O produto de cartão benefício INSS está temporariamente indisponível</small> |
| <a id="COP000299"></a>`COP000299` | 400 | **Bad Request**<br/>The operation {credit_operation_key} is canceled, but does not have a cancel event.<br/><small>A operação {credit_operation_key} está cancelada, mas não possui um evento de cancelamento.</small> |
| <a id="COP000300"></a>`COP000300` | 400 | **Bad Request**<br/>There is one or more accrual days not calculated for the operation {credit_operation_key}.<br/><small>Existe um ou mais dias de accrual não calculados para essa operação {credit_operation_key}.</small> |
| <a id="COP000301"></a>`COP000301` | 400 | **Bad Request**<br/>The operation {credit_operation_key} does not have a disbursement event before reference date.<br/><small>A operação {credit_operation_key} não possui evento de desembolso antes da data de referência.</small> |
| <a id="COP000302"></a>`COP000302` | 404 | **Not Found**<br/>Accrual not found.<br/><small>Accrual não encontrado.</small> |
| <a id="COP000304"></a>`COP000304` | 400 | **BadRequest**<br/>Credit Operation {credit_operation_key} Accrual from day before needs to be calculated first.<br/><small>Accrual da operação {credit_operation_key} do dia anterior precisa ser calculado primeiro.</small> |
| <a id="COP000305"></a>`COP000305` | 400 | **Bad Request**<br/>The operation {credit_operation_key} is settled, but does not have a settlement event.<br/><small>A operação {credit_operation_key} está quitada, mas não possui um evento de quitação.</small> |
| <a id="COP000306"></a>`COP000306` | 400 | **Bad Request**<br/>Refinancing due balance ({refinancing_due_balance}) must be lower or equal than original credit operation assignment amount ({present_value}).<br/><small>Saldo devedor de refinanciamento ({refinancing_due_balance}) deve ser menor ou igual que o saldo devedor original da operação ({present_value}).</small> |
| <a id="COP000307"></a>`COP000307` | 400 | **Bad Request**<br/>Refinancing due balance ({refinancing_due_balance}) plus entry value ({entry_value}), that is {refinancing_sum}, must be lower or equal than original credit operation assignment amount ({present_value}).<br/><small>Saldo devedor de refinanciamento ({refinancing_due_balance}) mais valor de entrada ({entry_value}), que é {refinancing_sum}, deve ser menor ou igual que o saldo devedor original da operação ({present_value}).</small> |
| <a id="COP000308"></a>`COP000308` | 400 | **Bad Request**<br/>Endorsement not found<br/><small>Endosso não encontrada</small> |
| <a id="COP000309"></a>`COP000309` | 400 | **Bad Request**<br/>Today's date is outside the disbursement range.<br/><small>A data atual está fora do intervalo de desembolso.</small> |
| <a id="COP000310"></a>`COP000310` | 400 | **Bad Request**<br/>Reference date is before permitted minimum date (2022-12-26)<br/><small>Data de referência é anterior à data mínima permitida (2022-12-26).</small> |
| <a id="COP000311"></a>`COP000311` | 404 | **Not Found**<br/>CETIP assignment not found<br/><small>Liquidação CETIP não encontrada</small> |
| <a id="COP000312"></a>`COP000312` | 400 | **Bad Request**<br/>Credit operation in {operation_status} status can't be recalculate.<br/><small>Operação de crédito em status de {operation_status} não pode ser recalculada.</small> |
| <a id="COP000313"></a>`COP000313` | 404 | **Invalid Installment Status**<br/>Invalid to amend installment on status: {installment_status}.<br/><small>Inválido para aditar parcela no status: {installment_status}.</small> |
| <a id="COP000314"></a>`COP000314` | 400 | **Bad Request**<br/>Invalid operation for non-amended operation. The actual status is: {credit_operation_status}.<br/><small>Operação inválida para operação não-aditada. O status atual é: {credit_operation_status}.</small> |
| <a id="COP000315"></a>`COP000315` | 400 | **Bad Request**<br/>Amendment operation contract number ({amendment_credit_operation_contract_number}) is different from the contract number of the new operation ({credit_operation_contract_number}).<br/><small>O número de contrato da operação aditada ({amendment_credit_operation_contract_number}) é diferente do número de contrato da nova operação ({credit_operation_contract_number}).</small> |
| <a id="COP000316"></a>`COP000316` | 400 | **Bad Request**<br/>Final disbursed amount originated by the amendment credit operation (R${final_disbursed_amount}) is different from the due balance sent (R${due_balance}).<br/><small>O valor de emissão obtido pela operação de crédito aditada (R${final_disbursed_amount}) é diferente do saldo devedor enviado (R${due_balance}).</small> |
| <a id="COP000317"></a>`COP000317` | 400 | **Bad Request**<br/>Operation is already on amended status.<br/><small>Operação já está no status de aditada.</small> |
| <a id="COP000319"></a>`COP000319` | 400 | **Bad Request**<br/>Issuer must be a legal person for Commercial Paper operation type.<br/><small>Emissor deve ser uma pessoa jurídica para operações do tipo Nota comercial.</small> |
| <a id="COP000320"></a>`COP000320` | 400 | **Bad Request**<br/>Portability data field must be in collateral data for portability collateral reservation type.<br/><small>Campo portability data deve estar no collateral data para garantias de portabilidade.</small> |
| <a id="COP000321"></a>`COP000321` | 400 | **Bad Request**<br/>Disbursement is not allowed for salary account type.<br/><small>Desembolso não é permitido para conta salário.</small> |
| <a id="COP000322"></a>`COP000322` | 400 | **Bad Request**<br/>Paid amount exceeds due balance<br/><small>Valor de pagamento excede o valor devido</small> |
| <a id="COP000323"></a>`COP000323` | 400 | **Bad Request**<br/>The difference between the sum of installments present amounts ({sum_present_values}) and the sum of installments principal amounts ({sum_principal}) can't be negative.<br/><small>A diferença entre a soma dos valores presentes das parcelas ({sum_present_values}) e a soma dos valores de amortização das parcelas ({sum_principal}) não pode ser negativa.</small> |
| <a id="COP000324"></a>`COP000324` | 400 | **Bad Request**<br/>Paid amount exceeds due balance with remaining amount {remaining_amount}<br/><small>Valor de pagamento excede o valor devido com valor restante de {remaining_amount}</small> |
| <a id="COP000325"></a>`COP000325` | 400 | **Bad Request**<br/>Difference between period and installment total amount or due date was found.<br/><small>Diferença entre period e valor total da parcela ou data de vencimento foi encontrada.</small> |
| <a id="COP000326"></a>`COP000326` | 400 | **Bad Request**<br/>Credit operation actual status is not allowed for update related party. The actual status is: {credit_operation_status}.<br/><small>O status atual da operação de crédito não permite atualizar a parte relacionada. O status atual é :{credit_operation_status}.</small> |
| <a id="COP000327"></a>`COP000327` | 400 | **Bad Request**<br/>Cetip amount different from installment total amount. Installment key: {installment_key}.<br/><small>Valor Cetip diferente do valor total da parcela. Installment key:{installment_key}</small> |
| <a id="COP000328"></a>`COP000328` | 400 | **Bad Request**<br/>Collateral type {collateral_type} is not allowed for update related party.<br/><small>O tipo de garantia {collateral_type} não permite atualizar a parte relacionada.</small> |
| <a id="COP000329"></a>`COP000329` | 400 | **Bad Request**<br/>Related party not found for given related party key: {related_party_key}<br/><small>Parte relacionada não encontrada para a related party key informada: {related_party_key}</small> |
| <a id="COP000330"></a>`COP000330` | 400 | **Bad Request**<br/>Collateral type {collateral_type} does not allow this action.<br/><small>Garantia do tipo {collateral_type} não permite essa ação.</small> |
| <a id="COP000331"></a>`COP000331` | 400 | **Bad Request**<br/>The possible days to disburse must be 30 at máximum.<br/><small>Os dias possívies para o desembolso devem ser de no máximo 30 dias.</small> |
| <a id="COP000332"></a>`COP000332` | 400 | **Bad Request**<br/>Cant't reverse this operation due to no disbursement key.<br/><small>Não é possível reverter essa operação devido devido à não existência de disbursement key.</small> |
| <a id="COP000333"></a>`COP000333` | 400 | **Bad Request**<br/>Credit Operation final disbursement cannot be negative.<br/><small>O valor de desembolso final não pode ser negativo.</small> |
| <a id="COP000334"></a>`COP000334` | 400 | **Bad Request**<br/>Reversal action not allowed because credit operation is not canceled.<br/><small>Reversão não permitida devido ao status da credit operation ser diferente de canceled.</small> |
| <a id="COP000335"></a>`COP000335` | 400 | **Bad Request**<br/>The assignment amount is superior than the operation final amount.<br/><small>O valor de cessão é superior ao valor final da operação.</small> |
| <a id="COP000336"></a>`COP000336` | 400 | **Bad Request**<br/>Only assignment related fee types permitted<br/><small>Somente tipos de tarifas relacionados com cessão são permitidos</small> |
| <a id="COP000337"></a>`COP000337` | 400 | **Bad Request**<br/>The CET informed/calculated for the operation exceeds what is permitted by law for the collateral type informed.  Informed/calculated CET: {cet}.  Limit allowed by law for the collateral type {collateral_type}: {max_cet}.<br/><small>O CET da operação, ultrapassa o permitido por lei para o tipo de garantia informada.  CET informado/calculado da operação: {cet}.  Limite permitido por lei para o tipo de garantia {collateral_type}: {max_cet}.</small> |
| <a id="COP000338"></a>`COP000338` | 400 | **Bad Request**<br/>Operation cannot became opened due to it's current status {credit_operation_status}.<br/><small>Operação não pode ir para opened devido ao seu status {credit_operation_status}.</small> |
| <a id="COP000339"></a>`COP000339` | 400 | **Bad Request**<br/>Credit Operation final disbursement cannot be negative. Disbursement option: {disbursement_option} Issue amount: {issue_amount}<br/><small>O valor de desembolso final não pode ser negativo. Opção de desembolso: {disbursement_option} Valor de Emissão {issue_amount}</small> |
| <a id="COP000341"></a>`COP000341` | 400 | **Bad Request**<br/>It is not possible to calculate installment present values for operation in status: {credit_operation_status}.<br/><small>Não é possível calcular valores presentes das parcelas para operação no status: {credit_operation_status}.</small> |
| <a id="COP000342"></a>`COP000342` | 404 | **Not Found**<br/>No Collateral Receipt Found for Informed Credit Operation<br/><small>Recibo de Garantia Não Encontrado para essa Operação de Crédito Informada</small> |
| <a id="COP000343"></a>`COP000343` | 422 | **Unprocessable Entity**<br/>Celcoin service unavailable.<br/><small>Serviço da Celcoin indisponível.</small> |
| <a id="COP000344"></a>`COP000344` | 400 | **Bad Request**<br/>Action could not be created.<br/><small>Não foi possível criar a action.</small> |
| <a id="COP000345"></a>`COP000345` | 400 | **Bad Request**<br/>The final amount exceeds the disbursed or issue amount. Ensure the sum of installments amount does surpass the disbursed or issued amount.<br/><small>O valor final ultrapassa o desembolsado ou emitido. Garanta que a soma dos valores das installments supere o valor desembolsado ou emitido.</small> |
| <a id="COP000346"></a>`COP000346` | 400 | **Bad Request**<br/>Base year days must not be null.<br/><small>Os dias do ano de base não podem ser null.</small> |
| <a id="COP000347"></a>`COP000347` | 400 | **Bad Request**<br/>This request can only be made if the operation has a disbursement date.<br/><small>Essa requisição só pode ser feita caso a operação tenha uma data de desembolso.</small> |
| <a id="COP000348"></a>`COP000348` | 400 | **Bad Request**<br/>Operation with status {credit_operation_status} cannot be settled.<br/><small>Operação com status {credit_operation_status} não pode ser quitada.</small> |
| <a id="COP000349"></a>`COP000349` | 400 | **Bad Request**<br/>Sistem with instabillity. Please, retry again in a feel minutes.<br/><small>Sistema instável. Por favor, tente novamente em alguns minutos.</small> |
| <a id="COP000350"></a>`COP000350` | 400 | **Bad Request**<br/>The reversal action is not allowed, because the credit operation disbursement key do not match with incoming disbursement key.<br/><small>A ação de reversão não é permitida, devido à disbursement key da operação de crédito não bate com a incoming disbursement key.</small> |
| <a id="COP000351"></a>`COP000351` | 400 | **Bad Request**<br/>Operation with collateral constituted cannot be recalculated.<br/><small>Operação com garantia constituída não pode ser recalculada.</small> |
| <a id="COP000352"></a>`COP000352` | 400 | **Bad Request**<br/>Date {date_string} is not a valid date. Date field: {date_name}<br/><small>Data {date_string} não é uma data valida. Campo de data: {date_name}</small> |
| <a id="COP000353"></a>`COP000353` | 400 | **Bad Request**<br/>There are operations status not in waiting disbursement.<br/><small>Existem operações em status diferente de waiting disbursement.</small> |
| <a id="COP000354"></a>`COP000354` | 400 | **Bad Request**<br/>Operation previously disbursed with disbursement key cannot force cancel. Please revert transfers.<br/><small>Operação desembolsada previamente com disbursement key não pode ser cancelada forçadamente. Por favor, reverta as transfers.</small> |
| <a id="COP000355"></a>`COP000355` | 400 | **Bad Request**<br/>Operation not eligible for tc fee charge. Please do not use this fee type for this borrower.<br/><small>Operação não elegível para cobrança de taxa do tipo tc. Por favor, não use esse tipo de fee para esse tomador de crédito.</small> |
| <a id="COP000356"></a>`COP000356` | 400 | **Bad Request**<br/>Account number length must be less than 13 for TED transfer method to non-payment account type.<br/><small>O tamanho do número da conta deve ser menor do que 13 para transferências do tipo Ted para contas que não sejam de pagamento.</small> |
| <a id="COP000357"></a>`COP000357` | 400 | **Bad Request**<br/>Issuer document number is a required property.<br/><small>O número do documento é uma propriedade obrigatória.</small> |
| <a id="COP000358"></a>`COP000358` | 400 | **Bad Request**<br/>The global tc plus insurance amount ({tac_amount}) is greater than the limit ({tac_limit_amount}) allowed for this range of issued amount.<br/><small>O valor da tc global mais seguro  ({tac_amount}) é maior que o limite ({tac_limit_amount}) permitido para essa faixa de valor de emissão.</small> |
| <a id="COP000359"></a>`COP000359` | 409 | **Conflict**<br/>This installment has already been paid more than a day ago.<br/><small>Essa parcela já foi paga há mais de um dia.</small> |
| <a id="COP000360"></a>`COP000360` | 400 | **Bad Request**<br/>Reversal qr code expiration date cannot be in past.<br/><small>Expiração do qr code da reversal não pode estar no passado.</small> |
| <a id="COP000361"></a>`COP000361` | 400 | **Bad Request**<br/>The Requester Configuration doesn't have a payment_type_configuration parameter yet. Please provide it to continue.<br/><small>O Requester ainda não possui o parâmetro payment_type_configuration em sua configuração. Por favor, envie-o para continuar.</small> |
| <a id="COP000362"></a>`COP000362` | 409 | **Conflict**<br/>This installment has already been paid today.<br/><small>Essa parcela já foi paga hoje.</small> |
| <a id="COP000363"></a>`COP000363` | 400 | **Bad Request**<br/>This credit operation is in 'canceled', 'settled' or 'canceled_permanently' status.<br/><small>Essa operação de crédito esta no status 'canceled', 'settled' ou 'canceled_permanently'.</small> |
| <a id="COP000364"></a>`COP000364` | 400 | **Bad Request**<br/>Refinanced operation disbursement date must be before or equal refinancing disbursement date.<br/><small>A data de desembolso da operação refinanceada precisa ser antes ou igual da data de desembolso da que está fazendo o refinanciamento.</small> |
| <a id="COP000365"></a>`COP000365` | 404 | **Not Found**<br/>Payment method not found.<br/><small>Método de pagamento não encontrado.</small> |
| <a id="COP000366"></a>`COP000366` | 400 | **Bad Request**<br/>Area code: {area_code} is invalid for related party phone number.<br/><small>DDD: {area_code} é invalido para o número de telefone da parte relacionada.</small> |
| <a id="COP000367"></a>`COP000367` | 400 | **Bad Request**<br/>The configuration: {reversal_to_fund} must have a purchaser account configured.<br/><small>A configuração: {reversal_to_fund} precisa ter uma conta do comprador configurada.</small> |
| <a id="COP000368"></a>`COP000368` | 400 | **Bad Request**<br/>Credit operation can't be assigned to create external contract fees.<br/><small>A operação de crédito não pode estar cedida para criar taxas de contrato externas.</small> |
| <a id="COP000369"></a>`COP000369` | 400 | **Bad Request**<br/>To assign operation you must send assigned at.<br/><small>Para ceder operação pracisa envar a data de cessão.</small> |
| <a id="COP000370"></a>`COP000370` | 404 | **Not Found**<br/>Refinancing credit operation not found.<br/><small>Operação refinanciada não encontrada.</small> |
| <a id="COP000371"></a>`COP000371` | 400 | **Bad Request**<br/>Natural person type related party must have letters in name. Invalid name: {related_party_name}<br/><small>Parte relacionada do tipo pessoa deve possuir letras no nome. Nome invalido: {related_party_name}</small> |
| <a id="COP000372"></a>`COP000372` | 400 | **Bad Request**<br/>Number of installments limit exceeded. Maximum number of installments allowed:{number_of_installments}<br/><small>Limite do número de parcelas excedido. Número de parcelas máximo permitido:{number_of_installments}</small> |
| <a id="COP000373"></a>`COP000373` | 400 | **Bad Request**<br/>Unable to cancel permanently because the collateral reservation is still being processed.<br/><small>Não é possível cancelar permanentemente porque a reserva da garantia ainda está sendo processada.</small> |
| <a id="COP000374"></a>`COP000374` | 400 | **Bad Request**<br/>Cannot change disbursement date due to TED working time. For TED disbursement, disbursement date must be a work day.<br/><small>Não é possível alterar a data de desembolso por conta do horário de funcionamento da TED. Para desembolso via TED, a data de desembolso precisa ser um dia útil.</small> |
| <a id="COP000375"></a>`COP000375` | 400 | **Bad Request**<br/>The collateral was not reserved yet for performing this action.<br/><small>A garantia ainda não foi averbada para realizar essa ação.</small> |
| <a id="COP000376"></a>`COP000376` | 400 | **Bad Request**<br/>Cannot apply external fee. Fee amount must be greather than 0.<br/><small>Não é possível aplicar rebate. O valor do fee precisa ser maior que zero.</small> |
| <a id="COP000377"></a>`COP000377` | 400 | **Bad Request**<br/>This credit operation does not fullfil the requisites for changing its purchaser.<br/><small>Essa operação de crédito não atende a todos os requisitos para a troca de cessionário.</small> |
| <a id="COP000378"></a>`COP000378` | 400 | **Bad Request**<br/>Cannot settle installment associated with a refinanced credit operation.<br/><small>Não é possível quitar parcelas associadas a operações de refinanciamento.</small> |
| <a id="COP000379"></a>`COP000379` | 400 | **Bad Request**<br/>To use qi insurance, {field} must be sent<br/><small>Para usar o seguro qi, precisa ser enviado {field_translated}</small> |
| <a id="COP000380"></a>`COP000380` | 400 | **Bad Request**<br/>To use insurance premium qi can not send {field}.<br/><small>Para usar seguro qi, não pode ser enviado {filed_translator}.</small> |
| <a id="COP000381"></a>`COP000381` | 400 | **Bad Request**<br/>Issuer not eligible to use insurance premium qi. {reason}<br/><small>Tomador não elegível para usar seguro qi. {reason_translated}</small> |
| <a id="COP000382"></a>`COP000382` | 400 | **Bad Request**<br/>An IP address in signature data is required to register this collateral.<br/><small>Um endereço de ip nos dados de assinatura é necessário para registro dessa garantia.</small> |
| <a id="COP000383"></a>`COP000383` | 404 | **Not Found**<br/>Related_party not found for document number {related_party_individual_document_number}<br/><small>Parte relacionada não encontrada para o cpf {related_party_individual_document_number}</small> |
| <a id="COP000384"></a>`COP000384` | 400 | **Bad Request**<br/>It's not possible change disbursement type to TED if disbursement date is not work day.<br/><small>Não é possível trocar o tipo de desembolso para TED se a data de desembolso não for dia útil.</small> |
| <a id="COP000385"></a>`COP000385` | 409 | **Conflict**<br/>Metadata already exists for this credit operation.<br/><small>Metadata ja existe para essa operação de crédito.</small> |
| <a id="COP000386"></a>`COP000386` | 400 | **Bad Request**<br/>'Metadata key' and 'metadata value' must be informed.<br/><small>'Metadata key' e 'metadata value' devem ser informados.</small> |
| <a id="COP000387"></a>`COP000387` | 404 | **Not Found**<br/>Metadata not found.<br/><small>'Metadata não encontrado.</small> |
| <a id="COP000388"></a>`COP000388` | 400 | **Bad Request**<br/>The new installment face value must be less than the old installment face value. Old value: {old_installment_face_value}, New value: {new_installment_face_value}.<br/><small>O novo valor de face da parcela deve ser menor que o valor antigo. Valor antigo: {old_installment_face_value}, Valor novo: {new_installment_face_value}.</small> |
| <a id="COP000389"></a>`COP000389` | 400 | **Bad Request**<br/>Operations outside the purchase's eligibility. Number of installments is below the minimum allowed<br/><small>Operações fora da elegibilidade do cessionário. Número de parcelas está abaixo do mínimo permitido.</small> |
| <a id="COP000390"></a>`COP000390` | 400 | **Bad Request**<br/>Missing fields for requester_required_data: {missing_fields}<br/><small>Campos faltando para requester_required_data: {missing_fields}</small> |
| <a id="COP000391"></a>`COP000391` | 400 | **Bad Request**<br/>Missing documents for requester_required_data: {missing_documents}<br/><small>Documentos faltando para requester_required_data: {missing_documents}</small> |
| <a id="COP000392"></a>`COP000392` | 400 | **Bad Request**<br/>The new installment face value is wrong. Old value: {old_installment_face_value}, New value: {new_installment_face_value}.<br/><small>O novo valor de face da parcela está errado. Valor antigo: {old_installment_face_value}, Valor novo: {new_installment_face_value}.</small> |
| <a id="COP000393"></a>`COP000393` | 400 | **Bad Request**<br/>Credit operation status does not allow this operation. status: {credit_operation_status}<br/><small>Status da operação de crédito não permite essa operação. status: {credit_operation_status}</small> |
| <a id="COP000394"></a>`COP000394` | 400 | **Bad Request**<br/>Phone number: {phone_number} is invalid for related party phone number.<br/><small>Numero de telefone: {phone_number} é invalido para o número de telefone da parte relacionada.</small> |
| <a id="COP000395"></a>`COP000395` | 400 | **Bad Request**<br/>Credit Operation is already not assigned<br/><small>A operação de crédito não está cedida</small> |
| <a id="COP000396"></a>`COP000396` | 400 | **Bad Request**<br/>The unassigned_at is before than the assigned_at.<br/><small>A data de recompra é depois da data de cessão</small> |
| <a id="COP000397"></a>`COP000397` | 400 | **Bad Request**<br/>Issuer data is invalid: {invalid_reason}<br/><small>Dados do tomador são invalidos: {invalid_reason}</small> |
| <a id="COP000398"></a>`COP000398` | 400 | **Bad Request**<br/>Operations of type portability can not have contract fees of type tc.<br/><small>Operações do tipo portabilidade não podem ter tarifas do tipo tc.</small> |
| <a id="COP000399"></a>`COP000399` | 400 | **Bad Request**<br/>Contract fees only can be used using billing api.<br/><small>Tarifas só podem ser cadastradas via billing api.</small> |
| <a id="COP000400"></a>`COP000400` | 400 | **Bad Request**<br/>Contract fee of fee type {fee_type} can not be created or changed.<br/><small>Tarifa do tipo {fee_type} não pode ser criada ou alterada.</small> |
| <a id="COP000401"></a>`COP000401` | 400 | **Bad Request**<br/>Contract fee of fee type {fee_type} already exists.<br/><small>Tarifa do tipo {fee_type} já existe.</small> |
| <a id="COP000402"></a>`COP000402` | 400 | **Bad Request**<br/>Reversal status {reversal_status} not permitted.<br/><small>Status de reversão {reversal_status} não permitido.</small> |
| <a id="COP000403"></a>`COP000403` | 400 | **Bad Request**<br/>Operations outside the purchase's eligibility. Interest rate of the operation is below the minimum allowed.<br/><small>Operações fora da elegibilidade do cessionário. Taxa de juros da operação está abaixo do mínimo permitido.</small> |
| <a id="COP000404"></a>`COP000404` | 404 | **Not Found**<br/>Issuer analysis does not exist for credit operation with key {credit_operation_key}<br/><small>Análise do tomador não existe para operação de crédito com chave {credit_operation_key}</small> |
| <a id="COP000405"></a>`COP000405` | 400 | **Bad Request**<br/>Refinancing not allowed when refinanced credit operation is assigned.<br/><small>Refinanciamento não permitido quando a operação de crédito refinanciada está cedida.</small> |
| <a id="COP000406"></a>`COP000406` | 404 | **Not Found**<br/>Credit operation not found for this issuer analysis<br/><small>Operação de crédito não encontrada para essa análise de tomador.</small> |
| <a id="COP000407"></a>`COP000407` | 400 | **Bad Request**<br/>Credit operation already set for this date.<br/><small>Operação de crédito já escolhida para essa data.</small> |
| <a id="COP000408"></a>`COP000408` | 400 | **Bad Request**<br/>Assignment eligibility validation failed.<br/><small>Validação de elegibilidade para cessão falhou.</small> |
| <a id="COP000409"></a>`COP000409` | 409 | **Conflict**<br/>Credit operation already canceled permanently: {credit_operation_key}<br/><small>Operação de crédito já cancelada permanentemente: {credit_operation_key}</small> |
| <a id="COP000410"></a>`COP000410` | 400 | **Bad Request**<br/>Invalid cnae code ({cnae_code}) informed to related party.<br/><small>Código cnae invalido ({cnae_code}) informado pra parte relacionada.</small> |
| <a id="COP000417"></a>`COP000417` | 400 | **Bad Request**<br/>External Contract fees only can be used using rebate api.<br/><small>Tarifas Externas só podem ser cadastradas via rebate api.</small> |
| <a id="COP000418"></a>`COP000418` | 400 | **Bad Request**<br/>The percentage between insurance premium and issue amount ({insurance_premium_percentage}%) is greater than the maximum insurance premium percentage ({maximum_insurance_premium_percentage}%). The insurance premium amount sent was R${insurance_premium_amount} and, to be valid, the insurance premium amount must be until R${insurance_premium_valid_amount}.<br/><small>A porcentagem entre o seguro e o valor de emissão ({insurance_premium_percentage}%) é maior que a porcentagem máxima de seguro ({maximum_insurance_premium_percentage}%). O valor de seguro enviado foi de R${insurance_premium_amount} e, para ser válido, o valor de seguro deve ser de até R${insurance_premium_valid_amount}.</small> |
| <a id="COP000419"></a>`COP000419` | 400 | **Bad Request**<br/>Invalid Insurance product ({insurance_premium_product}).<br/><small>Produto de Seguro inválido ({insurance_premium_product}).</small> |
| <a id="COP000420"></a>`COP000420` | 400 | **Bad Request**<br/>Installment is not in a valid status to generate a {payment_type} payment method. status: {installment_status}<br/><small>Parcela não está em um status válido para gerar um pagamento do tipo {payment_type}. status: {installment_status}</small> |
| <a id="COP000421"></a>`COP000421` | 400 | **Bad Request**<br/>Payment method already exists for this installment. payment_type: {payment_type}<br/><small>Método de pagamento já existe para esta parcela. payment_type: {payment_type}</small> |
| <a id="COP000422"></a>`COP000422` | 400 | **Bad Request**<br/>Payment generation can only be applicated in installments with not pasted business due date.<br/><small>A geração de pagamento só pode ser aplicada em parcelas com data de vencimento comercial não atingida.</small> |
| <a id="COP000423"></a>`COP000423` | 400 | **Bad Request**<br/>Payment method {payment_type} does not exist.<br/><small>Método de pagamento {payment_type} não existente.</small> |
| <a id="COP000424"></a>`COP000424` | 400 | **Bad Request**<br/>Credit operation does not permit installment payment generation, because QI is not the settlement agent.<br/><small>A operação de crédito não permite a geração de pagamento de parcela, porque a QI não é o agente de liquidação.</small> |
| <a id="COP000425"></a>`COP000425` | 400 | **Bad Request**<br/>Credit operation without disbursement account.<br/><small>Operação de credito sem conta de desembolso.</small> |
| <a id="COP000426"></a>`COP000426` | 400 | **Bad Request**<br/>The sum of the installment amounts is not equal to the paid amount. Sum of installment amounts: {sum_installment_amount}, Paid amount: {paid_amount}<br/><small>A soma dos valores das parcelas não é igual ao valor pago. Soma dos valores das parcelas: {sum_installment_amount}, Valor pago: {paid_amount}</small> |
| <a id="COP000427"></a>`COP000427` | 400 | **Bad Request**<br/>The payload cannot contain both days_to_expire and qr_code_expiration_date at the same time.<br/><small>O payload não pode conter simultaneamente os campos days_to_expire e qr_code_expiration_date</small> |
| <a id="COP000428"></a>`COP000428` | 400 | **Bad Request**<br/>The maximum due date cannot exceed 14 business days from the generation date.<br/><small>A data máxima de vencimento não pode ultrapassar 14 dias úteis a partir da data de geração.</small> |
| <a id="COP000429"></a>`COP000429` | 400 | **Bad Request**<br/>Duplicate digitable line informed in after disbursement action data.<br/><small>Linha digitável duplicada informada nas ações de pós-desembolso.</small> |
| <a id="COP000430"></a>`COP000430` | 400 | **Bad Request**<br/>The collateral {collateral_type} must have a credit agent in related party list.<br/><small>A garantia {collateral_type} deve possuir um agente de crédito na lista de partes relacionadas.</small> |
| <a id="COP000431"></a>`COP000431` | 400 | **Bad Request**<br/>'individual_document_number' must be informed for credit agent.<br/><small>'individual_document_number' deve ser informado para agente de crédito.</small> |
| <a id="COP000432"></a>`COP000432` | 403 | **Forbidden**<br/>Requester is not allowed to reverse operations.<br/><small>Requester não tem permissão para reverter operações.</small> |
| <a id="COP000433"></a>`COP000433` | 400 | **Bad Request**<br/>At least one credit_operation must be open for payment to proceed for contract number {contract_number}.<br/><small>Pelo menos uma operação de crédito deve estar aberta para o pagamento prosseguir para o contrato {contract_number}.</small> |
| <a id="COP000434"></a>`COP000434` | 400 | **Bad Request**<br/>At least one credit_operation must be opened or settled to proceed with get of deductions for the contract {contract_number}.<br/><small>Pelo menos uma operação de crédito deve estar aberta ou liquidada para prosseguir com o get de deduções para o contrato {contract_number}.</small> |
| <a id="COP000435"></a>`COP000435` | 400 | **Bad Request**<br/>The installment can't be in 'paid_partial' status with paid amount equal or greater than installment total amount.<br/><small>A parcela não pode estar no status 'paid_partial' com o valor pago igual ou maior que o valor total da parcela.</small> |
| <a id="COP000436"></a>`COP000436` | 400 | **Bad Request**<br/>A related party with role type: {role_type} already exist.<br/><small>Uma parte relacionada com o tipo de função: {role_type} já existe.</small> |
| <a id="COP000437"></a>`COP000437` | 404 | **Not Found**<br/>No portability CO found for this refinancing<br/><small>Nenhuma operação de portabilidade encontrada para este refinanciamento</small> |
| <a id="COP000438"></a>`COP000438` | 404 | **Not Found**<br/>No settled refinanced credit operation found for this refinancing<br/><small>Nenhuma operação de crédito refinanciada liquidada encontrada para este refinanciamento</small> |
| <a id="COP000439"></a>`COP000439` | 409 | **Conflict**<br/>All refinanced credit operations are already reversed<br/><small>Todas as operações de crédito refinanciadas já estão revertidas</small> |
| <a id="COP000441"></a>`COP000441` | 404 | **Not Found**<br/>No eligible refinanced credit operation found for status update.<br/><small>Nenhuma refinanced credit operation elegível encontrada para alteração de status.</small> |
| <a id="COP000442"></a>`COP000442` | 404 | **Status not found**<br/>The specified status was not found in the system.<br/><small>O status informado não foi encontrado no sistema.</small> |
| <a id="COP000443"></a>`COP000443` | 409 | **Conflict**<br/>The specified refinanced credit operation is already reversed.<br/><small>A operação de crédito refinanciada informada já foi revertida.</small> |
| <a id="COP000444"></a>`COP000444` | 400 | **Bad Request**<br/>The credit operation has more than one refinanced credit operation.<br/><small>A operação de crédito possui mais de uma operação de crédito refinanciada.</small> |
| <a id="COP000445"></a>`COP000445` | 400 | **Bad Request**<br/>The credit agent: {document_number} is not authorized to issue a credit operation.<br/><small>O agente de crédito: {document_number} não está autorizado a emitir operação de crédito.</small> |
| <a id="COP000446"></a>`COP000446` | 404 | **Not Found**<br/>No refinanced credit operations found<br/><small>Nenhuma operação de crédito refinanciada encontrada</small> |
| <a id="COP000447"></a>`COP000447` | 404 | **Not Found**<br/>No refinanced credit operations opened found<br/><small>Nenhuma operação de crédito refinanciada aberta encontrada</small> |
| <a id="COP000448"></a>`COP000448` | 400 | **Bad Request**<br/>The credit operation is settled<br/><small>A operação de crédito já está liquidada</small> |
| <a id="COP000449"></a>`COP000449` | 400 | **Bad Request**<br/>The credit operation is not eligible for insurance premium<br/><small>A operação de crédito não é elegível para seguro</small> |
| <a id="COP000450"></a>`COP000450` | 409 | **Conflict**<br/>The related party address is already set.<br/><small>O endereço da parte relacionada já está definido.</small> |
| <a id="COP000451"></a>`COP000451` | 404 | **Not Found**<br/>The related party address is not set.<br/><small>O endereço da parte relacionada não está definido.</small> |
| <a id="COP000452"></a>`COP000452` | 400 | **Bad Request**<br/>The modality ncom is not allowed for non ncom credit operation type.<br/><small>A modalidade ncom não é permitida para operações de crédito que não são ncom.</small> |
| <a id="COP000453"></a>`COP000453` | 400 | **Bad Request**<br/>The credit operation must be a ncom credit operation.<br/><small>A operação de crédito deve ser uma operação de crédito ncom.</small> |
| <a id="COP000454"></a>`COP000454` | 400 | **Bad Request**<br/>The credit operation is assigned.<br/><small>A operação de crédito está atribuída.</small> |
| <a id="COP000455"></a>`COP000455` | 404 | **Not Found**<br/>The marital status was not found.<br/><small>O estado civil não foi encontrado.</small> |
| <a id="COP000456"></a>`COP000456` | 400 | **Bad Request**<br/>The email is not valid.<br/><small>O email não é válido.</small> |
| <a id="COP000457"></a>`COP000457` | 404 | **Not Found**<br/>The property system was not found.<br/><small>O sistema de propriedade não foi encontrado.</small> |
| <a id="COP000458"></a>`COP000458` | 400 | **Bad Request**<br/>The date cannot be more than 110 years ago.<br/><small>A data não pode ser mais de 110 anos atrás.</small> |
| <a id="COP000459"></a>`COP000459` | 400 | **Bad Request**<br/>The birth date must be in YYYY-MM-DD format.<br/><small>A data de nascimento deve estar no formato YYYY-MM-DD.</small> |
| <a id="COP000460"></a>`COP000460` | 404 | **Not Found**<br/>The document identification type was not found.<br/><small>O tipo de documento de identificação não foi encontrado.</small> |
| <a id="COP000461"></a>`COP000461` | 404 | **Not Found**<br/>The gender was not found.<br/><small>O gênero não foi encontrado.</small> |
| <a id="COP000462"></a>`COP000462` | 400 | **Bad Request**<br/>The paid amount must be less than the present amount of the installment: {present_amount}.<br/><small>O valor pago deve ser menor que o valor presente da parcela: {present_amount}.</small> |
| <a id="COP000463"></a>`COP000463` | 400 | **Bad Request**<br/>The paid amount must be less than or equal to the present amount of the installment: {present_amount}.<br/><small>O valor pago deve ser menor ou igual ao valor presente da parcela: {present_amount}.</small> |
| <a id="COP000464"></a>`COP000464` | 400 | **Bad Request**<br/>The installment status must be 'paid' or 'paid_partial'.<br/><small>O status da parcela deve ser 'paid' ou 'paid_partial'.</small> |
| <a id="COP000465"></a>`COP000465` | 400 | **Bad Request**<br/>The credit operation must be assigned to be paid.<br/><small>A operação de crédito deve estar cedida para ser paga.</small> |
| <a id="COP000466"></a>`COP000466` | 400 | **Bad Request**<br/>The paid at date must be in the past.<br/><small>A data de pagamento deve ser no passado.</small> |
| <a id="COP000467"></a>`COP000467` | 400 | **Bad Request**<br/>The installment must be in a pending status to be paid.<br/><small>A parcela deve estar em um status pendente para ser paga.</small> |
| <a id="COP000468"></a>`COP000468` | 400 | **Bad Request**<br/>Cannot change disbursement date of a credit operation that has disbursement end date in the past. disbursement_end_date: {disbursement_end_date}<br/><small>Não é possível alterar a data de desembolso de uma operação de crédito que possui data de fim de desembolso no passado. disbursement_end_date: {disbursement_end_date}</small> |
| <a id="COP000469"></a>`COP000469` | 400 | **Bad Request**<br/>Cannot pay to Inbursa.<br/><small>Não é possível pagar para o Inbursa.</small> |
| <a id="COP000470"></a>`COP000470` | 400 | **Bad Request**<br/>The paid amount cannot be zero.<br/><small>O valor pago não pode ser zero.</small> |
| <a id="COP000471"></a>`COP000471` | 400 | **Bad Request**<br/>The annual CET is not valid. Received: {received_annual_cet}, Calculated: {calculated_annual_cet}<br/><small>O CET anual não é válido. Recebido: {received_annual_cet}, Calculado: {calculated_annual_cet}</small> |
| <a id="COP000472"></a>`COP000472` | 400 | **Bad Request**<br/>The monthly CET is not valid. Received: {received_monthly_cet}, Calculated: {calculated_monthly_cet}<br/><small>O CET mensal não é válido. Recebido: {received_monthly_cet}, Calculado: {calculated_monthly_cet}</small> |
| <a id="COP000473"></a>`COP000473` | 400 | **Bad Request**<br/>The date field {field_en} is invalid: {reason_en}<br/><small>O campo de data {field_pt} é inválido: {reason_pt}</small> |
| <a id="COP000474"></a>`COP000474` | 400 | **Bad Request**<br/>Installment payment before contract start<br/><small>Pagamento de parcela antes do início do contrato</small> |
| <a id="COP000475"></a>`COP000475` | 400 | **Bad Request**<br/>Amount must be greater than {min_amount} and less than {max_amount}.<br/><small>O valor deve ser maior que {min_amount} e menor que {max_amount}.</small> |
| <a id="COP000476"></a>`COP000476` | 400 | **Bad Request**<br/>The reservation status of the refinanced credit operation does not allow this operation.<br/><small>O status de reserva da operação refinanciada não permite esta operação.</small> |
| <a id="COP000477"></a>`COP000477` | 400 | **Bad Request**<br/>The paid at date is more than 5 days from the current date<br/><small>A data de pagamento está há mais de 5 dias da data atual</small> |
| <a id="COP000478"></a>`COP000478` | 400 | **Bad Request**<br/>Discount amount {discount_amount} exceeds due balance {due_balance}<br/><small>Valor de desconto {discount_amount} excede o valor devido {due_balance}</small> |
| <a id="COP000479"></a>`COP000479` | 400 | **Bad Request**<br/>Cancel not permitted, maximum quantity for uncancel reached<br/><small>Cancelamento não permitido, quantidade máxima de cancelamentos atingida</small> |
| <a id="COP000480"></a>`COP000480` | 400 | **Bad Request**<br/>Credit Operation already assigned and cannot have its purchaser changed<br/><small>A operação de crédito já está cedida e não pode ter seu cessionário alterado</small> |
| <a id="COP000481"></a>`COP000481` | 400 | **Bad Request**<br/>Credit Operation with assignment in progress and cannot have its purchaser changed<br/><small>A operação de crédito com cessão em andamento e não pode ter seu cessionário alterado</small> |
| <a id="COP000482"></a>`COP000482` | 400 | **Bad Request**<br/>A document of type {document_type} already exists for this related party.<br/><small>Um documento do tipo {document_type} já existe para o assinante em questão.</small> |
| <a id="COP000483"></a>`COP000483` | 401 | **Unauthorized**<br/>Invalid recalculation.<br/><small>Recalculo invalido.</small> |
| <a id="COP000484"></a>`COP000484` | 400 | **Bad Request**<br/>Monthly interest rate or installments must be provided.<br/><small>A taxa de juros mensal ou as parcelas devem ser fornecidas.</small> |
| <a id="COP000485"></a>`COP000485` | 400 | **Bad Request**<br/>Action must be in the same titularity as issuer document number when the operation has insurance.<br/><small>A ação deve ser na mesma titulação do documento do emitente.</small> |
| <a id="COP000486"></a>`COP000486` | 400 | **Bad Request**<br/>Action must be ted or pix when the operation has insurance.<br/><small>A ação deve ser ted ou pix quando a operação possui seguro.</small> |
| <a id="COP000487"></a>`COP000487` | 400 | **Bad Request**<br/>Action transaction amount must be equal to credit operation final disbursement amount minus insurance premium qi amount released.<br/><small>O valor da ação deve ser igual ao valor final de desembolso da operação de crédito menos o valor do seguro.</small> |
| <a id="COP000488"></a>`COP000488` | 400 | **Bad Request**<br/>The requester configuration is not active.<br/><small>A configuração do solicitante não está ativa.</small> |
| <a id="COP000506"></a>`COP000506` | 400 | **Bad Request**<br/>Vehicle proposal item mismatch in {mismatch_field}: sum of items ({items_sum}) must equal proposal.{amount_field} ({expected_amount}).<br/><small>Inconsistência em {mismatch_field} da proposta veicular: a soma dos itens ({items_sum}) deve ser igual a proposal.{amount_field} ({expected_amount}).</small> |

### CT — Credit Transfer

133 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="CT000001"></a>`CT000001` | 400 | **Bad Request**<br/>Use POST /account |
| <a id="CT000002"></a>`CT000002` | 404 | **Not Found**<br/>Proposal not found<br/><small>Proposta não encontrada</small> |
| <a id="CT000003"></a>`CT000003` | 404 | **Not Found**<br/>Credit Operation not found ({credit_operation_key}).<br/><small>Operação de crédito não encontrada ({credit_operation_key}).</small> |
| <a id="CT000004"></a>`CT000004` | 409 | **Conflict**<br/>Proposal status ({proposal_status}) does not allow portability settlement request.<br/><small>Status da proposta ({proposal_status}) não permite solicitação de liquidação de portabilidade.</small> |
| <a id="CT000006"></a>`CT000006` | 404 | **Not Found**<br/>Financial Institution with code {financial_institution_code_number} not found<br/><small>Instituição Financeira com código {financial_institution_code_number} não encontrada.</small> |
| <a id="CT000007"></a>`CT000007` | 404 | **Not Found**<br/>Requester configuration for requester key {requester_key}.<br/><small>Configuração de requisitante com key {requester_key} não encontrada.</small> |
| <a id="CT000008"></a>`CT000008` | 400 | **Bad Request**<br/>CCB participants are not the same as the signers<br/><small>Participantes da CCB não são iguais aos signatários</small> |
| <a id="CT000009"></a>`CT000009` | 400 | **Bad Request**<br/>Contract amount must be greater than the disbursement amount<br/><small>Valor do contrato deve ser maior que o valor do desembolso</small> |
| <a id="CT000010"></a>`CT000010` | 400 | **Bad Request**<br/>Invalid proposal status {enumerator} for cancellation.<br/><small>Status da proposta {enumerator} inválido para cancelamento.</small> |
| <a id="CT000011"></a>`CT000011` | 400 | **Bad Request**<br/>Invalid Action<br/><small>Ação Inválida</small> |
| <a id="CT000012"></a>`CT000012` | 400 | **Bad Request**<br/>Field 'type' cannot be null and must contain one of the values ('data-signature', 'pdf-signature')<br/><small>O campo 'type' não pode ser nulo e deve conter um dos valores ('data-signature', 'pdf-signature')</small> |
| <a id="CT000013"></a>`CT000013` | 400 | **Bad Request**<br/>This operation has already been signed.<br/><small>Essa operação ja foi assinada.</small> |
| <a id="CT000014"></a>`CT000014` | 400 | **Bad Request**<br/>Invalid document certifier<br/><small>Certificadora invalida.</small> |
| <a id="CT000015"></a>`CT000015` | 400 | **Bad Request**<br/>Failed validating MT hash. Reason: {reason}<br/><small>Falha ao validar hash MT. Razão: {reason}</small> |
| <a id="CT000016"></a>`CT000016` | 400 | **Bad Request**<br/>signature_template_key not associated with requester configuration.<br/><small>signature_template_key não associada a configuração do requisitante.</small> |
| <a id="CT000017"></a>`CT000017` | 400 | **Bad Request**<br/>The proposal is not pending accptance by requester.<br/><small>A proposta não está pendente aceite.</small> |
| <a id="CT000018"></a>`CT000018` | 400 | **Bad Request**<br/>Failed to check contract in dataprev. Please try again.<br/><small>Falha ao validar contrato na dataprev, tente novamente.</small> |
| <a id="CT000019"></a>`CT000019` | 400 | **Bad Request**<br/>Proposal has no contract number.<br/><small>Proposta não tem número de contrato.</small> |
| <a id="CT000020"></a>`CT000020` | 400 | **Bad Request**<br/>Contract has errors on Dataprev.<br/><small>O contrato possui erros na Dataprev.</small> |
| <a id="CT000021"></a>`CT000021` | 400 | **Bad Request**<br/>Invalid time for signature and disbursement process.<br/><small>Horário invalido para processo de desembolso e assinatura.</small> |
| <a id="CT000023"></a>`CT000023` | 400 | **Bad Request**<br/>This operation has been canceled.<br/><small>Essa operação foi cancelada.</small> |
| <a id="CT000024"></a>`CT000024` | 404 | **Not Found**<br/>Received portability not found.<br/><small>Portabilidade não encontrada.</small> |
| <a id="CT000025"></a>`CT000025` | 404 | **Not Found**<br/>Received portability status not found.<br/><small>Status da portabilidade não encontrada.</small> |
| <a id="CT000026"></a>`CT000026` | 404 | **Not Found**<br/>Retained reason not found.<br/><small>Razão de retenção não encontrada.</small> |
| <a id="CT000027"></a>`CT000027` | 400 | **Bad Request**<br/>Approved method past closing time<br/><small>Método de aprovação fora do horário permitido</small> |
| <a id="CT000028"></a>`CT000028` | 400 | **Bad Request**<br/>Retention method past max day and closing time<br/><small>Método de retenção fora da data e horário máximo</small> |
| <a id="CT000029"></a>`CT000029` | 400 | **Bad Request**<br/>Retention reason mandatory<br/><small>Razao de retenção obrigatório</small> |
| <a id="CT000030"></a>`CT000030` | 400 | **Bad Request**<br/>Cancel reason mandatory<br/><small>Razao de cancelamento obrigatório</small> |
| <a id="CT000031"></a>`CT000031` | 404 | **Bad Request**<br/>Contract not found in BTG system. contract_number: {message}<br/><small>Contrato não encontrado no sistema do BTG. contract_number: {message}</small> |
| <a id="CT000032"></a>`CT000032` | 400 | **Bad Request**<br/>BTG due balance date doesnt match max portability date.<br/><small>Data do cálculo do saldo devedor do BTG não é igual à data máxima de envio da portabilidade.</small> |
| <a id="CT000033"></a>`CT000033` | 400 | **Bad Request**<br/>The operation data must have one of the fields: desired_installments or installment_face_value.<br/><small>O operation data deve possuir um dos campos: desired_installments or installment_face_value.</small> |
| <a id="CT000034"></a>`CT000034` | 400 | **Bad Request**<br/>Invalid fee payment for rco report.<br/><small>O status do fee payment não é válido para a validação de rco.</small> |
| <a id="CT000035"></a>`CT000035` | 400 | **Bad Request**<br/>Incomplete requester configuration. the requester must have a refinancing template key. Please, contact our support.<br/><small>Configuração incompleta do solicitante. o solicitante deve ter template key de refinanciamento. Por favor, entre em contato com nosso suporte.</small> |
| <a id="CT000036"></a>`CT000036` | 400 | **Bad Request**<br/>Operation contract document must be signed.<br/><small>O documento de contrato da operação deve estar assinado.</small> |
| <a id="CT000037"></a>`CT000037` | 400 | **Bad Request**<br/>Error while send collateral reservation.{ex}<br/><small>Erro ao enviar reserva da garantia. {ex}</small> |
| <a id="CT000038"></a>`CT000038` | 400 | **Bad Request**<br/>Credit Operation status doesnt allow signature.<br/><small>Status da operação de crédito não permite assinatura.</small> |
| <a id="CT000039"></a>`CT000039` | 400 | **Bad Request**<br/>Credit operation type must be portability_credit_operation or refinancing_credit_operation.<br/><small>Tipo da operação deve ser portability_credit_operation ou refinancing_credit_operation.</small> |
| <a id="CT000040"></a>`CT000040` | 400 | **Bad Request**<br/>Portability operation must be in 'paid' status to accept refinancing operation.<br/><small>Operação de portabilidade deve estar no status 'paid' para continuar com a operação de refinanciamento.</small> |
| <a id="CT000041"></a>`CT000041` | 400 | **Bad Request**<br/>Collateral from portability must be constituted to continue refinancing operation.<br/><small>Colateral da operação de portabilidade deve estar constituído para continuar operação de refinanciamento.</small> |
| <a id="CT000042"></a>`CT000042` | 400 | **Bad Request**<br/>Refinancing operation must be issued to proceed.<br/><small>Operação de refinanciamento deve estar emitida para prosseguir.</small> |
| <a id="CT000043"></a>`CT000043` | 404 | **Bad Request**<br/>Refinancing operation not found.<br/><small>Operação de refinanciamento não encontrada.</small> |
| <a id="CT000044"></a>`CT000044` | 400 | **Bad Request**<br/>Refinancing operation status does not allow cancellation.<br/><small>Status da operação de refinanciamento não permite cancelamento.</small> |
| <a id="CT000045"></a>`CT000045` | 400 | **Bad Request**<br/>This operation is only allowed for collateral type social_security and dataprev_reservation refinancing operations.<br/><small>Essa operação só é permitida para operações de refinanciamento com garantia de INSS.</small> |
| <a id="CT000046"></a>`CT000046` | 400 | **Bad Request**<br/>Operation status ({operation_status}) does not allow this operation.<br/><small>Status da operação de refinanciamento ({operation_status}) não permite essa operação.</small> |
| <a id="CT000047"></a>`CT000047` | 400 | **Bad Request**<br/>Refinancing operation must be constituted in Dataprev to change disbursement date.<br/><small>Operação de refinanciamento deve estar constituída para alterar data de desembolso.</small> |
| <a id="CT000048"></a>`CT000048` | 400 | **Bad Request**<br/>Incomplete requester configuration. Please Contact our support.<br/><small>Configuração do requisitante incompleta. Por favor, entre em contato com nosso suporte.</small> |
| <a id="CT000049"></a>`CT000049` | 400 | **Bad Request**<br/>Financial institution sent in original contract is not CIP participant. ispb: {ispb_number}<br/><small>Instituição financeira enviada no contrato original não é participante da CIP. ispb: {ispb_number}</small> |
| <a id="CT000050"></a>`CT000050` | 400 | **Bad Request**<br/>Financial institution code was not sent. portability_number: {portability_number}<br/><small>Código da instituição financeira não foi enviado. portability_number: {portability_number}</small> |
| <a id="CT000051"></a>`CT000051` | 400 | **Bad Request**<br/>It wasn't possible to notificate BTG about a received portability. portability_number: {portability_number}<br/><small>Não foi possível notificar o BTG sobre um ataque de portabilidade. portability_number: {portability_number}</small> |
| <a id="CT000052"></a>`CT000052` | 400 | **Bad Request**<br/>It wasn't possible to confirm a portability for BTG. portability_number: {portability_number}<br/><small>Não foi possível confirmar uma portabilidade para o BTG. portability_number: {portability_number}</small> |
| <a id="CT000053"></a>`CT000053` | 400 | **Bad Request**<br/>It wasn't possible to cancel a portability for BTG as STR0047 wasn't correct. portability_number: {portability_number}<br/><small>Não foi possível cancelar uma portabilidade para o BTG já que a STR0047 não estava correta. portability_number: {portability_number}</small> |
| <a id="CT000054"></a>`CT000054` | 400 | **Bad Request**<br/>Portability proposal do not have refinancing<br/><small>Proposta de portabilidade não foi cadastrad com o refinanciamento</small> |
| <a id="CT000055"></a>`CT000055` | 400 | **Bad Request**<br/>To create refinancing operation must be sent financial and disbursement bank account data.<br/><small>Para criar um refinanciamento os dados financeiros e de conta de desembolso devem ser enviados.</small> |
| <a id="CT000056"></a>`CT000056` | 400 | **Bad Request**<br/>Proposal actual status {proposal_status} does not allow this operation.<br/><small>O status atual da proposta {proposal_status} não permite essa operação.</small> |
| <a id="CT000057"></a>`CT000057` | 400 | **Bad Request**<br/>The installment amount of the new simulation({new_installment_amount}) must be lower than original installment amount ({origin_contract_installment_value}).<br/><small>O valor da parcela da nova simulação({new_installment_amount}) deve ser inferior ao valor da parcela da operação original ({origin_contract_installment_value}).</small> |
| <a id="CT000058"></a>`CT000058` | 400 | **Bad Request**<br/>Proposal must be submitted within {default_delta_days} days after creation, difference in days between proposal creation and submission date: {days}.<br/><small>A proposta deve ser enviada até {default_delta_days} dias depois da criação, diferença de dias entre data de criação da proposta e envio: {days}.</small> |
| <a id="CT000059"></a>`CT000059` | 400 | **Bad Request**<br/>The interest rate informed/calculated for the {operation_type} operation exceeds what is permitted by law for the collateral type informed.  Informed/calculated interest rate: {montlhy_rate}.  Limit allowed by law for the collateral type {collateral_type}: {max_interest_rate}.<br/><small>A taxa informada/calculada da operação de {operation_type_translate}, ultrapassa o permitido por lei para o tipo de garantia informada.  Taxa informada/calculada da operação: {montlhy_rate}.  Limite permitido por lei para o tipo de garantia {collateral_type}: {max_interest_rate}.</small> |
| <a id="CT000060"></a>`CT000060` | 400 | **Bad Request**<br/>The provided related_party_key is not from borrower or issuer legal representative.<br/><small>A related_party_key fornecida não é a do tomador ou do representante legal.</small> |
| <a id="CT000061"></a>`CT000061` | 400 | **Bad Request**<br/>Collateral not found for reported credit operation.<br/><small>Collateral não encontrada para operação de credito informada.</small> |
| <a id="CT000062"></a>`CT000062` | 400 | **Bad Request**<br/>Field {field} is required.<br/><small>Campo {field} é obrigatório.</small> |
| <a id="CT000063"></a>`CT000063` | 400 | **Bad Request**<br/>Wrong datetime format. Received: {signature_datetime}, expected format: '2023-01-01T12:30:55.000001Z'.<br/><small>Formato de data incorreto. Recebido: {signature_datetime}, formato esperado: '2023-01-01T12:30:55.000001Z'.</small> |
| <a id="CT000064"></a>`CT000064` | 400 | **Bad Request**<br/>Retention reason '{retention_reason}' not allowed for this operation.<br/><small>Motivo de retenção '{retention_reason}' não permitido para este tipo de operação.</small> |
| <a id="CT000065"></a>`CT000065` | 400 | **Bad Request**<br/>The number of installments of the portability operation is longer than the remaining number of installments of the original operation.<br/><small>O número de parcelas da operação de portabilidade é maior do que o número de parcelas remanescente da operação original.</small> |
| <a id="CT000066"></a>`CT000066` | 400 | **Bad Request**<br/>Portability must be in status settlement_sent to be able to change to pending_settlement_confirmation<br/><small>Portabilidade deve estar no status settlement_sent para poder alterar para pending_settlement_confirmation</small> |
| <a id="CT000067"></a>`CT000067` | 404 | **Not Found**<br/>portability_settlement not found.<br/><small>portability_settlement não encontrado.</small> |
| <a id="CT000068"></a>`CT000068` | 400 | **Bad Request**<br/>Refinancing operation can not be accepted without signature data<br/><small>Operação de refinanciamento não pode ser aceita sem dados de assinatura;</small> |
| <a id="CT000069"></a>`CT000069` | 400 | **Bad Request**<br/>Delete method past closing time<br/><small>Método de deleção fora do horário permitido</small> |
| <a id="CT000070"></a>`CT000070` | 400 | **Bad Request**<br/>Accepted by requester proposal can not be delete in the same day as approved.<br/><small>Propostas aceitas pelo solicitante não podem ser deletadas no mesmo dia de aprovação.</small> |
| <a id="CT000071"></a>`CT000071` | 400 | **Bad Request**<br/>Invalid time to send STR0047<br/><small>Horário inválido para envio de STR0047</small> |
| <a id="CT000072"></a>`CT000072` | 400 | **Bad Request**<br/>Pending settlement confirmation portability must be reserved by portability to continue refinancing operation or portability paid for at least 4 days.<br/><small>Operação de portabilidade sem pagamento confirmado só pode continuar com o refinanciamento se o colateral estiver averbado por portabilidade ou portabilidade paga a no mínimo 4 dias.</small> |
| <a id="CT000073"></a>`CT000073` | 400 | **Bad Request**<br/>Refinancing already accepted.<br/><small>Refinanciamento já foi aceito.</small> |
| <a id="CT000074"></a>`CT000074` | 400 | **Bad Request**<br/>The calculated annual interest rate ({annual_interest_rate}) is too low.<br/><small>A taxa anual calculada ({annual_interest_rate}) é muito baixa.</small> |
| <a id="CT000075"></a>`CT000075` | 400 | **Bad Request**<br/>Retention Proof document mandatory<br/><small>Documento de evidência de retenção obrigatório.</small> |
| <a id="CT000076"></a>`CT000076` | 400 | **Bad Request**<br/>Can only cancel refinancing operation with opened status.<br/><small>Somente operações de refinanciamento com status aberto podem ser canceladas</small> |
| <a id="CT000077"></a>`CT000077` | 404 | **Bad Request**<br/>Portability not found for portability_number: {portability_number}.<br/><small>Portabilidade não encontrada para o número de portabilidade: {portability_number}.</small> |
| <a id="CT000078"></a>`CT000078` | 400 | **Bad Request**<br/>Received portability status {received_portability_status} does not allow retention.<br/><small>Received portability status {received_portability_status} não permite retenção.</small> |
| <a id="CT000079"></a>`CT000079` | 400 | **Bad Request**<br/>Refinancing operation must not be constituted in Dataprev to change disbursement and financial informations.<br/><small>Operação de refinanciamento não pode estar constituída para alterar as informações financeiras e de desembolso.</small> |
| <a id="CT000080"></a>`CT000080` | 400 | **Bad Request**<br/>Refinancing operation must be signed to continue.<br/><small>Operação de refinanciamento precisa estar assinada para continuar.</small> |
| <a id="CT000081"></a>`CT000081` | 400 | **Not Found**<br/>Credit Operation not in canceled_permanently status.<br/><small>Operação de crédito não está no status canceled_permanently.</small> |
| <a id="CT000082"></a>`CT000082` | 400 | **Bad Request**<br/>Portability can not be with collateral constituted to alter data.<br/><small>Portabilidade não pode ter collateral constituído para alterar dados.</small> |
| <a id="CT000083"></a>`CT000083` | 400 | **Bad Request**<br/>Portability should be with consignable margin excceded error to alter data.<br/><small>Portabilidade deve estar com erro de margem consignade excedida para alterar dados.</small> |
| <a id="CT000084"></a>`CT000084` | 400 | **Bad Request**<br/>Portability new installment face value must be lower than old installment face value.<br/><small>Novo valor de face da parcela da portabilidade precisa ser menor que o valor antido de face.</small> |
| <a id="CT000085"></a>`CT000085` | 404 | **Not Found**<br/>Proposal does not have a portability settlement.<br/><small>Proposta não tem liquidação.</small> |
| <a id="CT000086"></a>`CT000086` | 400 | **Bad Request**<br/>It's not permitted to create operation type portability with refinancing_data<br/><small>Não é permitido criar o tipo de operação portability com refinancing_data</small> |
| <a id="CT000087"></a>`CT000087` | 400 | **Bad Request**<br/>Portability collateral must be constituted to add rebates.<br/><small>A portabilidade precisa estar com a garantia averbada para adicionar rebates.</small> |
| <a id="CT000088"></a>`CT000088` | 400 | **Bad Request**<br/>Grace period is just allowed to refinance operations.<br/><small>Carência só é permitida para operações de refinanciamento.</small> |
| <a id="CT000089"></a>`CT000089` | 400 | **Bad Request**<br/>Grace period not allowed to borrower with document number '{document_number}' from state '{state}'.<br/><small>Carência não permitida para o tomador com o cpf '{document_number}' do estado '{state}'.</small> |
| <a id="CT000090"></a>`CT000090` | 400 | **Bad Request**<br/>The number '{number_of_grace_periods}' of grace competencies is invalid. The accepted range is 0 to 6.<br/><small>O número '{number_of_grace_periods}' da carência de competências está inválido. O intervalo aceito é de 0 a 6.</small> |
| <a id="CT000091"></a>`CT000091` | 400 | **Bad Request**<br/>Annual interest rate must be lower than {max_annual_interest_rate}. Calculated annual interest rate: {annual_rate}.<br/><small>Taxa de juros anual deve ser menor que {max_annual_interest_rate}. Taxa de juros anual calculada: {annual_rate}.</small> |
| <a id="CT000092"></a>`CT000092` | 400 | **Bad Request**<br/>Current received portability status {current_received_portability_status} does not allow change to {new_received_portability_status}.<br/><small>O status de portabilidade recebida atual {current_received_portability_status} não permite alterar para {new_received_portability_status}.</small> |
| <a id="CT000093"></a>`CT000093` | 400 | **Bad Request**<br/>The ISPB code from the institution of the origin contract cannot be the same as QI SCD.<br/><small>O código ISPB da instituição do contrato de origem não pode ser o mesmo da QI SCD.</small> |
| <a id="CT000094"></a>`CT000094` | 400 | **Bad Request**<br/>Subcorban with document number {document_number} not permitted.<br/><small>Subcorban com numero de documento {document_number} não permitido.</small> |
| <a id="CT000095"></a>`CT000095` | 400 | **Bad Request**<br/>Cannot update collateral data for constituted credit operation.<br/><small>Não é possível atualizar dados de garantia para operação de crédito constituída.</small> |
| <a id="CT000096"></a>`CT000096` | 400 | **Bad Request**<br/>Cannot approve proposal for the following origin institution {ispb}.<br/><small>Não é possível aprovar a proposta para a seguinte instituição {ispb}</small> |
| <a id="CT000097"></a>`CT000097` | 400 | **Bad Request**<br/>Received Portability not retained.<br/><small>A portabilidade recebida não está retida.</small> |
| <a id="CT000098"></a>`CT000098` | 400 | **Bad Request**<br/>Invalid Ip Address {ip_address} .<br/><small>Endereço de Ip inválido {ip_address} .</small> |
| <a id="CT000099"></a>`CT000099` | 400 | **Bad Request**<br/>The installment amount of the new refinancing simulation ({new_installment_amount}) has a difference of less than {percent_difference}% compared to the original installment amount ({origin_contract_installment_value}).<br/><small>O valor da parcela da nova simulação ({new_installment_amount}) tem uma diferença inferior a {percent_difference}% em relação ao valor da parcela da operação original ({origin_contract_installment_value}).</small> |
| <a id="CT000100"></a>`CT000100` | 400 | **Bad Request**<br/>The final disbursement amount ({final_disbursement_amount}) is less than {minimum_final_disbursement_amount}.<br/><small>O valor do desembolso final ({final_disbursement_amount}) é inferior a {minimum_final_disbursement_amount}.</small> |
| <a id="CT000101"></a>`CT000101` | 400 | **Bad Request**<br/>The ISPB code from the institution of the origin contract {ispb_number} cannot be the in this list: {ispb_block_list}.<br/><small>O código ISPB da instituição do contrato de origem {ispb_number} não pode estar nessa lista: {ispb_block_list}.</small> |
| <a id="CT000102"></a>`CT000102` | 400 | **Bad Request**<br/>Operation cannot be ported with zero installments paid.<br/><small>Não é possível portar operação com nenhuma parcela paga.</small> |
| <a id="CT000103"></a>`CT000103` | 400 | **Bad Request**<br/>Operations outside the purchase's eligibility. {error}<br/><small>Operações fora da elegibilidade do cessionário. {error_ptbr}</small> |
| <a id="CT000104"></a>`CT000104` | 400 | **Bad Request**<br/>The difference between portability due balance and refinanced operation amount must be greather or equals to 10% of the due balance value. Percentual: {percentage}%.<br/><small>A diferença entre o saldo devedor da portabilidade e o valor da operação de refin deve ser maior ou igual que 10% do valor do saldo devedor. Percentage: {percentage}%.</small> |
| <a id="CT000105"></a>`CT000105` | 400 | **Bad Request**<br/>The reduction in the final disbursed amount can't be greather than 10%.<br/><small>A redução do valor de troco para o tomador não deve ser maior que 10%.</small> |
| <a id="CT000106"></a>`CT000106` | 400 | **Bad Request**<br/>The received portability cannot be accepted because the contract has been assigned<br/><small>A portabilidade não pode ser aceita porque o contrato foi cedido</small> |
| <a id="CT000107"></a>`CT000107` | 400 | **Bad Request**<br/>Assignment eligibility validation failed.<br/><small>Validação de elegibilidade para cessão falhou.</small> |
| <a id="CT000108"></a>`CT000108` | 400 | **Bad Request**<br/>All documents must have a valid 'document_key' field.<br/><small>Todos os documentos devem conter uma 'document_key' válida.</small> |
| <a id="CT000109"></a>`CT000109` | 400 | **Bad Request**<br/>All documents must have a valid 'file_type' field.<br/><small>Todos os documentos devem conter um 'file_type' válido.</small> |
| <a id="CT000110"></a>`CT000110` | 400 | **Bad Request**<br/>First refinancing due date different from first portability due date.<br/><small>Primeira data de vencimento do refinanciamento é diferente da primeira data de vencimento da portabilidade.</small> |
| <a id="CT000111"></a>`CT000111` | 400 | **Bad Request**<br/>STR not sent, could not generate STR0047 receipt<br/><small>STR não enviado, não foi possível gerar o STR0047 receipt</small> |
| <a id="CT000112"></a>`CT000112` | 400 | **Bad Request**<br/>Accepting portability disabled<br/><small>Aceitação de portabilidade desabilitada</small> |
| <a id="CT000113"></a>`CT000113` | 400 | **Bad Request**<br/>Monthly interest rate {monthly_interest_rate} is less than {min_monthly_interest_rate}<br/><small>A taxa de juros mensal {monthly_interest_rate} é menor que {min_monthly_interest_rate}</small> |
| <a id="CT000114"></a>`CT000114` | 400 | **Bad Request**<br/>the field assistance_type and state are required<br/><small>o campo assistance_type e state são obrigatórios</small> |
| <a id="CT000115"></a>`CT000115` | 400 | **Bad Request**<br/>bank code or isbp number is required |
| <a id="CT000116"></a>`CT000116` | 400 | **Bad Request**<br/>Credit agent must be informed for proposal with {collateral_type} collateral type.<br/><small>Agente de crédito deve ser informado para proposta com garantia do tipo {collateral_type}.</small> |
| <a id="CT000117"></a>`CT000117` | 400 | **Bad Request**<br/>Can only recreate portability operation with settled status.<br/><small>Só é possível recriar a operação de portabilidade com o status 'settled'.</small> |
| <a id="CT000118"></a>`CT000118` | 400 | **Bad Request**<br/>The final disbursement amount is less than {min_final_disbursement_amount_diff_percentage}% of the sum of refinancing installment minus the sum of portability installment. The minimum final disbursement amount allowed is {min_final_disbursement_amount}. Calculated final disbursement amount: {final_disbursement_amount}.<br/><small>O valor do troco é menor que {min_final_disbursement_amount_diff_percentage}% da soma do valor das parcelas do refinanciamento menos o valor soma das parcelas da portabilidade. O valor mínimo do troco permitido é de {min_final_disbursement_amount}. Valor calculado do troco: {final_disbursement_amount}.</small> |
| <a id="CT000119"></a>`CT000119` | 400 | **Bad Request**<br/>The credit agent: {document_number} is not authorized to issue a credit operation.<br/><small>O agente de crédito: {document_number} não está autorizado a emitir operação de crédito.</small> |
| <a id="CT000120"></a>`CT000120` | 400 | **Bad Request**<br/>Received portability update after closing time<br/><small>Atualização de Received portability após horário de fechamento</small> |
| <a id="CT000121"></a>`CT000121` | 400 | **Bad Request**<br/>Cannot port a contract originally issued by QI Tech.<br/><small>Não é possível portar um contrato originalmente emitido pela QI Tech.</small> |
| <a id="CT000122"></a>`CT000122` | 409 | **Conflict**<br/>The requester_control_key already exists.<br/><small>A requester_control_key já existe.</small> |
| <a id="CT000123"></a>`CT000123` | 400 | **Bad Request**<br/>Portability disbursement can not be greater than refinancing disbursement date.<br/><small>A data de desembolso da portabilidade não pode ser maior que a data de desembolso do refinanciamento.</small> |
| <a id="CT000124"></a>`CT000124` | 400 | **Bad Request**<br/>Natural person type related party can't have numbers in name and must contain at least one letter. Invalid name: {related_party_name}<br/><small>Parte relacionada do tipo pessoa física não pode possuir números no nome e deve conter pelo menos uma letra. Nome invalido: {related_party_name}</small> |
| <a id="CT000125"></a>`CT000125` | 400 | **Bad Request**<br/>The field Document Identification Date is invalid: {reason_en}<br/><small>O campo Data de expedição do documento de identidade é inválido: {reason_pt}</small> |
| <a id="CT000126"></a>`CT000126` | 400 | **Bad Request**<br/>The field Birth Date is invalid: {reason_en}<br/><small>O campo Data de Nascimento é inválido: {reason_pt}</small> |
| <a id="CT000127"></a>`CT000127` | 400 | **Bad Request**<br/>The field Foundation Date is invalid: {reason_en}<br/><small>O campo Data de Fundação é inválido: {reason_pt}</small> |
| <a id="CT000128"></a>`CT000128` | 400 | **Bad Request**<br/>The field company_document_number is invalid. Document: {document_number}<br/><small>O campo company_document_number está inválido. Documento: {document_number}</small> |
| <a id="CT000129"></a>`CT000129` | 400 | **Bad Request**<br/>The field individual_document_number is invalid. Document: {document_number}<br/><small>O campo individual_document_number está inválido. Documento: {document_number}</small> |
| <a id="CT000130"></a>`CT000130` | 400 | **Bad Request**<br/>Wrong date format. Received: {signature_datetime}, expected format: '2023-01-01'.<br/><small>Formato de data incorreto. Recebido: {signature_datetime}, formato esperado: '2023-01-01'.</small> |
| <a id="CT000131"></a>`CT000131` | 404 | **Not Found**<br/>Not found portability settlement key.<br/><small>Não foi encontrada uma baixa de portabilidade com essa chave.</small> |
| <a id="CT000131"></a>`CT000131` | 404 | **Bad Request**<br/>Portability credit operation is not opened.<br/><small>Operação de portabilidade não está aberta.</small> |
| <a id="CT000133"></a>`CT000133` | 400 | **Bad Request**<br/>Insurance premium QI is not allowed for social security collateral.<br/><small>Prêmio de seguro QI não é permitido para INSS.</small> |
| <a id="CT000134"></a>`CT000134` | 400 | **Bad Request**<br/>The number of overdue installments in the origin contract must be less than or equal to 1.<br/><small>O número de parcelas em atraso no contrato de origem deve ser menor ou igual a 1.</small> |
| <a id="CT000135"></a>`CT000135` | 400 | **Bad Request**<br/>Portability not allowed.<br/><small>Portabilidade não permitida.</small> |

### DOC — Documents

102 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="DOC000001"></a>`DOC000001` | 400 | **Payload Validation Error**<br/>{parse_error} |
| <a id="DOC000002"></a>`DOC000002` | 400 | **Certifier Type Error**<br/>Document from certifier {certifier_type} not supported<br/><small>Documento da certificadora {certifier_type} não suportado</small> |
| <a id="DOC000003"></a>`DOC000003` | 400 | **Bad Request**<br/>Missing document_key. Use GET /clicksign/{document_key}<br/><small>Falta document_key. Use GET /clicksign/{document_key}</small> |
| <a id="DOC000004"></a>`DOC000004` | 404 | **Document Not Found**<br/>Document not found with provided key: {document_key}<br/><small>Documento não encontrado para seguinte chave: {document_key}</small> |
| <a id="DOC000005"></a>`DOC000005` | 400 | **Bad Request**<br/>Use GET /document/{person_key} or /document/{person_key}/{document_key}<br/><small>Use GET /document/{person_key} ou /document/{person_key}/{document_key}</small> |
| <a id="DOC000006"></a>`DOC000006` | 400 | **Bad Request**<br/>Use POST /document |
| <a id="DOC000007"></a>`DOC000007` | 404 | **Not Found**<br/>Document batch not found for key {document_batch_key}<br/><small>Lote de documento não encontrado para a chave {document_batch_key}</small> |
| <a id="DOC000008"></a>`DOC000008` | 400 | **Bad Request**<br/>No body provided<br/><small>Body da request vazio.</small> |
| <a id="DOC000009"></a>`DOC000009` | 404 | **Not Found**<br/>Status not found<br/><small>Status não encontrado</small> |
| <a id="DOC000010"></a>`DOC000010` | 400 | **Bad Request**<br/>Use PUT /document/{person_key}/{document_key}/{status_name} or /document/{document_key}/{status_name}<br/><small>Use PUT /document/{person_key}/{document_key}/{status_name} ou /document/{document_key}/{status_name}</small> |
| <a id="DOC000011"></a>`DOC000011` | 400 | **Bad Request**<br/>Missing {action} parameter. Use one of the followings: send_to_signature. Please use PUT /document_batch/{document_batch_key}/{action}<br/><small>Falta o parâmetro {action}. Use o dos seguintes valores: send_to_signature. Por favor, use PUT /document_batch/{document_batch_key}/{action}</small> |
| <a id="DOC000012"></a>`DOC000012` | 400 | **Certifier Error**<br/>Certifier {document_batch_certifier} not supported for document batch<br/><small>Certificadora {document_batch_certifier} não disponível para esta ação</small> |
| <a id="DOC000013"></a>`DOC000013` | 400 | **Document Batch Error**<br/>Document batch {document_batch_key} has no documents inside<br/><small>Lote de documentos {document_batch_key} não possui documentos</small> |
| <a id="DOC000014"></a>`DOC000014` | 400 | **Document Batch Error**<br/>Document Batch has already been sent to signature<br/><small>Lote de documentos já foi enviado para assinatura</small> |
| <a id="DOC000015"></a>`DOC000015` | 400 | **Document Batch Error**<br/>Document Batch has already been sent to signature and signed<br/><small>Lote de documentos já foi enviado para assinatura e assinado</small> |
| <a id="DOC000016"></a>`DOC000016` | 400 | **Document Batch Error**<br/>Document Batch status is canceled and cannot be sent to signature<br/><small>Lote de documentos já foi cancelado e portanto não pode ser enviado para assinatura</small> |
| <a id="DOC000017"></a>`DOC000017` | 400 | **Document Batch Error**<br/>Document {document_key} inside document_batch has status {document_status}. Document status must be pending_document_batch when sending document_batch to signature<br/><small>Documento {document_key} dentro do lote de documentos tem status {document_status}. O status do documento deve ser pending_document_batch quando está tentando enviar o lote de documentos para assinatura</small> |
| <a id="DOC000018"></a>`DOC000018` | 400 | **Document Batch Error**<br/>Missing document_batch_key. Please use PUT /document_batch/{document_batch_key}/{action}<br/><small>Chave do lote de documentos faltando (document_batch_key). Por favor use Please use PUT /document_batch/{document_batch_key}/{action}</small> |
| <a id="DOC000019"></a>`DOC000019` | 404 | **Document Not Found**<br/>Document not found<br/><small>Documento não encontrado</small> |
| <a id="DOC000020"></a>`DOC000020` | 400 | **Document Draft Error**<br/>Document final file has already been uploaded<br/><small>Arquivo final do documento já foi enviado</small> |
| <a id="DOC000021"></a>`DOC000021` | 404 | **Template Not Found**<br/>Template not found<br/><small>Template não encontrado</small> |
| <a id="DOC000022"></a>`DOC000022` | 400 | **Document Draft Error**<br/>Document must be signable<br/><small>Documento deve ser assinável</small> |
| <a id="DOC000023"></a>`DOC000023` | 400 | **Bad Request**<br/>Use POST /draft/{document_key}/{template_key} |
| <a id="DOC000024"></a>`DOC000024` | 400 | **Bad Request**<br/>No template key found<br/><small>Chave do template não encontrada</small> |
| <a id="DOC000025"></a>`DOC000025` | 400 | **Bad Request**<br/>Use POST /resend_notification/{document_key} or /resend_notification with document_key_list<br/><small>Use POST /resend_notification/{document_key} ou /resend_notification com document_key_list</small> |
| <a id="DOC000026"></a>`DOC000026` | 404 | **Not Found**<br/>Could not find any of the following document(s) {document_key_list}<br/><small>Não foi possível encontrar nenhum dos documentos {document_key_list}</small> |
| <a id="DOC000027"></a>`DOC000027` | 400 | **Bad Request**<br/>Notification resend for {certifier} is not available.<br/><small>Reenvio de notificação não disponível para {certifier}.</small> |
| <a id="DOC000028"></a>`DOC000028` | 400 | **Bad Request**<br/>Use GET /signer_group/{signer_group_key} or /signer_group?signer_group_key_list=key,key, or /signer_group?owner_person_key={person_key}&referred_party_document_number_list=document_number,document_number, or /signer_group?expiration=AAAA-MM-DD<br/><small>Use GET /signer_group/{signer_group_key} ou /signer_group?signer_group_key_list=key,key, ou /signer_group?owner_person_key={person_key}&referred_party_document_number_list=document_number,document_number, ou /signer_group?expiration=AAAA-MM-DD</small> |
| <a id="DOC000029"></a>`DOC000029` | 400 | **Bad Request**<br/>Use GET /signer_group?owner_person_key={person_key}&referred_party_document_number_list= when using referred_party_document_number_list<br/><small>Use GET /signer_group?owner_person_key={person_key}&referred_party_document_number_list= para usar referred_party_document_number_list</small> |
| <a id="DOC000030"></a>`DOC000030` | 400 | **Bad Request**<br/>Can not use signer_group_key_list and referred_party_document_number_list together<br/><small>Não é possível usar signer_group_key_list e referred_party_document_number_list juntos</small> |
| <a id="DOC000031"></a>`DOC000031` | 400 | **Bad Request**<br/>URL malformed please use /signer_group?signer_group_key_list=key,key,<br/><small>URL errada, use /signer_group?signer_group_key_list=key,key,</small> |
| <a id="DOC000032"></a>`DOC000032` | 400 | **Bad Request**<br/>URL malformed please use /signer_group?referred_party_document_number_list=document_number,document_number,<br/><small>URL errada, use /signer_group?referred_party_document_number_list=document_number,document_number,</small> |
| <a id="DOC000033"></a>`DOC000033` | 404 | **Not Found**<br/>Signer Groups with filter not found<br/><small>Grupos de assinantes com filtro não encontrados</small> |
| <a id="DOC000034"></a>`DOC000034` | 404 | **Not Found**<br/>Signer Group with key {signer_group_key} not found<br/><small>Grupo de assinantes com chave {signer_group_key}</small> |
| <a id="DOC000035"></a>`DOC000035` | 404 | **Not Found**<br/>Signer Group with key {signer_group_key} not found<br/><small>Grupo de assinantes com chave {signer_group_key}</small> |
| <a id="DOC000036"></a>`DOC000036` | 403 | **Unauthorized**<br/>This agent can not create a public signer group.<br/><small>Este agente não pode criar um grupo de assinantes público</small> |
| <a id="DOC000037"></a>`DOC000037` | 400 | **Bad Request**<br/>Use Patch /signer_group/{signer_group_key} or /signer_group with signer_group_key_list in payload.<br/><small>Use Patch /signer_group/{signer_group_key} ou /signer_group com signer_group_key_list no payload.</small> |
| <a id="DOC000038"></a>`DOC000038` | 403 | **Unauthorized**<br/>Agent can not make this update.<br/><small>Agente não autorizado para este update.</small> |
| <a id="DOC000039"></a>`DOC000039` | 403 | **Unauthorized**<br/>This agent can not modified a public signer group.<br/><small>Este agente não pode alterar um grupo de assinantes publico.</small> |
| <a id="DOC000040"></a>`DOC000040` | 400 | **Bad Request**<br/>Signer Group with key {signer_group_key} is inactivated<br/><small>Grupo de assinantes com chave {signer_group_key} está inativo.</small> |
| <a id="DOC000041"></a>`DOC000041` | 400 | **Bad Request**<br/>Use Patch /signer_group_expired with expiration in payload.<br/><small>Use Patch /signer_group_expired com data de expiração no payload.</small> |
| <a id="DOC000042"></a>`DOC000042` | 400 | **Bad Request**<br/>Can not expire signer groups different from today<br/><small>Não é possível expirar grupos de assinantes com data diferente de hoje.</small> |
| <a id="DOC000043"></a>`DOC000043` | 400 | **Bad Request**<br/>Use GET /template/{template_key} or /template/ with a document_type as parameter or owner_person_key, referred_document_number, name and document_type<br/><small>Use GET /template/{template_key} ou /template/ com parâmetro document_type ou owner_person_key, referred_document_number, name e document_type</small> |
| <a id="DOC000044"></a>`DOC000044` | 404 | **Not Found**<br/>Template not found for the given parameters.<br/><small>Template não encontrado para os parâmetros fornecidos.</small> |
| <a id="DOC000045"></a>`DOC000045` | 400 | **Bad Request**<br/>Payload schema invalid<br/><small>Payload inválido</small> |
| <a id="DOC000046"></a>`DOC000046` | 400 | **Invalid Template**<br/>Template file must have .html extension.<br/><small>Arquivo do template deve ser .html</small> |
| <a id="DOC000047"></a>`DOC000047` | 400 | **Bad Request**<br/>Use PUT /upload/{document_key}/{template_key} |
| <a id="DOC000048"></a>`DOC000048` | 400 | **Bad Request**<br/>Please inform the order to append the file (first or last)<br/><small>Por favor informe a ordem que deseja anexar o arquivo (no início ou fim)</small> |
| <a id="DOC000049"></a>`DOC000049` | 400 | **Bad Request**<br/>Document is empty<br/><small>Documento vazio</small> |
| <a id="DOC000050"></a>`DOC000050` | 400 | **Bad Request**<br/>Request is not internal<br/><small>Request não é interna</small> |
| <a id="DOC000051"></a>`DOC000051` | 400 | **Bad Request**<br/>Use POST /webhook/{source}/{document_id} |
| <a id="DOC000052"></a>`DOC000052` | 400 | **Bad Request**<br/>Document with document_key {document_key} has a wrong document batch id {document_batch_id}<br/><small>document_batch_id {document_batch_id} errado para o documento com document_key {document_key}</small> |
| <a id="DOC000053"></a>`DOC000053` | 400 | **Bad Request**<br/>Invalid status.<br/><small>Status inválido.</small> |
| <a id="DOC000054"></a>`DOC000054` | 401 | **Invalid Header**<br/>Invalid header (content-hmac)<br/><small>Header inválido (content-hmac)</small> |
| <a id="DOC000055"></a>`DOC000055` | 401 | **Unauthorized**<br/>Event {event} received. Event unauthorized<br/><small>Evento {event} recebido mas não autorizado</small> |
| <a id="DOC000056"></a>`DOC000056` | 400 | **Bad Request**<br/>Event {event} received but cannot be processed<br/><small>Evento {event} recebido mas não processado</small> |
| <a id="DOC000057"></a>`DOC000057` | 422 | **Unprocessable Entity**<br/>Unable to retrieve 'ziped_file_url' ('document' -> 'downloads' -> 'ziped_file_url') from request<br/><small>Não foi possível encontrar 'ziped_file_url' ('document' -> 'downloads' -> 'ziped_file_url') na request</small> |
| <a id="DOC000058"></a>`DOC000058` | 400 | **Bad Request**<br/>Please provide document_type<br/><small>Favor fornecer o tipo do documento</small> |
| <a id="DOC000059"></a>`DOC000059` | 400 | **Bad Request**<br/>Use POST /edit_signer/{document_key} |
| <a id="DOC000060"></a>`DOC000060` | 404 | **Not Found**<br/>Could not find any of the following document {document_key}<br/><small>Não foi possível encontrar o documento {document_key}</small> |
| <a id="DOC000061"></a>`DOC000061` | 400 | **Bad Request**<br/>Edit signerfor {certifier} is not available.<br/><small>Edição de assinante não disponível para {certifier}.</small> |
| <a id="DOC000062"></a>`DOC000062` | 400 | **Bad Request**<br/>Could not upload file because it's empty.<br/><small>Não foi possível fazer o upload porque o arquivo está vazio.</small> |
| <a id="DOC000063"></a>`DOC000063` | 400 | **Bad Request**<br/>document_key or document_batch_key is required to auto sign events. Please send one of them inside request params<br/><small>document_key ou document_batch_key é obrigatória para auto assinar eventos. Por favor envie um deles dentro dos params da request.</small> |
| <a id="DOC000064"></a>`DOC000064` | 400 | **Bad Request**<br/>control_number is already in use {control_number}<br/><small>A chave control_number enviada já está em uso {control_number}</small> |
| <a id="DOC000065"></a>`DOC000065` | 400 | **Bad Request**<br/>Document was not informed<br/><small>Documento não foi informado</small> |
| <a id="DOC000066"></a>`DOC000066` | 400 | **Bad Request**<br/>Document name '{document_name}' already exist<br/><small>Nome do documento '{document_name}' já existe</small> |
| <a id="DOC000067"></a>`DOC000067` | 400 | **Bad Request**<br/>Pdf file not found<br/><small>Arquivo pdf não encontrado</small> |
| <a id="DOC000068"></a>`DOC000068` | 500 | **Internal Error**<br/>Concurrency error! File not found {file_name}<br/><small>Erro de concorrencia. Arquivo não encontrado {file_name}</small> |
| <a id="DOC000069"></a>`DOC000069` | 400 | **Bad Request**<br/>Missing phone number for the chosen signature method.<br/><small>Número de telefone não informado para o método de assinatura escolhido.</small> |
| <a id="DOC000070"></a>`DOC000070` | 400 | **Bad Request**<br/>The PDF file is truncated or broken.<br/><small>O arquivo PDF está truncado ou quebrado.</small> |
| <a id="DOC000071"></a>`DOC000071` | 400 | **Bad Request**<br/>Error on document check. This information should have exactly {digits} digits. Document: {document}<br/><small>Erro na validação do documento. Essa informação precisa ter exatamente {digits}. Document: {document}</small> |
| <a id="DOC000072"></a>`DOC000072` | 400 | **Bad Request**<br/>Error on email check. Email format invalid Email: {email}<br/><small>Erro na Verificação do e-mail. Formato invalido: {email}</small> |
| <a id="DOC000073"></a>`DOC000073` | 400 | **Bad Request**<br/>The provided role ({role}) is not one of the valid one`s: {allowed_roles}<br/><small>A provided role ({role}) não é uma das validas: {allowed_roles}</small> |
| <a id="DOC000074"></a>`DOC000074` | 400 | **Bad Request**<br/>A click_sign_file_path must be provided.<br/><small>Um click_sign_file_path deve ser informado.</small> |
| <a id="DOC000075"></a>`DOC000075` | 400 | **Bad Request**<br/>At least the email, phone_number or is_api parameters should be provided.<br/><small>Pelo menos os parâmetros email, phone_number ou is_api devem ser informados.</small> |
| <a id="DOC000076"></a>`DOC000076` | 400 | **Bad Request**<br/>Signature method registered on signatory does not match any of email or sms.<br/><small>O método de assinatura registrado no signatário não corresponde a nenhum email or sms.</small> |
| <a id="DOC000077"></a>`DOC000077` | 400 | **Bad Request**<br/>PDF file can't have a password.<br/><small>O arquivo PDF não pode conter senha.</small> |
| <a id="DOC000078"></a>`DOC000078` | 400 | **Bad Request**<br/>File not found<br/><small>Arquivo não encontrado</small> |
| <a id="DOC000079"></a>`DOC000079` | 400 | **Invalid Template**<br/>Template syntax error. Line:{line} Error:{error_msg}<br/><small>Erro de escrita no template. Linha:{line} Erro:{error_msg}</small> |
| <a id="DOC000080"></a>`DOC000080` | 400 | **Invalid Template**<br/>Template error. Error:{error_msg}<br/><small>Erro no template. Erro:{error_msg}</small> |
| <a id="DOC000081"></a>`DOC000081` | 400 | **Invalid document type**<br/>{document_type} is not a valid document type.<br/><small>{document_type} não é um tipo de documento valido.</small> |
| <a id="DOC000082"></a>`DOC000082` | 400 | **Bad Request**<br/>Signature webhook payload should not be null.<br/><small>Payload de webhook de assinatura não pode ser nulo.</small> |
| <a id="DOC000083"></a>`DOC000083` | 400 | **Invalid signature key**<br/>Invalid QiSign signature key.<br/><small>Chave de assinatura da QiSign invalida..</small> |
| <a id="DOC000084"></a>`DOC000084` | 400 | **Invalid webhook status**<br/>Invalid status received in QiSign webhook.<br/><small>Status invalido no webhook da QISign recebido.</small> |
| <a id="DOC000085"></a>`DOC000085` | 400 | **Signed document not found**<br/>Signed document not found in QiSign.<br/><small>Documento assinado não encontrado na QiSign.</small> |
| <a id="DOC000086"></a>`DOC000086` | 400 | **Bad Request**<br/>It is necessary to send the signed pdf<br/><small>É necessário enviar o pdf assinado</small> |
| <a id="DOC000087"></a>`DOC000087` | 400 | **Bad Request**<br/>Could not render PDF. HTML may be malformed.<br/><small>Não foi possível renderizar o PDF. O HTML pode estar inválido.</small> |
| <a id="DOC000088"></a>`DOC000088` | 400 | **Bad Request**<br/>Only file with pdf content type can be sent.<br/><small>Somente arquivos com conteúdo do tipo pdf podem ser enviados.</small> |
| <a id="DOC000089"></a>`DOC000089` | 400 | **Bad Request**<br/>Document number invalid. Not possible to send the document to the clicksign .<br/><small>Número de documento inválido. Não foi possível enviar o documento para o clicksign.</small> |
| <a id="DOC000090"></a>`DOC000090` | 400 | **Bad Request**<br/>Error while sending document to the clicksing.<br/><small>Erro durante o envio do documento para o clicksing.</small> |
| <a id="DOC000091"></a>`DOC000091` | 400 | **Bad Request**<br/>Document requester must have a configuration to use this certifier. Please contact support.<br/><small>O solicitante do documento precisa ter uma configuração para usar esta certificadora. Por favor, entre em contato com o suporte.</small> |
| <a id="DOC000092"></a>`DOC000092` | 400 | **Bad Request**<br/>Invalid Status to process document ({document_key}) in {subscriber_name} subscriber. Actual status: {document_status}.<br/><small>Status invalido para processar documento ({document_key}) no subscriber {subscriber_name}. Status atual {document_status}.</small> |
| <a id="DOC000093"></a>`DOC000093` | 400 | **Bad Request**<br/>Signed document and original document must be different files.<br/><small>O documento assinado e o documento original devem ser arquivos diferentes.</small> |
| <a id="DOC000094"></a>`DOC000094` | 400 | **Bad Request**<br/>Certifier configuration not found.<br/><small>Configuração da certificadora não encontrada.</small> |
| <a id="DOC000095"></a>`DOC000095` | 400 | **Bad Request**<br/>Signer already exists for informed document number.<br/><small>Assinante ja existe para o número de documento informado.</small> |
| <a id="DOC000096"></a>`DOC000096` | 400 | **Bad Request**<br/>Signer not found for informed document number.<br/><small>Assinantenão encontrado para o número de documento informado.</small> |
| <a id="DOC000097"></a>`DOC000097` | 412 | **Document Batch Error**<br/>Documents inside document_batch has differents owners, signers or certifiers.<br/><small>Documentos dentro do Lote de Documentos possuem donos, assinantes ou certificadoras distintas.</small> |
| <a id="DOC000098"></a>`DOC000098` | 400 | **Bad Request**<br/>Cannot acess external URL to download signed PDF.<br/><small>Não foi possível acessar URL externa para baixar o PDF assinado.</small> |
| <a id="DOC000099"></a>`DOC000099` | 400 | **Bad Request**<br/>URL or Template Key must be provided for upload.<br/><small>URL ou Chave do Template deve ser enviado para o upload.</small> |
| <a id="DOC000100"></a>`DOC000100` | 400 | **Bad Request**<br/>File too large. Maximum file size: {max_size} bytes. Uploaded file size: {file_size} bytes<br/><small>Arquivo muito grande. Tamanho máximo do arquivo: {max_size} bytes. Tamanho do arquivo: {file_size} bytes.</small> |
| <a id="DOC000101"></a>`DOC000101` | 400 | **Bad Request**<br/>Documents inside document_batch has different signers.<br/><small>Documentos dentro do lote de documentos possuem assinantes distintos.</small> |
| <a id="DOC000102"></a>`DOC000102` | 400 | **Bad Request**<br/>Owner not found.<br/><small>Dono não encontrado.</small> |

### FGTS — FGTS

42 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="FGTS00003"></a>`FGTS00003` | 404 | **Not Found**<br/>The given reservation_request_key {key} could not be found.<br/><small>A chave reservation_request_key {key} não pode ser encontrada.</small> |
| <a id="FGTS00004"></a>`FGTS00004` | 404 | **Not Found**<br/>The given external_key {key} could not be found.<br/><small>A chave external_key {key} não pode ser encontrada.</small> |
| <a id="FGTS00005"></a>`FGTS00005` | 400 | **Bad Request**<br/>Credit Operation status<br/><small>Status</small> |
| <a id="FGTS00007"></a>`FGTS00007` | 504 | **Gateway Time-out**<br/>The server did not respond in time<br/><small>O servidor não respondeu a tempo</small> |
| <a id="FGTS00008"></a>`FGTS00008` | 400 | **Bad Request**<br/>Caixa server did not respond in time. Try again in a few seconds.<br/><small>Os servidores da Caixa não responderam no tempo determinado. Tente novamente em alguns</small> |
| <a id="FGTS00009"></a>`FGTS00009` | 400 | **Bad Request**<br/>Caixa server did not respond with a valid token. Try again in a few seconds.<br/><small>Os servidores da Caixa não responderam com um token válido. Tente novamente em alguns</small> |
| <a id="FGTS00010"></a>`FGTS00010` | 400 | **Bad Request**<br/>Caixa server returned an error.<br/><small>Os servidores da Caixa retornaram um erro.</small> |
| <a id="FGTS00011"></a>`FGTS00011` | 500 | **Internal Error**<br/>Cache server returned an error.<br/><small>Os servidores da cache retornaram um erro.</small> |
| <a id="FGTS00012"></a>`FGTS00012` | 400 | **Bad Request**<br/>Reservation is already closed.<br/><small>Reserva já está desaverbada.</small> |
| <a id="FGTS00014"></a>`FGTS00014` | 429 | **Too Many Requests**<br/>Rate limit for document {document_number} exceeded the max of {limit_per_hour} failed requests per 15 minutes. Retry at UTC {retry_at}<br/><small>Taxa limite para o documento {document_number} excedeu o máximo de {limit_per_hour} requisições com erro em 15 minutos. Retentar às {retry_at} UTC.</small> |
| <a id="FGTS00017"></a>`FGTS00017` | 401 | **Unauthorized**<br/>Action not allowed for role: {role}<br/><small>Ação não permitida para cargo: {role}</small> |
| <a id="FGTS00020"></a>`FGTS00020` | 400 | **Bad Request**<br/> |
| <a id="FGTS00022"></a>`FGTS00022` | 400 | **Bad Request**<br/>Reservation status<br/><small>Reserva com status</small> |
| <a id="FGTS00023"></a>`FGTS00023` | 400 | **Bad Request**<br/>Reservation already in closure process. Key: {reservation_request_key}<br/><small>Reserva já em processo de desaverbação</small> |
| <a id="FGTS00024"></a>`FGTS00024` | 404 | **Not Found**<br/>The period could not be found<br/><small>O periodo nao pôde ser encontrado</small> |
| <a id="FGTS00025"></a>`FGTS00025` | 409 | **Reservation Status Conflict**<br/>A reservation {reservation_key} with status {old_status} cannot be updated to {new_status}<br/><small>Essa reserva não permite essa atualização de estados</small> |
| <a id="FGTS00026"></a>`FGTS00026` | 409 | **Reservation Status Conflict**<br/>Reservation with status<br/><small>Reservas no status</small> |
| <a id="FGTS00027"></a>`FGTS00027` | 404 | **Not Found**<br/>The given available_balance {key} could not be found.<br/><small>A solitação de saldo {key} não pode ser encontrada.</small> |
| <a id="FGTS00028"></a>`FGTS00028` | 500 | **Periods Status Are Not all Equal**<br/>Reservation with key: {key}, have periods with different status.<br/><small>Reserva com a chave: {key}, possui periodos com status diferentes</small> |
| <a id="FGTS00029"></a>`FGTS00029` | 500 | **Unexpected Period Status**<br/>Reservation with key: {key}, have periods in unexpected status.<br/><small>Reserva com a chave: {key}, possui periodos com estatus inesperados.</small> |
| <a id="FGTS00030"></a>`FGTS00030` | 500 | **Invalid Next Period**<br/>Reservation with key: {key}, has a paid period that isn<br/><small>Reserva com a chave: {key}, possui um periodo pago que não é o próximo período válido: {original_due_date}.</small> |
| <a id="FGTS00031"></a>`FGTS00031` | 400 | **Access Token Too Many Retries**<br/>Tried to get a new access token too many times while waiting a cache token<br/><small>Tentou obter um novo token de acesso muitas vezes enquanto esperava um token de cache</small> |
| <a id="FGTS00032"></a>`FGTS00032` | 404 | **Protocol Not Found**<br/>The protocol could not be found.<br/><small>O protocolo não pôde ser encontrado.</small> |
| <a id="FGTS00033"></a>`FGTS00033` | 503 | **Unavailable service**<br/>The CEF service is currently unavailable. Please, try again later<br/><small>O serviço da CEF se encontra indisponível no momento. Por favor, tente novamente mais tarde</small> |
| <a id="FGTS00034"></a>`FGTS00034` | 404 | **Available Balance To Requester Not Found**<br/>Available Balance does not belong to the requester {requester_key}.<br/><small>A consulta de saldo não pertence ao solicitante {requester_key}.</small> |
| <a id="FGTS00035"></a>`FGTS00035` | 409 | **Available Balance Status Conflict**<br/>Balance inquiry with completed process cannot have its status changed<br/><small>Consulta de saldo com processo concluído não pode ter seu status alterado</small> |
| <a id="FGTS00036"></a>`FGTS00036` | 429 | **Rate Limit Exceeded**<br/>Number of requisitions exceeded the CEF rate limit<br/><small>O número de requisições excedeu o limite da CEF</small> |
| <a id="FGTS00037"></a>`FGTS00037` | 400 | **Path Param Is Incorrect**<br/>The required path param must be<br/><small>O parâmetro de rota exigido precisa ser</small> |
| <a id="FGTS00038"></a>`FGTS00038` | 400 | **Payload Is Incorrect**<br/>A payload must be sent and cannot be empty<br/><small>Um payload deve ser enviado e ele não pode ser vazio</small> |
| <a id="FGTS00039"></a>`FGTS00039` | 408 | **The process exceeded the tolerance time**<br/>The process exceeded the tolerance time. Try again<br/><small>O processo excedeu o tempo de tolerância. Tente novamente</small> |
| <a id="FGTS00040"></a>`FGTS00040` | 404 | {queue_name} queue doesn<br/><small>A fila {queue_name} não existe. Verifique se o nome da fila está correto.</small> |
| <a id="FGTS00041"></a>`FGTS00041` | 409 | A queue with<br/><small>Já existe uma fila com o nome</small> |
| <a id="FGTS00042"></a>`FGTS00042` | 404 | The requester {requester_key} doesn<br/><small>O cliente {requester_key} não existe. Verifique se a chave do cliente está correta.</small> |
| <a id="FGTS00043"></a>`FGTS00043` | 400 | The requester<br/><small>O cliente</small> |
| <a id="FGTS00044"></a>`FGTS00044` | 403 | **Request not allowed at the moment**<br/>This request is not allowed at the moment. Please try again between the 20th and 5th of the month, during the hours of 22:00 (10 PM) to 07:00 (7 AM).<br/><small>Esta solicitação não é permitida no momento. Por favor, tente novamente entre os dias 20 e 5 do mês, durante o horário das 22:00 (10 PM) às 07:00 (7 AM).</small> |
| <a id="FGTS00045"></a>`FGTS00045` | 409 | **Period Status Conflict**<br/>The period<br/><small>O período</small> |
| <a id="FGTS00046"></a>`FGTS00046` | 409 | **Period Status Conflict**<br/>The period<br/><small>O período</small> |
| <a id="FGTS00047"></a>`FGTS00047` | 404 | **The reservation is not in status**<br/>The reservation is not in status<br/><small>A reserva não está no status</small> |
| <a id="FGTS00048"></a>`FGTS00048` | 409 | **Period Status Conflict**<br/>The period<br/><small>O período</small> |
| <a id="FGTS00049"></a>`FGTS00049` | 409 | **Reservation Already Locked**<br/>The reservation<br/><small>A reserva</small> |
| <a id="FGTS00401"></a>`FGTS00401` | 401 | **Unauthenticated User**<br/>You need to be authenticated to send this request.<br/><small>Você precisa estar autenticado para realizar essa requisição.</small> |
| <a id="FGTS00403"></a>`FGTS00403` | 404 | **Invalid Document Number Format**<br/>The given document number {document_number} is invalid or malformed. Use only digits.<br/><small>O número de documento {document_number} é inválido ou está mal formatado. Use apenas dígitos.</small> |

### FPL — Federal Payroll

23 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="FPL000001"></a>`FPL000001` | 400 | **Bad Request**<br/>Given {document_number} document number is invalid.<br/><small>CPF {document_number} fornecido não é valido.</small> |
| <a id="FPL000002"></a>`FPL000002` | 400 | **Bad Request**<br/>Given reservation_period: {reservation_period}, must be greater than 0 and equal to the number of periods.<br/><small>O período da reserva deve ser maior que 0 e igual ao valor de períodos.</small> |
| <a id="FPL000003"></a>`FPL000003` | 400 | **Bad Request**<br/>All periods must have the amount equal to reservation amount: {reservation_amount}.<br/><small>Todos os períodos da reserva devem possuir valor igual ao valor reservado: {reservation_amount}</small> |
| <a id="FPL000004"></a>`FPL000004` | 400 | **Bad Request**<br/>Periods due date must be grater than today.<br/><small>Os períodos devem possuir data superior a hoje.</small> |
| <a id="FPL000006"></a>`FPL000006` | 400 | **Bad Request**<br/>Amount disbursed {disbursed_amount} cannot be greater than the sum of the {amount_payable} installments<br/><small>Montante desenbolsado {disbursed_amount} não pode ser maior que a soma das parcelas {amount_payable}</small> |
| <a id="FPL000007"></a>`FPL000007` | 400 | **Bad Request**<br/>Periods due date must occur in sub sequent months.<br/><small>Os períodos devem possuir datas em meses subsequentes.</small> |
| <a id="FPL000008"></a>`FPL000008` | 409 | **Reservation Status Conflict**<br/>Reservation with status<br/><small>Reservas no status</small> |
| <a id="FPL000009"></a>`FPL000009` | 400 | **Refinancing contract cannot be reverted**<br/>Refinancing contract cannot be reverted after 7 working days from reservation.<br/><small>Contrato de refinanciamento não pode ser revertido após 7 dias úteis da reserva.</small> |
| <a id="FPL000010"></a>`FPL000010` | 500 | **Product doesn**<br/>The requested product doesn<br/><small>O produto requerido não existe.</small> |
| <a id="FPL000012"></a>`FPL000012` | 404 | **Balance not Found**<br/>Balance with key {balance_key} was not found.<br/><small>A consulta de saldo com chave {balance_key} não foi encontrada.</small> |
| <a id="FPL000013"></a>`FPL000013` | 404 | **Reservation not Found**<br/>Reservation with key {reservation_key} was not found.<br/><small>A reserva com chave {reservation_key} não foi encontrada.</small> |
| <a id="FPL000014"></a>`FPL000014` | 404 | **External key not Found**<br/>Reservation with external key {external_key} was not found.<br/><small>A reserva com chave externa {external_key} não foi encontrada.</small> |
| <a id="FPL000015"></a>`FPL000015` | 409 |  |
| <a id="FPL000016"></a>`FPL000016` | 404 | **Contract not Found**<br/>Contract {contract_number} not found<br/><small>Contrato {contract_number} não encontrado</small> |
| <a id="FPL000018"></a>`FPL000018` | 404 | **Disbursemente Option not Found**<br/>Disbursemente option for {disbursement_date} was not found.<br/><small>Opção de desembolso para {disbursement_date} não foi encontrada.</small> |
| <a id="FPL000019"></a>`FPL000019` | - | Cache server returned an error.<br/><small>Os servidores da cache retornaram um erro.</small> |
| <a id="FPL000020"></a>`FPL000020` | 409 | **Conflict**<br/>Balance Request with status {status} cannot be retried.<br/><small>Consulta de margem com status {status} não pode ser retentado.</small> |
| <a id="FPL000021"></a>`FPL000021` | 400 | **Reservation status not permitted on refinancing**<br/>Reservation with external_key: {external_key} is on status {status} which is not permitted for refinancing.<br/><small>Reserva com a chave externa: {external_key}  está no status {status} que não é permitido para refinanciamento.</small> |
| <a id="FPL000022"></a>`FPL000022` | 404 | **Protocol not Found**<br/>Protocol with key {external_key} was not found.<br/><small>Protocolo com chave {external_key} não foi encontrada.</small> |
| <a id="FPL000023"></a>`FPL000023` | 400 | **Ivanlid protocol type**<br/>Protocol type {protocol_type} doesn<br/><small>Protocolo do tipo {protocol_type} não existe.</small> |
| <a id="FPL000024"></a>`FPL000024` | 400 | **Invalid Balance**<br/>Balance with status {balance_status} can<br/><small>A consulta de saldo com status {balance_status} não pode ser processada.</small> |
| <a id="FPL000025"></a>`FPL000025` | 500 | **Incorrect Refinanced Reservation.**<br/>The number of refinanced reservation is incorrect.<br/><small>O número de reservas refinanciadas está incorreto.</small> |
| <a id="FPL000026"></a>`FPL000026` | 400 | **Incorrect Reservation Status.**<br/>The reservation {reservation_key} is in an incorrect status for this flow - status: {status_enumerator}.<br/><small>A reserva {reservation_key} está em um status incorreto para este fluxo -  status: {status_enumerator}.</small> |

### GDF — Platform

28 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="GDF000001"></a>`GDF000001` | 403 | **Permission Validation Error**<br/>Only master user's are allowed<br/><small>Somente usuários master são permitidos</small> |
| <a id="GDF000002"></a>`GDF000002` | 403 | **Permission Validation Error**<br/>A SELECTED-AGENT must be provided<br/><small>Um SELECTED-AGENT deve ser fornecido</small> |
| <a id="GDF000003"></a>`GDF000003` | 400 | **Bad Request**<br/>No API Client Key received<br/><small>Nenhuma chave de API do cliente recebida</small> |
| <a id="GDF000004"></a>`GDF000004` | 400 | **Bad Request**<br/>Empty body received<br/><small>Corpo da request vazio</small> |
| <a id="GDF000005"></a>`GDF000005` | 400 | **Bad Request**<br/>API Client already created for this person_key<br/><small>Cliente da API já criado para esta person_key</small> |
| <a id="GDF000006"></a>`GDF000006` | 400 | **Bad Request**<br/>Duplicated allowed_endpoint provided<br/><small>allowed_endpoint duplicado</small> |
| <a id="GDF000007"></a>`GDF000007` | 404 | **Not Found**<br/>No ClientIntegration found for client_integration_key: {client_integration_key} .<br/><small>Nenhuma ClientIntegration encontrada para client_integration_key: {client_integration_key}.</small> |
| <a id="GDF000008"></a>`GDF000008` | 400 | **Bad Request**<br/>A client_integration_key must be provided<br/><small>Uma client_integration_key deve ser fornecida</small> |
| <a id="GDF000009"></a>`GDF000009` | 400 | **Bad Request**<br/>A action must be provided<br/><small>Uma ação deve ser fornecida</small> |
| <a id="GDF000010"></a>`GDF000010` | 400 | **Bad Request**<br/>Action doesnt exist ({action_name}).<br/><small>Ação não existe ({action_name}).</small> |
| <a id="GDF000011"></a>`GDF000011` | 404 | **Not Found**<br/>No ClientIntegration found for client_integration_key / allowed_endpoint_key: {client_integration_key} / {allowed_endpoint_key}.<br/><small>Nenhuma ClientIntegration encontrada para client_integration_key / allowed_endpoint_key: {client_integration_key} / {allowed_endpoint_key}.</small> |
| <a id="GDF000012"></a>`GDF000012` | 404 | **Not Found**<br/>No AllowedEndpoint found for client_integration_key / allowed_endpoint_key: {client_integration_key} / {allowed_endpoint_key}.<br/><small>Nenhuma AllowedEndpoint encontrada para client_integration_key / allowed_endpoint_key: {client_integration_key} / {allowed_endpoint_key}.</small> |
| <a id="GDF000013"></a>`GDF000013` | 400 | **Bad Request**<br/>A allowed_endpoint_key must be provided<br/><small>Uma chave allowed_endpoint_key deve ser fornecida</small> |
| <a id="GDF000014"></a>`GDF000014` | 401 | **QI Unauthenticated**<br/>Please provide valid credentials as part of the request. (Documentation: https://docs.qitech.com.br) Details: {details}<br/><small>Por favor forneça credenciais válidas como parte da request. (Documentação: https://docs.qitech.com.br) Detalhes: {details_br}</small> |
| <a id="GDF000015"></a>`GDF000015` | 400 | **Bad Request**<br/>Please provide a valid client_public_key<br/><small>Por favor forneça uma chave pública válida</small> |
| <a id="GDF000016"></a>`GDF000016` | 400 | **Bad Request**<br/>Error while decoding request's JSON body. Please verify if body is valid. Details: {json_ex}<br/><small>Erro ao decodificar o JSON do corpo da requisição. Por favor verifique se o corpo é válido. Detalhes: {json_ex}</small> |
| <a id="GDF000017"></a>`GDF000017` | 400 | **Bad Request**<br/>Invalid Value ({info}).<br/><small>Valor inválido ({info}).</small> |
| <a id="GDF000018"></a>`GDF000018` | 404 | **Not Found**<br/>No ClientIntegration found for api_client_key: {api_client_key}.<br/><small>Nenhuma ClientIntegration encontrada para api_client_key: {api_client_key}.</small> |
| <a id="GDF000019"></a>`GDF000019` | 400 | **Bad Request**<br/>Informed request_type: '{request_type}' has not been mapped yet.<br/><small>Mapeamento ainda inexistente para request_type: '{request_type}'.</small> |
| <a id="GDF000020"></a>`GDF000020` | 500 | **Internal Error**<br/>Account Key can't be null when including pix key.<br/><small>Account Key não pode ser nulo quando solicitar uma inclusão de chave.</small> |
| <a id="GDF000021"></a>`GDF000021` | 500 | **Internal Error**<br/>Failed to request SCR authorization.<br/><small>Falha na requisição para autorização de SCR.</small> |
| <a id="GDF000022"></a>`GDF000022` | 400 | **Bad Request**<br/>Informed request_type: '{request_type}' has not been mapped yet.<br/><small>Mapeamento ainda inexistente para request_type: '{request_type}'.</small> |
| <a id="GDF000023"></a>`GDF000023` | 401 | **Unauthorized**<br/>Error na verificação SSL<br/><small>SSL validation error</small> |
| <a id="GDF000024"></a>`GDF000024` | 400 | **Bad Request**<br/>Error no endpoint de webhook do cliente<br/><small>Error at client webhook endpoint</small> |
| <a id="GDF000025"></a>`GDF000025` | 403 | **Permission Validation Error**<br/>Only sandbox and dev environment are allowed to request Mock API<br/><small>Somente os ambientes de desenvolvimento e de sandbox são permitidos para realizar requisições na Mock API.</small> |
| <a id="GDF000026"></a>`GDF000026` | 400 | **Bad Request**<br/>Signature method version not allowed<br/><small>Versão do método de assinatura não permitida</small> |
| <a id="GDF000027"></a>`GDF000027` | 404 | **Not Found**<br/>No ClientIntegration found for person_key: {person_key}.<br/><small>Nenhuma ClientIntegration encontrada para a person_key: {person_key}.</small> |
| <a id="GDF000028"></a>`GDF000028` | 404 | **Not Found**<br/>The request needs a body, even an empty one like: '{}'.<br/><small>A requisição precisa de um body, mesmo que um vazio como: '{}'.</small> |

### LEG — Lego

155 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="LEG000001"></a>`LEG000001` | 400 | **Bad Request**<br/>Use POST /configuration |
| <a id="LEG000002"></a>`LEG000002` | 400 | **Bad Request**<br/>Request is not internal<br/><small>Request não é interna</small> |
| <a id="LEG000003"></a>`LEG000003` | 400 | **Configuration Error**<br/>A configuration already exists for the person: {person_key} on the endpoint: {endpoint}. To change a configuration use PUT /configuration<br/><small>Já existe uma configuração para a pessoa: {person_key} no endpoint: {endpoint}. Para alterar uma configuração, use PUT /configuration</small> |
| <a id="LEG000004"></a>`LEG000004` | 400 | **Bad Request**<br/>No selected-agent provided<br/><small>Nenhum selected-agent fornecido</small> |
| <a id="LEG000005"></a>`LEG000005` | 400 | **Configuration Error**<br/>No configuration found for the person: {person_key} on the endpoint: {endpoint}. To register a new one, use POST /configuration<br/><small>Nenhuma configuração encontrada para a pessoa: {person_key} no endpoint: {endpoint}. Para registrar uma nova, use POST / configuration</small> |
| <a id="LEG0000057"></a>`LEG0000057` | 400 | **Bad Request**<br/>Received operation_key already registered for another operation. Please send a new one.<br/><small>A operation_key recebida já está registrada para outra operação. Por favor, envie uma key não utilizada.</small> |
| <a id="LEG000006"></a>`LEG000006` | 400 | **Configuration Error**<br/>Multiple configurations found for the person: {person_key} on the endpoint: {endpoint}. Please contact the system administrator.<br/><small>Multiplas configurações encontradas para a pessoa: {person_key} no endpoint: {endpoint}. Por favor entre em contato com o administrador</small> |
| <a id="LEG000007"></a>`LEG000007` | 400 | **Configuration Error**<br/>No configuration key provided.<br/><small>Chave da configuração não fornecida.</small> |
| <a id="LEG000008"></a>`LEG000008` | 404 | **Configuration Error**<br/>No configuration found for the configuration_key: {configuration_key}<br/><small>Nenhuma configuração encontrada para a configuration_key: {configuration_key}.</small> |
| <a id="LEG000009"></a>`LEG000009` | 404 | **Configuration Error**<br/>No configuration found for person: {person_key}<br/><small>Nenhuma configuração encontrada para a pessoa: {person_key}.</small> |
| <a id="LEG000010"></a>`LEG000010` | 400 | **Bad Request**<br/>Action is null<br/><small>A ação é nula</small> |
| <a id="LEG0000100"></a>`LEG0000100` | 400 | **Bad Request**<br/>Failed to check contract in dataprev. Please try again.<br/><small>Falha ao validar contrato na dataprev, tente novamente.</small> |
| <a id="LEG0000101"></a>`LEG0000101` | 400 | **Bad Request**<br/>Invalid status response for checking account request. Status sent {account_status}.<br/><small>Status inválido para solicão de abertura de conta. Status enviado {account_status}.</small> |
| <a id="LEG0000102"></a>`LEG0000102` | 400 | **Bad Request**<br/>Invalid pix_key. Pix key sent {pix_key}. Please contact support<br/><small>Chave pix inválida. Chave enviada {pix_key}. Por favor entre em contato.</small> |
| <a id="LEG0000103"></a>`LEG0000103` | 400 | **Bad Request**<br/>Invalid pix_key email lenght. Pix key sent {pix_key}. Email must not exceed 72 chars.<br/><small>Chave pix inválida comprimento do email. Chave enviada {pix_key}. Email não deve ultrapassar 72 caracteres.</small> |
| <a id="LEG0000104"></a>`LEG0000104` | 400 | **Bad Request**<br/>Invalid pix_key email type. Pix key sent {pix_key}. Email must not contains white space.<br/><small>Chave pix inválida email. Chave enviada {pix_key}. Email não deve conter espaços.</small> |
| <a id="LEG0000105"></a>`LEG0000105` | 400 | **Bad Request**<br/>Invalid pix_key email type. Pix key sent {pix_key}. Email must only contains lower chars .<br/><small>Chave pix inválida email. Chave enviada {pix_key}. Email deve conter apenas caracteres minúsculos.</small> |
| <a id="LEG0000106"></a>`LEG0000106` | 400 | **Bad Request**<br/>Invalid pix_key. Pix key sent {pix_key}. Phone must been in internacional format<br/><small>Chave pix inválida. Chave enviada {pix_key}. Telefone deve ser no formato internacional</small> |
| <a id="LEG0000107"></a>`LEG0000107` | 400 | **Bad Request**<br/>Invalid pix_key. Pix key sent {pix_key}. Documents must not contains special chars.<br/><small>Chave pix inválida. Chave enviada {pix_key}. Documentos não devem conter caracteres especiais.</small> |
| <a id="LEG0000108"></a>`LEG0000108` | 400 | **Bad Request**<br/>Invalid pix_key. Pix key sent {pix_key}. Documents must be valid.<br/><small>Chave pix inválida. Chave enviada {pix_key}. Documentos devem ser válidos.</small> |
| <a id="LEG0000109"></a>`LEG0000109` | 400 | **Bad Request**<br/>Invalid pix_key. Pix key sent {pix_key}. Random key must be a valid uuid4<br/><small>Chave pix inválida. Chave enviada {pix_key}. Chave aletória deve ser um uuid4 válido.</small> |
| <a id="LEG000011"></a>`LEG000011` | 400 | **Bad Request**<br/>Invalid action<br/><small>Ação inválida</small> |
| <a id="LEG0000110"></a>`LEG0000110` | 400 | **Bad Request**<br/>Operation canceled cannot be signed.<br/><small>Operação cancelada não pode ser assinada.</small> |
| <a id="LEG0000111"></a>`LEG0000111` | 400 | **Bad Request**<br/>Field 'type' cannot be null and must contain one of the values ('data-signature', 'pdf-signature')<br/><small>O campo 'type' não pode ser nulo e deve conter um dos valores ('data-signature', 'pdf-signature')</small> |
| <a id="LEG0000112"></a>`LEG0000112` | 400 | **Bad Request**<br/>Invalid url {url}<br/><small>Url enviada não é válida {url}</small> |
| <a id="LEG0000113"></a>`LEG0000113` | 400 | **Bad Request**<br/>Invalid code number. Value financial institution code: {financial_institution_code} does not exist.<br/><small>Número Compe inválido. Valor de número compe: {financial_institution_code} não existe.</small> |
| <a id="LEG0000114"></a>`LEG0000114` | 400 | **Bad Request**<br/>Found installments with total amount below the minimum of R$ 1,00<br/><small>Foram encontradas parcelas com valor total menor que o mínimo de R$ 1,00.</small> |
| <a id="LEG0000115"></a>`LEG0000115` | 400 | **Bad Request**<br/>It is necessary to inform at least one installment<br/><small>É necessário informar no mínimo uma parcela</small> |
| <a id="LEG0000116"></a>`LEG0000116` | 400 | **Bad Request**<br/>Reserve confirmation is not possibile in current operation step.<br/><small>A operação atual não permite confirmação da reserva.</small> |
| <a id="LEG0000117"></a>`LEG0000117` | 400 | **Bad Request**<br/>Signature is not possibile in current operation step.<br/><small>A operação atual não permite assinatura.</small> |
| <a id="LEG0000118"></a>`LEG0000118` | 400 | **Bad Request**<br/>Ignoring event because is not in allowed status.<br/><small>Ignorando evento por quê não está nos status permitidos.</small> |
| <a id="LEG0000119"></a>`LEG0000119` | 400 | **Bad Request**<br/>Operation cannot be disbursed before it is signed.<br/><small>A operação não pode ser desembolsada antes de ser assinada</small> |
| <a id="LEG000012"></a>`LEG000012` | 400 | **Bad Request**<br/>Missing simulation debt key<br/><small>Falta chave da simulação de dívida</small> |
| <a id="LEG0000120"></a>`LEG0000120` | 400 | **Bad Request**<br/>Brick flow step is 'dataprev_reservation_check', but received webhook is 'opened'.<br/><small>O brick está em 'dataprev_reservation_check', mas o webhook recebido é de desembolso.</small> |
| <a id="LEG0000121"></a>`LEG0000121` | 400 | **Bad Request**<br/>Operation that is not canceled cannot process cancel permanently webhook.<br/><small>Operações que não estão canceladas não podem processar o webhook de cancelamento permanente.</small> |
| <a id="LEG0000122"></a>`LEG0000122` | 400 | **Bad Request**<br/>Contract Fee not permitted<br/><small>Tarifa não permitida</small> |
| <a id="LEG0000123"></a>`LEG0000123` | 400 | **Bad Request**<br/>Invalid event_status ({event_status}) or event_type ({event_type}) to process brick.<br/><small>Status do evento ({event_status}) ou tipo de evento ({event_type}) inválidos para processar o brick.</small> |
| <a id="LEG000013"></a>`LEG000013` | 404 | **Not Found**<br/>No operation found for key {debt_key}<br/><small>Operação não encontrada para chave {debt_key}</small> |
| <a id="LEG000014"></a>`LEG000014` | 400 | **Bad Request**<br/>Key {debt_key} doesn't belong to any operation of client {selected_agent}<br/><small>A chave {debt_key} não pertence a nenhuma operação do cliente {selected_agent}</small> |
| <a id="LEG000015"></a>`LEG000015` | 400 | **Bad Request**<br/>No operation_key provided<br/><small>Nenhuma chave de operação (operation_key) fornecida</small> |
| <a id="LEG000016"></a>`LEG000016` | 404 | **Not Found**<br/>No operation found for the given operation_key {operation_key}<br/><small>Operação não encontrada para chave de operação {operation_key}</small> |
| <a id="LEG000017"></a>`LEG000017` | 400 | **Bad Request**<br/>No relationship found for the given person {person_key} and operation {operation_key}<br/><small>Nenhuma relação encontrada para a pessoa especificada {person_key} e operação {operation_key}</small> |
| <a id="LEG000018"></a>`LEG000018` | 400 | **Bad Request**<br/>The given key {operation_key} isn`t related to {endpoint} operation. Please use the appropriate endpoint<br/><small>A chave fornecida {operation_key} não está relacionada à operação {endpoint}. Por favor, use o endpoint apropriado</small> |
| <a id="LEG000019"></a>`LEG000019` | 400 | **Bad Request**<br/>Method {method} not allowed for the endpoint {endpoint}<br/><small>Método {method} não permitido para o endpoint {endpoint}</small> |
| <a id="LEG000020"></a>`LEG000020` | 400 | **Bad Request**<br/>Missing document_key, use GET /document/{document_key}<br/><small>Chave do documento (document_key) faltando, use GET /document/{document_key}</small> |
| <a id="LEG000021"></a>`LEG000021` | 404 | **Bad Request**<br/>Document not found for key {document_key}<br/><small>Documento não encontrado para chave {document_key}</small> |
| <a id="LEG000022"></a>`LEG000022` | 400 | **Bad Request**<br/>To get document information, use GET /document/{document_key}<br/><small>Para acessar informações de um documento, use GET /document/{document_key}</small> |
| <a id="LEG000023"></a>`LEG000023` | 400 | **Bad Request**<br/>MiME type {document_mime_type} not supported<br/><small>Tipo de MiME {document_mime_type} não suportado</small> |
| <a id="LEG000024"></a>`LEG000024` | 400 | **Bad Request**<br/>File MIME type and extension don't match<br/><small>Tipo de MiME e extensão do arquivo não batem</small> |
| <a id="LEG000025"></a>`LEG000025` | 400 | **Bad Request**<br/>An error occurred when trying to create document on doc-api: no response received<br/><small>Ocorreu um erro ao tentar criar um documento na doc-api: nenhuma resposta recebida</small> |
| <a id="LEG000026"></a>`LEG000026` | 400 | **Bad Request**<br/>Person {person_key} doesn't own document {document_key}<br/><small>A pessoa {person_key} não é dona do documento {document_key}</small> |
| <a id="LEG000027"></a>`LEG000027` | 400 | **Bad Request**<br/>Operation key {operation_key} doesn't belong to requester {person_key}<br/><small>A operação {operation_key} não pertence à pessoa {person_key}</small> |
| <a id="LEG000028"></a>`LEG000028` | 400 | **Bad Request**<br/>The given key {operation_key} is not related to a credit operation<br/><small>A chave fornecida {} não está relacionada a uma operação de crédito</small> |
| <a id="LEG000029"></a>`LEG000029` | 400 | **Bad Request**<br/>Operation {operation_key} status is {credit_operation_status} and has not been issued yet<br/><small>O status da operação {operation_key} é {credit_operation_status} e ainda não foi emitido</small> |
| <a id="LEG000030"></a>`LEG000030` | 400 | **Bad Request**<br/>Operation {operation_key} is {credit_operation_status}<br/><small>Operação {operation_key} está {credit_operation_status}</small> |
| <a id="LEG000031"></a>`LEG000031` | 400 | **Bad Request**<br/>Missing compliance_document_keys<br/><small>Falta compliance_document_keys</small> |
| <a id="LEG000032"></a>`LEG000032` | 404 | **Not Found**<br/>No document was found for the given compliance_document_key: {compliance_document_key}<br/><small>Nenhum documento foi encontrado para o compliance_document_key fornecido: {compliance_document_key}</small> |
| <a id="LEG000033"></a>`LEG000033` | 500 | **Configuration Error**<br/>There is a problem with your configuration. Please contact system administration<br/><small>Há um problema com sua configuração. Entre em contato com a administração do sistema</small> |
| <a id="LEG000034"></a>`LEG000034` | 400 | **Bad Request**<br/>Found mix of split type amount and percentage<br/><small>Tipo de divisão mista entre valor e percentual</small> |
| <a id="LEG000035"></a>`LEG000035` | 400 | **Bad Request**<br/>For multiple accounts you must specify the split amounts<br/><small>Para várias contas, você deve especificar os valores divididos</small> |
| <a id="LEG000036"></a>`LEG000036` | 400 | **Bad Request**<br/>Operation ({operation_key}) status is cancelled<br/><small>Operação ({operation_key}) cancelada</small> |
| <a id="LEG000037"></a>`LEG000037` | 400 | **Bad Request**<br/>Status not implemented<br/><small>Status não implementado</small> |
| <a id="LEG000038"></a>`LEG000038` | 400 | **Bad Request**<br/>Brick {brick_name} doesnt exist.<br/><small>Bloco {brick_name} não existe.</small> |
| <a id="LEG000039"></a>`LEG000039` | 400 | **Bad Request**<br/>Account number: {account_number} with branch {branch_number} not found<br/><small>Número da conta: {account_number} com o dígito {branch_number} não encontrada</small> |
| <a id="LEG000040"></a>`LEG000040` | 400 | **Bad Request**<br/>Settlement account {account_number} does not belong to borrower with document number {borrower_document_number}<br/><small>A conta de liquidação {account_number} não pertence ao mutuário com o número do documento {borrower_document_number}</small> |
| <a id="LEG000041"></a>`LEG000041` | 400 | **Request Validator Error**<br/>{description}<br/><small>Payload Inválido</small> |
| <a id="LEG000042"></a>`LEG000042` | 400 | **Request Validator Error**<br/>Missing field document_number on disbursement_bank_accounts<br/><small>Campo ausente document_number em disbursement_bank_accounts</small> |
| <a id="LEG000043"></a>`LEG000043` | 400 | **Request Validator Error**<br/>Missing field name on disbursement_bank_accounts<br/><small>Falta o nome do campo em disbursement_bank_accounts</small> |
| <a id="LEG000044"></a>`LEG000044` | 400 | **Request Validator Error**<br/>The percentage_receivable sum of all disbursement_bank_accounts can't be greater than 100<br/><small>A soma percentual_recebível de todas as disbursement_bank_accounts não pode ser maior que 100</small> |
| <a id="LEG000045"></a>`LEG000045` | 400 | **Request Validator Error**<br/>The percentage_receivable sum of all disbursement_bank_accounts must be 100 if it was set for all accounts sent<br/><small>A soma percentage_receivable de todas as disbursement_bank_accounts deve ser 100 se foi definida para todas as contas enviadas</small> |
| <a id="LEG000046"></a>`LEG000046` | 400 | **Request Validator Error**<br/>contract_number already registered. Please use another one<br/><small>contract_number já registrado. Por favor, use outro</small> |
| <a id="LEG000047"></a>`LEG000047` | 400 | **Request Validator Error**<br/>Missing allowed_user for legal account creation<br/><small>allowed_user ausente para criação de conta PJ</small> |
| <a id="LEG000048"></a>`LEG000048` | 400 | **Bad Request**<br/>The provided requester_document_number ({document_number}) is not valid<br/><small>O requester_document_number fornecido ({document_number}) não é válido</small> |
| <a id="LEG000049"></a>`LEG000049` | 400 | **Bad Request**<br/>No operation_key or transaction_request_key provided<br/><small>Nenhuma operation_key ou transaction_request_key fornecida</small> |
| <a id="LEG000050"></a>`LEG000050` | 400 | **Bad Request**<br/>Operation not found for the given key {operation_key}.<br/><small>Operação não encontrada para a chave fornecida {operation_key}</small> |
| <a id="LEG000051"></a>`LEG000051` | 400 | **Bad Request**<br/>Operation cannot be issued before it is signed.<br/><small>A operação não pode ser emitida antes de ser assinada</small> |
| <a id="LEG000052"></a>`LEG000052` | 400 | **Bad Request**<br/>Must provide parameter action_type.<br/><small>O parâmetro action_type deve ser enviado.</small> |
| <a id="LEG000053"></a>`LEG000053` | 400 | **Bad Request**<br/>Cannot perform this action {action_type}.<br/><small>Não é possível executar esta ação {action_type}</small> |
| <a id="LEG000054"></a>`LEG000054` | 400 | **Bad Request**<br/>Invalid simulation within request<br/><small>Simulação inválida na requisição</small> |
| <a id="LEG000055"></a>`LEG000055` | 400 | **Bad Request**<br/>Provide either 'rebates' or 'rebate' and/or 'rebate_type'<br/><small>Envie somente 'rebates' ou 'rebate' e/ou 'rebate_type'</small> |
| <a id="LEG000056"></a>`LEG000056` | 403 | **Unauthorized**<br/>Client does not own this item<br/><small>O cliente não possui este item</small> |
| <a id="LEG000058"></a>`LEG000058` | 400 | **Bad Request**<br/>Provide either 'annual_interest_rate' or 'monthly_interest_rate'<br/><small>Envie somente 'annual_interest_rate' ou 'monthly_interest_rate'</small> |
| <a id="LEG000059"></a>`LEG000059` | 400 | **Bad Request**<br/>Provide 'annual_interest_rate' when interest_type is 'cdi_perc'<br/><small>Envie 'annual_interest_rate' quando o 'interest_type' for 'cdi_perc'</small> |
| <a id="LEG000060"></a>`LEG000060` | 400 | **Bad Request**<br/>Wrong parameter on the request body<br/><small>Parâmetro incorreto no body da request</small> |
| <a id="LEG000061"></a>`LEG000061` | 401 | **Unauthorized**<br/>Invalid or expired payload<br/><small>Payload inválido ou expirado</small> |
| <a id="LEG000062"></a>`LEG000062` | 400 | **Bad Request**<br/>Operation is waiting disbursement confirmation. Status received: {operation_status}<br/><small>Operação esperando confirmação do evento de desembolso: Status recebido {operation_status}</small> |
| <a id="LEG000063"></a>`LEG000063` | 400 | **Bad Request**<br/>Status not accepted by missing or wrong parameters on the callback body: {operation_status}<br/><small>Status não aceito por parâmetros ausentes ou incorretos no corpo do retorno de chamada: {operation_status}</small> |
| <a id="LEG000064"></a>`LEG000064` | 400 | **Bad Request**<br/>Assignment not found for key: {assignment_key}<br/><small>Assignment não encontrado for key: {assignment_key}</small> |
| <a id="LEG000065"></a>`LEG000065` | 400 | **Bad Request**<br/>Missing or wrong signature parameter on the request body<br/><small>Parâmetro de assinatura ausente ou incorreto no body da request</small> |
| <a id="LEG000066"></a>`LEG000066` | 400 | **Bad Request**<br/>Operation {operation_key} already has a endorsement with status {endorsement_status}<br/><small>Operação {operation_key} já tem um endosso com status {endorsement_status}</small> |
| <a id="LEG000067"></a>`LEG000067` | 500 | **Internal Error**<br/>Error while generating {errors}<br/><small>Erro ao gerar {errors}</small> |
| <a id="LEG000068"></a>`LEG000068` | 400 | **Bad Request**<br/>Invalid request body for batch simulation.<br/><small>Corpo da requisição inválido para simulações em lote.</small> |
| <a id="LEG000069"></a>`LEG000069` | 400 | **Bad Request**<br/>Invalid request body for single simulation.<br/><small>Corpo da requisição inválido para simulação unitária.</small> |
| <a id="LEG000070"></a>`LEG000070` | 400 | **Bad Request**<br/>Credit Operation key {credit_operation_key} doesn't belong to requester {person_key}<br/><small>A operação de crédito {credit_operation_key} não pertence à pessoa {person_key}</small> |
| <a id="LEG000071"></a>`LEG000071` | 400 | **Bad Request**<br/>Cannot serve {target_disbursed_amount}, the max is {max_disbursed_amount}<br/><small>Não é possível desembolsar {target_disbursed_amount}, o máximo possível é {max_disbursed_amount}</small> |
| <a id="LEG000072"></a>`LEG000072` | 400 | **Bad Request**<br/>Failed validating MT hash. Reason: {reason}<br/><small>Falha ao validar hash MT. Razão: {reason}</small> |
| <a id="LEG000073"></a>`LEG000073` | 400 | **Bad Request**<br/>Operation {operation_key} actual status does not allow cancel operation. Actual status is {co_status}<br/><small>Status da operação {operation_key} não permite cancelamento.Status atual: {co_status}</small> |
| <a id="LEG000074"></a>`LEG000074` | 400 | **Bad Request**<br/>Pix Chargeback is now allowed from escrow accounts.<br/><small>Devolução de Pix não é permitido para contas escrow</small> |
| <a id="LEG000075"></a>`LEG000075` | 400 | **Bad Request**<br/>Account {account_key} is closed.<br/><small>Conta {account_key} está fechada.</small> |
| <a id="LEG000076"></a>`LEG000076` | 400 | **Bad Request**<br/>Account {account_key} is blocked.<br/><small>Conta {account_key} está bloqueada.</small> |
| <a id="LEG000077"></a>`LEG000077` | 403 | **Unauthorized**<br/>User has no credentials to perform this action.<br/><small>Usuário não tem permissão para realizar essa ação.</small> |
| <a id="LEG000078"></a>`LEG000078` | 400 | **Bad Request**<br/>Pix key and target_account must not be null.<br/><small>Chave Pix e conta de destinos não podem ser ambos nulos.</small> |
| <a id="LEG000079"></a>`LEG000079` | 400 | **Bad Request**<br/>Schedule date can not be less than today.<br/><small>Data de agendamento não pode ser menor que hoje.</small> |
| <a id="LEG000080"></a>`LEG000080` | 400 | **Bad Request**<br/>Source Account has negative balance<br/><small>Conta de origem possui saldo negativo.</small> |
| <a id="LEG000081"></a>`LEG000081` | 400 | **Bad Request**<br/>Account destination not allowed for this escrow account.<br/><small>Conta de destino não permitida para essa conta escrow.</small> |
| <a id="LEG000082"></a>`LEG000082` | 400 | **Bad Request**<br/>Requester document identification can not be null<br/><small>O documento de identificação do requester não pode ser nulo.</small> |
| <a id="LEG000083"></a>`LEG000083` | 400 | **Bad Request**<br/>Pix Transfer not found for pix_transfer_key {pix_transfer_key}.<br/><small>Transferência Pix não encontrada para a pix_transfer_key {pix_transfer_key}.</small> |
| <a id="LEG000084"></a>`LEG000084` | 400 | **Bad Request**<br/>pix_transfer_key can not be null for chargeback<br/><small>O campo pix_transfer_key não deve ser nulo quando for uma devolução Pix.</small> |
| <a id="LEG000085"></a>`LEG000085` | 400 | **Bad Request**<br/>Invalid Pix Key.<br/><small>Pix Key inválida.</small> |
| <a id="LEG000086"></a>`LEG000086` | 400 | **Bad Request**<br/>Account for account key {account_key} not found.<br/><small>Conta para a account_key {account_key} não encontrada.</small> |
| <a id="LEG000087"></a>`LEG000087` | 400 | **Bad Request**<br/>Invalid decimal transaction amount<br/><small>Valor da transação inválido</small> |
| <a id="LEG000088"></a>`LEG000088` | 400 | **Bad Request**<br/>Transfer purpose must be one of transfer, payment_with_change or withdraw<br/><small>Finalidade da transação deve ser transfer, payment_with_change or withdraw</small> |
| <a id="LEG000089"></a>`LEG000089` | 400 | **Bad Request**<br/>When pix_transfer_type is static, dynamic_instant or dynamic_term, end_to_end_id is required<br/><small>Quando o pix_transfer_type é static, dynamic_instant ou dynamic_term, end_to_end_id é obrigatório</small> |
| <a id="LEG000090"></a>`LEG000090` | 400 | **Bad Request**<br/>Compliance has not been approved<br/><small>O Compliance não foi aprovado</small> |
| <a id="LEG000091"></a>`LEG000091` | 400 | **Bad Request**<br/>Given document number {document_number} is not source account owner.<br/><small>O documento enviado {document_number} não é dono da conta de origem</small> |
| <a id="LEG000092"></a>`LEG000092` | 400 | **Bad Request**<br/>Invalid payload for current flow step in operation {operation_key}.<br/><small>Payload inválida para a etapa de fluxo atual em operação {operation_key}.</small> |
| <a id="LEG000093"></a>`LEG000093` | 400 | **Bad Request**<br/>Origin {origin} not expected for kyc flow.<br/><small>Origem {origin} não esperada no fluxo da kyc</small> |
| <a id="LEG000094"></a>`LEG000094` | 404 | **Bad Request**<br/>Facial Biometrics Document was not found<br/><small>Documento de biometria facial não foi encontrado</small> |
| <a id="LEG000095"></a>`LEG000095` | 423 | **Locked**<br/>TED is available from {opening_time} to {closing_time}<br/><small>TED está disponível entre {opening_time} e {closing_time}</small> |
| <a id="LEG000096"></a>`LEG000096` | 400 | **Bad Request**<br/>Prefixed interest rate not registered, please contact us.<br/><small>As taxas de juros prefixadas não foram cadastradas, favor entrar em contato.</small> |
| <a id="LEG000097"></a>`LEG000097` | 401 | **Unauthorized**<br/>Access denied for informed role<br/><small>Acesso negado para o cargo informado</small> |
| <a id="LEG000098"></a>`LEG000098` | 400 | **Bad Request**<br/>Invalid date format. Should be YYYY-MM-DD<br/><small>Formato de data inválido. Deve ser YYYY-MM-DD</small> |
| <a id="LEG000099"></a>`LEG000099` | 400 | **Bad Request**<br/>Number of desired installments must be equal to number of installments<br/><small>Número de parcelas desejadas deve ser igual ao número de parcelas</small> |
| <a id="LEG000124"></a>`LEG000124` | 400 | **Bad Request**<br/>Disbursement date must be today for synchronous disbursement.<br/><small>Data de desembolso precisa ser hoje para desembolso sincrono.</small> |
| <a id="LEG000125"></a>`LEG000125` | 400 | **Bad Request**<br/>Account key not sent.<br/><small>Account key não enviada.</small> |
| <a id="LEG000126"></a>`LEG000126` | 400 | **Bad Request**<br/>Credit operation status: {co_status} does not allow this operation.<br/><small>O status da operação de crédito: {co_status} não permite esta operação.</small> |
| <a id="LEG000127"></a>`LEG000127` | 400 | **Bad Request**<br/>The new disbursement date must be between the disbursement start date and disbursement end date.<br/><small>A nova data de desembolso deve estar entre a data inicial de desembolso e a data final de desembolso.</small> |
| <a id="LEG000128"></a>`LEG000128` | 400 | **Bad Request**<br/>A new valid disbursement date must be provided.<br/><small>Uma nova data de desembolso deve ser informada.</small> |
| <a id="LEG000129"></a>`LEG000129` | 400 | **Bad Request**<br/>Flow step not found for this operation configuration.<br/><small>Etapa não encontrada para configuralçao desta operação.</small> |
| <a id="LEG000130"></a>`LEG000130` | 400 | **Bad Request**<br/>Unable to do action, because collaterals are not constituted. Credit operation key {credit_operation_key};<br/><small>Ação não permitida, porque a garantia não foi constituído. Credit Operation Key {credit_operation_key}</small> |
| <a id="LEG000131"></a>`LEG000131` | 400 | **Bad Request**<br/>Unable to do action, because entry is not paid. Credit operation key {credit_operation_key};<br/><small>Ação não permitida, porque a entrada não foi paga. Credit Operation Key {credit_operation_key}</small> |
| <a id="LEG000132"></a>`LEG000132` | 400 | **Bad Request**<br/>Credit Operation {credit_operation_key} has no disbursement_date<br/><small>A operação de crédito {credit_operation_key} não tem data de desembolso</small> |
| <a id="LEG000133"></a>`LEG000133` | 400 | **Bad Request**<br/>Assignment date must be after or equal disbursement date.<br/><small>Data da cessão deve ser maior ou igual à data de desembolso.</small> |
| <a id="LEG000134"></a>`LEG000134` | 400 | **Bad Request**<br/>Account with document number: {document_number}<br/><small>Conta com ducumento {document_number} não encontrada</small> |
| <a id="LEG000135"></a>`LEG000135` | 400 | **Bad Request**<br/>Invalid Ip Address {ip_address} .<br/><small>Endereço de Ip inválido {ip_address} .</small> |
| <a id="LEG000136"></a>`LEG000136` | 400 | **Bad Request**<br/>Pre price do not accept custom installment with principal amortization percentage.<br/><small>Pre price não aceita parcelas personalizadas com percentual de amortização.</small> |
| <a id="LEG000137"></a>`LEG000137` | 400 | **Bad Request**<br/>'amount' or 'disbursed_amount' must be informed.<br/><small>'amount' ou 'disbursed_amount' deve ser informado.</small> |
| <a id="LEG000138"></a>`LEG000138` | 400 | **Bad Request**<br/>Last installment must have interest.<br/><small>A ultima deve ter juros.</small> |
| <a id="LEG000139"></a>`LEG000139` | 400 | **Bad Request**<br/>Amortization Percentage can have a maximum of 4 decimal places.<br/><small>Porcentagem de Amortização pode ter no máximo 4 casas decimais.</small> |
| <a id="LEG000140"></a>`LEG000140` | 400 | **Bad Request**<br/>Principal amortization percentage can not be 0 without interest.<br/><small>Porcentagem da amotização principal não pode ser 0% se não há juros.</small> |
| <a id="LEG000141"></a>`LEG000141` | 400 | **Bad Request**<br/>Total amount of percentage is {total}, must be 1<br/><small>Valor total da porcentagem é {total}, deve ser 1</small> |
| <a id="LEG000142"></a>`LEG000142` | 400 | **Bad Request**<br/>Installment face value must not be informed if installment has principal_amortization_percentage.<br/><small>Valor de face da parcela não deve ser informado se a parcela possui porcentage de amortização.</small> |
| <a id="LEG000143"></a>`LEG000143` | 400 | **Bad Request**<br/>First due date should not be informed if the installment due date is informed.<br/><small>Primeira data de vencimento não deve ser informada se a data de vencimento da parcela for informada.</small> |
| <a id="LEG000144"></a>`LEG000144` | 400 | **Bad Request**<br/>Installment face value cannot be changed because it was not informed in the original request.<br/><small>O valor de face da parcela não pode ser alterado porque não foi informado na requisição original.</small> |
| <a id="LEG000145"></a>`LEG000145` | 400 | **Bad Request**<br/>The disbursement has passed {limit_days} to reverse operation.<br/><small>O desembolso passou de {limit_days} para reverter a operação.</small> |
| <a id="LEG000146"></a>`LEG000146` | 400 | **Bad Request**<br/>The reversal is allowed just for internal account disbursements.<br/><small>A reversão é permitida apenas para desembolsos em conta interna.</small> |
| <a id="LEG000147"></a>`LEG000147` | 400 | **Bad Request**<br/>The sum of disbursement account balance: {account_balance} must be equal to disbursed issue amount: {disbursed_issue_amount}.<br/><small>A soma do saldo das contas de desembolsos: {account_balance} deve ser igual ao valor desembolsado: {disbursed_issue_amount}.</small> |
| <a id="LEG000148"></a>`LEG000148` | 400 | **Bad Request**<br/>The operation cannot have more than one disbursement account to create the reversal.<br/><small>A operação não pode ter mais de uma conta de desembolso pra criar a reversão.</small> |
| <a id="LEG000149"></a>`LEG000149` | 400 | **Bad Request**<br/>Operation cannot be signed before document is generated.<br/><small>A operação não pode ser assinada antes de ter seu documento gerado.</small> |
| <a id="LEG000150"></a>`LEG000150` | 400 | **Bad Request**<br/>Signature datetime is not in the expected format: YYYY-MM-DDTHH:MM:SSZ<br/><small>Data de assinatura (signature_datetime) não está no formato esperado: YYYY-MM-DDTHH:MM:SSZ</small> |
| <a id="LEG000151"></a>`LEG000151` | 400 | **Bad Request**<br/>similarity_score cannot be null<br/><small>similarity_score não pode ser nulo</small> |
| <a id="LEG000152"></a>`LEG000152` | 400 | **Bad Request**<br/>similarity_score must be greater than 0<br/><small>similarity_score deve ser maior que 0</small> |
| <a id="LEG000153"></a>`LEG000153` | 400 | **Bad Request**<br/>Document template key must not be set for social security collateral.<br/><small>O template do documento não pode ser definido para INSS.</small> |
| <a id="LEG000154"></a>`LEG000154` | 400 | **Bad Request**<br/>Operation category 'minimum_wage_increase' is not allowed for social security collateral.<br/><small>A categoria de operação 'aumento salarial' não está permitida.</small> |
| <a id="LEG000155"></a>`LEG000155` | 400 | **Bad Request**<br/>Insurance premium not found in operation data.<br/><small>Prêmio de seguro não encontrado nos dados da operação.</small> |

### MPR — Military Payroll

32 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="MPR000001"></a>`MPR000001` | 400 | **Invalid Document Number**<br/>Given {document_number} document number is invalid.<br/><small>CPF {document_number} fornecido não é valido.</small> |
| <a id="MPR000002"></a>`MPR000002` | 500 | **Internal Error**<br/>Cache server returned an error.<br/><small>Os servidores da cache retornaram um erro.</small> |
| <a id="MPR0000029"></a>`MPR0000029` | 409 | **Reservation already locked**<br/>Reservation with id {reservation_id} is already locked being processed.<br/><small>A reserva com o id {reservation_id} já está bloqueada sendo processada.</small> |
| <a id="MPR000003"></a>`MPR000003` | 400 | **Already on deletion process**<br/>Reservation with external_key: {external_key} already on deletion process<br/><small>Reserva com a chave externa: {external_key} já está em processo de desaverbação</small> |
| <a id="MPR000004"></a>`MPR000004` | 404 | **Reservation Not Found**<br/>Reservation with key: {reservation_key} not found<br/><small>Reserva com a chave: {reservation_key} não encontrada</small> |
| <a id="MPR000005"></a>`MPR000005` | 400 | **Already finished**<br/>Reservation with external_key: {external_key} is already in its final status {reservation_status}<br/><small>Reserva com a chave externa: {external_key} já está em seu status final {reservation_status}</small> |
| <a id="MPR000006"></a>`MPR000006` | 400 | **Reservation type conflict**<br/>Reservation Type: {reservation_type} not expected for {flow} flow.<br/><small>Tipo de Reserva: {reservation_type} não esperado para o fluxo {flow_translation}.</small> |
| <a id="MPR000007"></a>`MPR000007` | 404 | **Disbursement Option not Found**<br/>Disbursement option for {disbursement_date} was not found.<br/><small>Opção de desembolso para {disbursement_date} não foi encontrada.</small> |
| <a id="MPR000009"></a>`MPR000009` | 409 | **Reservation Status Conflict**<br/>Reservation with status<br/><small>Reservas no status</small> |
| <a id="MPR000010"></a>`MPR000010` | 404 | **Balance Not Found**<br/>Balance Request with key: {balance_key} was not found.<br/><small>Pedido de Margem com a chave: {balance_key} não foi encontrado.</small> |
| <a id="MPR000011"></a>`MPR000011` | 403 | **Unauthorized Request**<br/>Request must be internal or from master.<br/><small>Requisição precisar ser internal ou da master.</small> |
| <a id="MPR000012"></a>`MPR000012` | 404 | **Accrual Not Found**<br/>Accrual not found: {reference_date}.<br/><small>Accrual não encontrado: {reference_date}</small> |
| <a id="MPR000013"></a>`MPR000013` | 404 | **Active Token Not Found**<br/>Active token was not found for reservation: {reservation_key}.<br/><small>Token ativo não encontrado para a reserva: {reservation_key}</small> |
| <a id="MPR000014"></a>`MPR000014` | 400 | **Balance Not Allowed**<br/>Balance Request with status: {status} was not allowed to retry.<br/><small>Pedido de Margem com o status: {status} não foi permitido a retentativa.</small> |
| <a id="MPR000015"></a>`MPR000015` | 400 | **Balance Not Allowed**<br/>Balance Request with status: {status} was not allowed to retry.<br/><small>Pedido de Margem com o status: {status} não foi permitido a retentativa.</small> |
| <a id="MPR000016"></a>`MPR000016` | 404 | **Balance Not Found**<br/>Portability contracts report with key: {portability_contracts_report_key} was not found.<br/><small>Consulta de contratos para portabilidade com a chave: {portability_contracts_report_key} não foi encontrado.</small> |
| <a id="MPR000017"></a>`MPR000017` | 404 | **Reservation Not Found for Debt Key**<br/>Reservation with debt_key: {external_key} not found<br/><small>Reserva com a chave de débito: {external_key} não encontrada</small> |
| <a id="MPR000018"></a>`MPR000018` | 400 | **Reservation status not permitted on refinancing**<br/>Reservation with external_key: {external_key} is on status {status} which is not permitted for refinancing.<br/><small>Reserva com a chave externa: {external_key}  está no status {status} que não é permitido para refinanciamento.</small> |
| <a id="MPR000019"></a>`MPR000019` | 404 | **Period not found for informed Reservation**<br/>Reservation with reservation_key: {reservation_key} does not have a Period with due_date: {due_date}.<br/><small>Reserva com a chave: {reservation_key}  não possui uma parcela com a data de vencimento: {due_date}.</small> |
| <a id="MPR000020"></a>`MPR000020` | 400 | **Informed period not allowed to be paid**<br/>Period with due_date: {due_date} from reservation: {reservation_key} is on status: {period_status} which does not allow to be updated to status<br/><small>Periodo com vencimento: {due_date} da reserva: {reservation_key} está no status: {period_status} que não permite a atualização para o status</small> |
| <a id="MPR000021"></a>`MPR000021` | 500 | **Encoding Error**<br/>Error while encoding file<br/><small>Erro ao codificar arquivo</small> |
| <a id="MPR000022"></a>`MPR000022` | 400 | **Invalid Registration Code**<br/>Informed registration code: {registration_code} is invalid.<br/><small>Matrícula fornecida: {registration_code} é invalida.</small> |
| <a id="MPR000023"></a>`MPR000023` | 404 | **Protocol not Found**<br/>Protocol with debt key {external_key} was not found.<br/><small>Protocolo com chave {external_key} não foi encontrada.</small> |
| <a id="MPR000024"></a>`MPR000024` | 400 | **Ivanlid protocol type**<br/>Protocol type {protocol_type} doesn<br/><small>Protocolo do tipo {protocol_type} não existe.</small> |
| <a id="MPR000025"></a>`MPR000025` | 400 | **Reservation Type Not Allowed to Change**<br/>Reservation with debt_key: {external_key} is of type {reservation_type_enum}, which is not allowed to be changed.<br/><small>Reserva com a chave: {external_key} é do tipo {reservation_type_enum} e não pode ser alterada.</small> |
| <a id="MPR000026"></a>`MPR000026` | 400 | **Reservation Status not Permitted for Type Change**<br/>Reservation with debt_key: {external_key} is on status {reservation_status_enum}, which is not permitted for reservation type change.<br/><small>Reserva com a chave: {external_key} está no status {reservation_status_enum} que não é permitido para o fluxo de alteração de tipo de reserva.</small> |
| <a id="MPR000027"></a>`MPR000027` | 400 | **Proposal has Remaining Installments**<br/>Proposal {proposal_key} shouldn<br/><small>Proposal {proposal_key} não deveria ter installments sobrando.</small> |
| <a id="MPR000028"></a>`MPR000028` | 400 | **Zetra Invalid Document Type**<br/>Zetra error while uploading document. File type is invalid<br/><small>Erro ao enviar documento para Zetra. Tipo de arquivo inválido.</small> |
| <a id="MPR000030"></a>`MPR000030` | 404 | **Contract Not Found**<br/>Reservation with contract number: {contract_number} not found<br/><small>Reserva com o número de contrato: {contract_number} não encontrada</small> |
| <a id="MPR000031"></a>`MPR000031` | 500 | Proposal not found for reservation {reservation_key} - {status}<br/><small>Proposta não encontrada para reserva {reservation_key} - {status}</small> |
| <a id="MPR000032"></a>`MPR000032` | 400 | **Renegotiation Proposal bad request**<br/>Renegotiation Proposal bad request |
| <a id="MPR000033"></a>`MPR000033` | 400 | **External System Unavailable**<br/>External system response status code is greater than 500<br/><small>O sistema externo retornou um código de status superior a 500</small> |

### PPA — Private Payroll Auction

23 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="PPA000001"></a>`PPA000001` | 404 | **Requester Proposal not Found**<br/>Requester Proposal with<br/><small>A entidade com</small> |
| <a id="PPA000002"></a>`PPA000002` | 500 | **Error publishing message on pub sub.**<br/>Error publishing message on Pub Sub, max reetries exceeded.<br/><small>Erro ao publicar mensagem no Pub Sub, número máximo de tentativas excedido.</small> |
| <a id="PPA000003"></a>`PPA000003` | 409 | **Entity already locked**<br/>Reservation with id {reservation_id} is already locked being processed.<br/><small>A reserva com o id {reservation_id} já está bloqueada sendo processada.</small> |
| <a id="PPA000004"></a>`PPA000004` | 404 | **Requester not Found**<br/>Requester with<br/><small>Requester com chave {requester_key} não foi encontrado.</small> |
| <a id="PPA000005"></a>`PPA000005` | 404 | **Proposal Request not Found**<br/>Proposal Request with<br/><small>Proposal Request com</small> |
| <a id="PPA000006"></a>`PPA000006` | 400 | **Auction has ended, invalid action**<br/>The auction for<br/><small>Leilão para</small> |
| <a id="PPA000007"></a>`PPA000007` | 409 | **Proposal was already cancelled**<br/>The Auction Proposal with key: {auction_proposal_key} was already cancelled<br/><small>Proposta com chave {auction_proposal_key} já foi cancelada</small> |
| <a id="PPA000008"></a>`PPA000008` | 400 | **Invalid requester proposal payload**<br/>Invalid requester proposal payload for auction_proposal_key:{auction_proposal_key}<br/><small>payload de proposta é inválido para auction_proposal_key:{auction_proposal_key}</small> |
| <a id="PPA000009"></a>`PPA000009` | 409 | **Duplicated Proposal for this issuer proposal request**<br/>Already made a proposal for issuer_proposal_request: {issuer_proposal_request_key}, the proposal key is: {auction_proposal_key}<br/><small>Proposta já foi feita: {issuer_proposal_request_key}, chave da proposta: {auction_proposal_key}</small> |
| <a id="PPA000010"></a>`PPA000010` | 502 | **Dataprevs system is down**<br/>Dataprev system is down<br/><small>Sistema da Dataprev está fora de ar</small> |
| <a id="PPA000011"></a>`PPA000011` | 400 | **Error when connecting to private payroll for external_id**<br/>Private Payroll API is not responding properly to external_id PATCH<br/><small>API de consignado privado não está respondendo devidamente ao PATCH de external_id</small> |
| <a id="PPA000013"></a>`PPA000013` | 400 | **Could not create credit operation for auction winner**<br/>Could not create credit operation for auction winner for auction_proposal_key: {auction_proposal_key}<br/><small>Erro ao criar operação de credito para proposta vencedora do leilão, chave da proposta: {auction_proposal_key}</small> |
| <a id="PPA000014"></a>`PPA000014` | 400 | **Could not simulate credit operation for Proposal**<br/>Could not simulate credit operation for auction winner for auction_proposal_key: {issuer_proposal_request_key}<br/><small>Erro ao simular operação de credito para proposta vencedora do leilão, chave da proposta: {issuer_proposal_request_key}</small> |
| <a id="PPA000015"></a>`PPA000015` | 400 | **The assignment amount is greater than the operation final amount**<br/>Could not simulate credit operation for proposal made to issuer proposal request with key: {issuer_proposal_request_key}. The input values need to be changed.<br/><small>Erro ao simular operação de credito para proposta feita a solicitação com chave {issuer_proposal_request_key}. Valores de entrada devem ser modificados.</small> |
| <a id="PPA000016"></a>`PPA000016` | 400 | **Requester with this key does not exist**<br/>Could not get the requester from exclusive employer table, requester with key {requester_key} does not exist<br/><small>Não foi possível obter o requester da tabela de empregadores exclusivos, requester_key: {requester_key}</small> |
| <a id="PPA000017"></a>`PPA000017` | 400 | **Invalid Disbursement Account**<br/>Invalid Disbursement Account while updating account for auction proposal with key: {auction_proposal_key}<br/><small>Conta de desembolso invalida enquanto atualizava proposta com chave {auction_proposal_key}</small> |
| <a id="PPA000018"></a>`PPA000018` | 400 | **Invalid Employer Document Number**<br/>Invalid Employer Document Number for auction proposal with key: {auction_proposal_key}<br/><small>Número de documento de empregador inválido para proposta com chave {auction_proposal_key}</small> |
| <a id="PPA000019"></a>`PPA000019` | 400 | **Error when cancelling credit operation**<br/>Error when cancelling credit operation for auction proposal with key: {auction_proposal_key}<br/><small>Erro ao cancelar operação de crédito para proposta com chave {auction_proposal_key}</small> |
| <a id="PPA000020"></a>`PPA000020` | 400 | **Auction Proposal Validation Error**<br/>Error when validating auction proposal for issuer proposal request with key {issuer_proposal_request_key}<br/><small>Erro durante validação de proposta para solicitação com chave da solicitação: {issuer_proposal_request_key}</small> |
| <a id="PPA000021"></a>`PPA000021` | 400 | **Termination alert found in existent balance inquiry during validation**<br/>Termination alert in existent balance inquiry during validation of auction proposal for issuer proposal request with key {issuer_proposal_request_key}<br/><small>Alerta de terminação de vínculo em consulta de margem existente durante validação de proposta para solicitação com chave da solicitação: {issuer_proposal_request_key}</small> |
| <a id="PPA000022"></a>`PPA000022` | 400 | **Invalid Interest Rate**<br/>Interest rate can<br/><small>A taxa de juros não pode ser maior que {max_interest_rate}% ou menor que {min_interest_rate}%.</small> |
| <a id="PPA000023"></a>`PPA000023` | 400 | **Insurance premium not allowed**<br/>Insurance premium is not allowed for private payroll operations<br/><small>Seguro não é permitido para operações de Consignado Privado</small> |
| <a id="PPA000024"></a>`PPA000024` | 404 | **Requester configuration not found**<br/>Requester configuration with key {requester_key} not found<br/><small>Configuração de requester com chave {requester_key} não encontrada</small> |

### PRP — Private Payroll

98 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="PRP000002"></a>`PRP000002` | - | **Bad Request**<br/>The authorization term is required<br/><small>O envio do termo de autorização é obrigatório</small> |
| <a id="PRP000003"></a>`PRP000003` | - | **Bad Request**<br/>The issuer document number is invalid<br/><small>O número de documento do emissor é inválido</small> |
| <a id="PRP000004"></a>`PRP000004` | - | **Bad Request**<br/>The signer document number is invalid<br/><small>O número de documento do signatário é inválido</small> |
| <a id="PRP000005"></a>`PRP000005` | - | **Bad Request**<br/>The legal representative document number is invalid<br/><small>O número de documento do representante legal é inválido</small> |
| <a id="PRP000006"></a>`PRP000006` | - | **Conflict**<br/>The signer document number is different from the expected<br/><small>O número de documento do signatário é diferente do esperado</small> |
| <a id="PRP000007"></a>`PRP000007` | - | **Rate Limit Exceeded**<br/>Rate limit exceeded for Dataprev service. Try again later.<br/><small>Limite de chamadas excedido para o serviço do Dataprev. Tente novamente mais tarde.</small> |
| <a id="PRP000008"></a>`PRP000008` | - | **Bad Gateway**<br/>Unexpected error on Dataprev service<br/><small>Erro inesperado no serviço do Dataprev</small> |
| <a id="PRP000009"></a>`PRP000009` | - | **Balance Inquiry Not Found**<br/>The balance inquiry key is not valid<br/><small>A chave da consulta de saldo não é válida</small> |
| <a id="PRP000010"></a>`PRP000010` | - | **Employment Relationships Inquiry Not Found**<br/>The employment relationships inquiry key is not valid<br/><small>A chave da consulta de vínculos de emprego não é válida</small> |
| <a id="PRP000011"></a>`PRP000011` | - | **Reservation already exists**<br/>A reservation already exists for the external key provided<br/><small>A reserva já existe para a chave externa fornecida</small> |
| <a id="PRP000012"></a>`PRP000012` | - | **Balance inquiry not found**<br/>A balance inquiry was not found for the reservation<br/><small>Nenhuma consulta de saldo foi encontrada para a reserva</small> |
| <a id="PRP000013"></a>`PRP000013` | - | **Balance inquiry not completed**<br/>The balance inquiry was not completed<br/><small>A consulta de saldo não foi concluída</small> |
| <a id="PRP000014"></a>`PRP000014` | - | **Periods are required**<br/>The periods are required<br/><small>Os períodos são obrigatórios</small> |
| <a id="PRP000015"></a>`PRP000015` | - | **Periods are greater than maximum allowed**<br/>The periods are greater than the maximum allowed: {max_periods}<br/><small>Os períodos são maiores que o máximo permitido: {max_periods}</small> |
| <a id="PRP000016"></a>`PRP000016` | - | **First due date is less than disbursement date**<br/>The first due date must be greater than the disbursement date<br/><small>A data de vencimento inicial deve ser maior que a data de liberação</small> |
| <a id="PRP000017"></a>`PRP000017` | - | **Invalid due date**<br/>Due dates must be on or after the {due_day}th day of the month<br/><small>As datas de vencimento devem ser no dia {due_day} ou após do mês</small> |
| <a id="PRP000018"></a>`PRP000018` | - | **Monthly interest rate is greater than maximum allowed**<br/>The monthly interest rate is greater than the maximum allowed: {formatted_rate}<br/><small>A taxa de juros mensal é maior que a máxima permitida: {formatted_rate}</small> |
| <a id="PRP000021"></a>`PRP000021` | - | **Total amount is less than minimum allowed**<br/>The total amount is less than the minimum allowed: {formatted_amount}<br/><small>O valor total é menor que o mínimo permitido: {formatted_amount}</small> |
| <a id="PRP000022"></a>`PRP000022` | - | **Invalid number of documents**<br/>The number of documents must be 3 or 4<br/><small>O número de documentos deve ser 3 ou 4</small> |
| <a id="PRP000023"></a>`PRP000023` | - | **Duplicate document type**<br/>The document type {document_type} is duplicated<br/><small>O tipo de documento {DOCUMENT_TYPES_TRANSLATION[document_type]} está duplicado</small> |
| <a id="PRP000024"></a>`PRP000024` | - | **Document identification is required**<br/>The document identification is required<br/><small>O documento de identificação é obrigatório</small> |
| <a id="PRP000025"></a>`PRP000025` | - | **Document identification back is required**<br/>The document identification back is required<br/><small>O documento de identificação de verso é obrigatório</small> |
| <a id="PRP000026"></a>`PRP000026` | - | **Selfie is required**<br/>The selfie is required<br/><small>A selfie é obrigatória</small> |
| <a id="PRP000027"></a>`PRP000027` | - | **CCB document is required**<br/>Exactly one contract of {ccb_types} must be provided<br/><small>Deve ser fornecido exatamente um contrato de {ccb_types}</small> |
| <a id="PRP000028"></a>`PRP000028` | - | **Failed to download file**<br/>Failed to download file from {url}<br/><small>Falha ao baixar o arquivo de {url}</small> |
| <a id="PRP000029"></a>`PRP000029` | - | **Failed to convert PDF to image**<br/>Failed to convert PDF to image: {error}<br/><small>Falha ao converter PDF para imagem: {error}</small> |
| <a id="PRP000030"></a>`PRP000030` | - | **Empty PDF file**<br/>PDF file appears to be empty or contains no valid pages to convert<br/><small>O arquivo PDF está vazio ou não contém páginas válidas para conversão</small> |
| <a id="PRP000031"></a>`PRP000031` | - | **Invalid document image**<br/>The document image cannot be processed: {error}<br/><small>A imagem do documento não pode ser processada: {error}</small> |
| <a id="PRP000032"></a>`PRP000032` | - | **Invalid document image format**<br/>The document<br/><small>O documento</small> |
| <a id="PRP000033"></a>`PRP000033` | - | **Invalid document image size**<br/>The document<br/><small>O documento</small> |
| <a id="PRP000034"></a>`PRP000034` | - | **Error cancelling credit operation permanently**<br/>Failed to cancel credit operation permanently: {external_key}<br/><small>Falha ao cancelar permanentemente a operação de crédito: {external_key}</small> |
| <a id="PRP000035"></a>`PRP000035` | - | **Reservation not found**<br/>The reservation was not found<br/><small>A reserva não foi encontrada</small> |
| <a id="PRP000037"></a>`PRP000037` | - | **Reservation is not pending auction**<br/>The reservation is not pending auction<br/><small>A reserva não está pendente de leilão</small> |
| <a id="PRP000038"></a>`PRP000038` | - | **Error creating proposal**<br/>Failed to create proposal<br/><small>Erro ao criar proposta</small> |
| <a id="PRP000039"></a>`PRP000039` | - | **Error getting proposal**<br/>Failed to get proposal<br/><small>Erro ao obter proposta</small> |
| <a id="PRP000040"></a>`PRP000040` | - | **Reservation period is not equal to the number of periods**<br/>The reservation period is not equal to the number of periods<br/><small>O período de reserva não é igual ao número de períodos</small> |
| <a id="PRP000041"></a>`PRP000041` | - | **Error getting credit operation by external key**<br/>Failed to get credit operation by external key: {external_key}<br/><small>Falha ao buscar a operação de crédito: {external_key}</small> |
| <a id="PRP000042"></a>`PRP000042` | - | **Service Unavailable**<br/>Service unavailable for Dataprev service<br/><small>Serviço indisponível para o serviço do Dataprev</small> |
| <a id="PRP000043"></a>`PRP000043` | - | **Invalid reason**<br/>Reservation deletion failed<br/><small>Exclusão de reserva falhou</small> |
| <a id="PRP000044"></a>`PRP000044` | - | **Reason not found**<br/>Reason not found<br/><small>Motivo não encontrado</small> |
| <a id="PRP000045"></a>`PRP000045` | - | **Invalid reason**<br/>Reservation inclusion failed<br/><small>Inclusão de reserva falhou</small> |
| <a id="PRP000046"></a>`PRP000046` | - | **Error creating document**<br/>Failed to create document: {document_name}<br/><small>Falha ao criar o documento: {document_name}</small> |
| <a id="PRP000047"></a>`PRP000047` | - | **Error uploading document**<br/>Failed to upload document: {document_key}<br/><small>Falha ao enviar o documento: {document_key}</small> |
| <a id="PRP000048"></a>`PRP000048` | - | **Error updating disbursement date**<br/>Failed to update disbursement date for credit operation: {external_key}<br/><small>Falha ao atualizar a data de desembolso para a operação de crédito: {external_key}</small> |
| <a id="PRP000049"></a>`PRP000049` | - | **Error constituting collateral**<br/>Failed to constitute collateral for credit operation: {external_key}<br/><small>Falha ao constituir a garantia para a operação de crédito: {external_key}</small> |
| <a id="PRP000050"></a>`PRP000050` | - | **Error cancelling credit operation**<br/>Failed to cancel credit operation: {external_key}<br/><small>Falha ao cancelar a operação de crédito: {external_key}</small> |
| <a id="PRP000051"></a>`PRP000051` | - | **Document validation failed**<br/>Document validation failed<br/><small>A validação de documentos falhou</small> |
| <a id="PRP000052"></a>`PRP000052` | - | **Reservation cannot be deleted**<br/>The reservation is in suspension flow<br/><small>A reserva está em fluxo de suspensão</small> |
| <a id="PRP000053"></a>`PRP000053` | - | **Protocol type not found**<br/>The protocol type was not found<br/><small>O tipo de protocolo não foi encontrado</small> |
| <a id="PRP000054"></a>`PRP000054` | - | **Authentication Error**<br/>Failed to authenticate with external service<br/><small>Falha na autenticação com serviço externo</small> |
| <a id="PRP000055"></a>`PRP000055` | - | **Error getting document by name**<br/>Failed to get document by name: {document_name}<br/><small>Falha ao buscar o documento: {document_name}</small> |
| <a id="PRP000056"></a>`PRP000056` | - | **Empty document list**<br/>Document list is empty: {document_name}<br/><small>A lista de documentos está vazia: {document_name}</small> |
| <a id="PRP000057"></a>`PRP000057` | - | **Reservation is not pending requester authorization**<br/>The reservation is not pending requester authorization<br/><small>A reserva não está pendente de autorização do requerente</small> |
| <a id="PRP000058"></a>`PRP000058` | - | **Error creating credit analysis**<br/>Failed to create credit analysis for document number {document_number}<br/><small>Falha ao criar a análise de crédito para o número de documento {document_number}</small> |
| <a id="PRP000059"></a>`PRP000059` | - | **Invalid credit analysis status**<br/>Invalid credit analysis status: {analysis_status}<br/><small>Status de análise de crédito inválido: {analysis_status}</small> |
| <a id="PRP000060"></a>`PRP000060` | - | **Reservation is not pending credit analysis**<br/>The reservation is not pending credit analysis<br/><small>A reserva não está pendente de análise de crédito</small> |
| <a id="PRP000061"></a>`PRP000061` | - | **Requester configuration not found**<br/>The requester configuration with key {requester_key} was not found<br/><small>A configuração do cliente com a chave {requester_key} não foi encontrada</small> |
| <a id="PRP000062"></a>`PRP000062` | - | **Requester configuration already exists**<br/>The requester configuration with key {requester_key} already exists<br/><small>A configuração do cliente com a chave {requester_key} já existe</small> |
| <a id="PRP000063"></a>`PRP000063` | - | **Reservation is not pending documents submission**<br/>The reservation is not pending documents submission<br/><small>A reserva não está pendente de envio de documentos</small> |
| <a id="PRP000064"></a>`PRP000064` | - | **Invalid biometry analysis**<br/>The biometry analysis is invalid<br/><small>A análise biométrica é inválida</small> |
| <a id="PRP000067"></a>`PRP000067` | - | **Invalid status for cancellation**<br/>The reservation status {status} is not valid for cancellation<br/><small>O status da reserva {status} não é válido para cancelamento</small> |
| <a id="PRP000068"></a>`PRP000068` | - | **Reservation is not canceled**<br/>The reservation is not canceled<br/><small>A reserva não está cancelada</small> |
| <a id="PRP000069"></a>`PRP000069` | - | **Wrong status event**<br/>The reservation status event {status} is not valid<br/><small>O evento de status da reserva {status} não é válido</small> |
| <a id="PRP000070"></a>`PRP000070` | - | **Invalid status for reactivation**<br/>The reservation status event {status} is not valid for reactivation<br/><small>O evento de status da reserva {status} não é válido para reativação</small> |
| <a id="PRP000071"></a>`PRP000071` | - | **Error getting credit analysis**<br/>Failed to get credit analysis for reservation key: {reservation_key}<br/><small>Falha ao obter a análise de crédito para a chave de reserva: {reservation_key}</small> |
| <a id="PRP000072"></a>`PRP000072` | - | **Is not allowed to reserve**<br/>The reservation is not allowed to be reserved<br/><small>A reserva não é permitida para ser reservada</small> |
| <a id="PRP000073"></a>`PRP000073` | - | **Invalid status for documents submission**<br/>The reservation status {status} is not valid for documents submission<br/><small>O status da reserva {status} não é válido para submissão dos documentos</small> |
| <a id="PRP000074"></a>`PRP000074` | - | **Invalid status to delete**<br/>The reservation status is not valid for deletion<br/><small>O status da reserva não é válido para exclusão</small> |
| <a id="PRP000075"></a>`PRP000075` | - | **Bad Gateway**<br/>Failed to include legacy contract<br/><small>Erro ao incluir contrato legado</small> |
| <a id="PRP000076"></a>`PRP000076` | - | **Bad Request**<br/>Missing required fields<br/><small>Faltam campos obrigatórios</small> |
| <a id="PRP000077"></a>`PRP000077` | - | **Requester configuration is not active**<br/>The requester configuration with key {requester_key} is not active<br/><small>A configuração do cliente com a chave {requester_key} não está ativa</small> |
| <a id="PRP000078"></a>`PRP000078` | - | **Invalid configuration data**<br/>The requester configuration with key {requester_key} has invalid configuration data<br/><small>A configuração do cliente com a chave {requester_key} tem dados de configuração inválidos</small> |
| <a id="PRP000079"></a>`PRP000079` | - | **Legacy Contract not found**<br/>The Legacy Contract {contract_number} was not found<br/><small>O contrato legado {contract_number} não foi encontrado</small> |
| <a id="PRP000080"></a>`PRP000080` | - | **Bad Gateway**<br/>Failed to exclude legacy contract<br/><small>Erro ao excluir contrato legado</small> |
| <a id="PRP000081"></a>`PRP000081` | - | **Bad Gateway**<br/>Failed to renegotiate legacy contract<br/><small>Erro ao renegociar contrato legado</small> |
| <a id="PRP000082"></a>`PRP000082` | - | **Missing required fields**<br/>The required fields are missing<br/><small>Os campos obrigatórios estão ausentes</small> |
| <a id="PRP000083"></a>`PRP000083` | - | **Invalid legacy contract to refinance**<br/>The legacy contract {contract_number} is not valid to refinance<br/><small>O contrato legacy {contract_number} não é válido para refinanciamento</small> |
| <a id="PRP000084"></a>`PRP000084` | - | **Bad Request**<br/>The interest rate of the legacy contract {contract_number} must be greater than the new contract: {interest_rate}<br/><small>A taxa de juros do contrato legado {contract_number} precisa ser maior que a do novo contrato: {interest_rate}</small> |
| <a id="PRP000085"></a>`PRP000085` | - | **Success Reason not found**<br/>Success reason not found<br/><small>Motivo de sucesso não encontrado</small> |
| <a id="PRP000086"></a>`PRP000086` | - | **Failure Reason not found**<br/>Failure reason not found<br/><small>Motivo de falha não encontrado</small> |
| <a id="PRP000087"></a>`PRP000087` | - | **Outside of Dataprev working hours**<br/>Outside of Dataprev working hours<br/><small>Fora do horário de funcionamento da Dataprev</small> |
| <a id="PRP000088"></a>`PRP000088` | - | **Authorization Term Not Found**<br/>The Authorization Term key not found<br/><small>Termo de autorização não foi encontrado</small> |
| <a id="PRP000089"></a>`PRP000089` | - | **Termination alert found in balance inquiry**<br/>Termination alert found in existent balance inquiry during validation<br/><small>Alerta de terminação de vínculo encontrado em consulta de vínculo existente durante validação</small> |
| <a id="PRP000090"></a>`PRP000090` | - | **Bad Request**<br/>The legacy contract {contract_number} is not active<br/><small>O contrato legado {contract_number} não está ativo</small> |
| <a id="PRP000091"></a>`PRP000091` | - | **Bad Request**<br/>The employer document number is invalid<br/><small>O número do documento do empregador é inválido</small> |
| <a id="PRP000092"></a>`PRP000092` | - | **Invalid legacy contract refinancing reservation amount**<br/>Reservation amount is greater than the legacy contracts total period amount<br/><small>O valor da reserva é maior que o valor total dos períodos dos contratos legacy</small> |
| <a id="PRP000093"></a>`PRP000093` | - | **Failed to get registers**<br/>Failed to get registers<br/><small>Falha ao obter registros</small> |
| <a id="PRP000094"></a>`PRP000094` | - | **Failed to get payments**<br/>Failed to get payments<br/><small>Falha ao obter pagamentos</small> |
| <a id="PRP000095"></a>`PRP000095` | - | **Registers not found**<br/>Registers not found<br/><small>Registros não encontrados</small> |
| <a id="PRP000096"></a>`PRP000096` | - | **Payments not found**<br/>Payments not found<br/><small>Pagamentos não encontrados</small> |
| <a id="PRP000097"></a>`PRP000097` | - | **Already has balance inquiry**<br/>The reservation already has a balance inquiry<br/><small>A reserva já tem uma consulta de saldo</small> |
| <a id="PRP000098"></a>`PRP000098` | - | **Bad Request**<br/>Error on authorization term<br/><small>Erro no termo de autorização</small> |
| <a id="PRP000099"></a>`PRP000099` | - | **Requester Key Is Required**<br/>The requester key is required<br/><small>A chave do solicitante é obrigatória</small> |
| <a id="PRP000100"></a>`PRP000100` | - | **Invalid legacy contract for rollover**<br/>The legacy contract {contract_number} has different document number or employer document number<br/><small>O contrato legacy {contract_number} possui CPF ou CNPJ do empregador diferente</small> |
| <a id="PRP000101"></a>`PRP000101` | - | **Failed to create rollover reservation**<br/>Failed to create rollover reservation: {error_message or<br/><small>Falha ao criar reserva de tombamento: {error_message or</small> |
| <a id="PRP000102"></a>`PRP000102` | - | **Missing parameter**<br/>The parameter {parameter} is missing<br/><small>O parâmetro {parameter} está ausente</small> |
| <a id="PRP000104"></a>`PRP000104` | - | **Failed to generate a valid contract number**<br/>Failed to generate a contract number for a reservation<br/><small>Falha ao criar número de contrato para reserva.</small> |
| <a id="PRP000201"></a>`PRP000201` | - | **Employment Relationship Not Found**<br/>The employment relationships inquiry key is not valid<br/><small>A chave da consulta de vínculos de emprego não é válida</small> |

### RN — Renegotiation

35 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="RN0000001"></a>`RN0000001` | 400 | **Bad Request**<br/>Credit operation status is invalid for this request. Status: {credit_operation_status}<br/><small>O status dessa operação de crédito é invalido para essa requisição. Status: {credit_operation_status}</small> |
| <a id="RN0000002"></a>`RN0000002` | 400 | **Bad Request**<br/>Installment status is invalid for this request.Installment key:{installment_key}<br/><small>O status dessa parcela é invalido para essa requisição.Installment key:{installment_key}</small> |
| <a id="RN0000003"></a>`RN0000003` | 404 | **Not Found**<br/>No installment found for received installment keys.<br/><small>Nenhuma parcela encontrada para as installment keys recebidas.</small> |
| <a id="RN0000004"></a>`RN0000004` | 400 | **Bad Request**<br/>The percentage discount amount must be less than or equal to 1.<br/><small>O valor do desconto percentual deve ser menor ou igual a 1.</small> |
| <a id="RN0000005"></a>`RN0000005` | 400 | **Bad Request**<br/>The discount amount cannot be greater than the the installments values.<br/><small>O valor do desconto não pode ser maior do que o valor das parcelas.</small> |
| <a id="RN0000006"></a>`RN0000006` | 400 | **Bad Request**<br/>The same installment key was informed more than once.Installment Key:{installment_key}<br/><small>A mesma installment_key foi informada mais de uma vez.Installment Key:{installment_key}</small> |
| <a id="RN0000007"></a>`RN0000007` | 400 | **Bad Request**<br/>Installment doesn<br/><small>Parcela não possui campo paid_amount. Installment_key:{installment_key}</small> |
| <a id="RN0000008"></a>`RN0000008` | 400 | **Bad Request**<br/>Proposal must have a payment linked to it.<br/><small>A proposta deve ter um pagamento vinculado a ela.</small> |
| <a id="RN0000009"></a>`RN0000009` | 403 | **Forbidden**<br/>The requester informed is not the same as the credit operation.<br/><small>O solicitante informado não é o mesmo da operação de crédito.</small> |
| <a id="RN0000010"></a>`RN0000010` | 404 | **Not Found**<br/>Proposal not found.<br/><small>Proposta não encontrada.</small> |
| <a id="RN0000011"></a>`RN0000011` | 400 | **Bad Request**<br/>Proposal cannot be canceled in current status.Status:{status}<br/><small>Proposta não pode ser cancelada no status atual.Status:{status}</small> |
| <a id="RN0000012"></a>`RN0000012` | 404 | **Not Found**<br/>Credit Operation not found for sent contract number.<br/><small>Operação de credito não encontrada pelo número de contrato enviado.</small> |
| <a id="RN0000013"></a>`RN0000013` | 404 | **Not found**<br/>The payment engine has not been found.<br/><small>O mecanismo de pagamento não foi encontrado.</small> |
| <a id="RN0000014"></a>`RN0000014` | 404 | **Not found**<br/>The requester profile has not been found.<br/><small>O perfil de solicitante não foi encontrado.</small> |
| <a id="RN0000015"></a>`RN0000015` | 400 | **Bad Request**<br/>Proposal due date or reference date cannot be in past.<br/><small>A data de vencimento da renegociação ou a data de referência não podem estar no passado.</small> |
| <a id="RN0000016"></a>`RN0000016` | 404 | **Not found**<br/>The requester configuration has not been found.<br/><small>A configuração de solicitante não foi encontrada.</small> |
| <a id="RN0000017"></a>`RN0000017` | 400 | **Bad Request**<br/>The proposal cannot be paid in current status. Proposal Status: {status}<br/><small>A renegociação não pode ser paga no status atual. Proposal Status: {status}</small> |
| <a id="RN0000018"></a>`RN0000018` | 400 | **Bad Request**<br/>The bank slip registration has been rejected.<br/><small>O registro do boleto bancário foi rejeitado.</small> |
| <a id="RN0000019"></a>`RN0000019` | 409 | **Conflict**<br/>This contract is already linked to another proposal in progress.<br/><small>Esse contrato ja está vinculado a outra proposta em andamento.</small> |
| <a id="RN0000020"></a>`RN0000020` | 400 | **Bad Request**<br/>Renegotiation request invalid due to credit operation status.<br/><small>A requisição de renegociação é inválida devido ao status da operação de crédito.</small> |
| <a id="RN0000021"></a>`RN0000021` | 400 | **Bad Request**<br/>Number of operations is greater than the maximum allowed. Maximum operations allowed: {maximum_operations}<br/><small>Número de operações é maior que o máximo permitido. Máximo de operações permitidas: {maximum_operations}</small> |
| <a id="RN0000022"></a>`RN0000022` | 400 | **Bad Request**<br/>It is not possible to carry out a batch renegotiation with different issuers.<br/><small>Não é possível realizar uma renegociação em lote com emissores diferentes.</small> |
| <a id="RN0000024"></a>`RN0000024` | 404 | **Not Found**<br/>Batch proposal not found.<br/><small>Batch proposal não encontrada.</small> |
| <a id="RN0000025"></a>`RN0000025` | 400 | **Bad Request**<br/>Batch Proposal cannot be canceled in current status.Status:{status}<br/><small>Proposta em lote não pode ser cancelada no status atual.Status:{status}</small> |
| <a id="RN0000026"></a>`RN0000026` | 400 | **Bad Request**<br/>Requester identifier key is already been used for another batch proposal.<br/><small>Requester identifier key ja está sendo utilizada para outra proposta em lote.</small> |
| <a id="RN0000027"></a>`RN0000027` | 400 | **Bad Request**<br/>The discount amount cannot be greater than the batch proposal payment amount: {payment_amount}.<br/><small>O valor do desconto não pode ser maior do que o valor de pagamento da renegociação em lote: {payment_amount}.</small> |
| <a id="RN0000028"></a>`RN0000028` | 400 | **Bad Request**<br/>Selected Installments for renegotiation must include the latest due dates.<br/><small>As parcelas selecionadas para renegociação devem incluir as últimas datas de vencimento.</small> |
| <a id="RN0000029"></a>`RN0000029` | 400 | **Bad Request**<br/>Amortization Type of collateral renegotiation must be Installment Payment.<br/><small>O tipo de amortização para a renegociação com colateral deve ser pagamento de parcelas.</small> |
| <a id="RN0000030"></a>`RN0000030` | 400 | **Bad Request**<br/>Discount amount field can<br/><small>O campo de valor de desconto não pode ser informado para a batch proposal e para as operações na mesma requisição.</small> |
| <a id="RN0000031"></a>`RN0000031` | 400 | **Bad Request**<br/>Installment payment amount can<br/><small>Valor de pagamento da parcela não pode ser 0. Installment_key: {installment_key}</small> |
| <a id="RN0000032"></a>`RN0000032` | 400 | **Bad Request**<br/>Payment amount cannot be greater than the disbursement amount.<br/><small>O valor do pagamento não pode ser maior que o valor de desembolso.</small> |
| <a id="RN0000033"></a>`RN0000033` | 400 | **Bad Request**<br/>Payment amount is not required for present amount amortization type.<br/><small>O valor do pagamento não é necessário para o tipo de amortização presente.</small> |
| <a id="RN0000034"></a>`RN0000034` | 400 | **Bad Request**<br/>Requester identifier key is already been used for another proposal.<br/><small>Requester identifier key ja está sendo utilizada para outra proposta.</small> |
| <a id="RN0000035"></a>`RN0000035` | 400 | **Bad Request**<br/>Invalid discount amount. Discount amount must be only interest discount.<br/><small>O valor do desconto é invalido. O valor do desconto deve ser apenas desconto de juros.</small> |
| <a id="RN0000036"></a>`RN0000036` | 500 | **Internal Server Error**<br/>Max retries set is too big to be executable.<br/><small>Número máximo de retentativas é muito grande.</small> |
| <a id="RN0000037"></a>`RN0000037` | 400 | **Bad Request**<br/>The payer document number does not match the employer document for the credit operation.<br/><small>O documento do pagador não corresponde ao documento do empregador para a operação de crédito.</small> |
| <a id="RN0000038"></a>`RN0000038` | 400 | **Renegotiation Errors**<br/>One or more operations failed.<br/><small>Uma ou mais operacoes falharam.</small> |

### SSC — Social Security

91 errors

| Code | HTTP | Message |
|-|-|-|
| <a id="SSC000001"></a>`SSC000001` | 404 | **Contract not Found**<br/>Contract {contract_number} not found in DataPrev<br/><small>Contrato {contract_number} não encontrado no DataPrev</small> |
| <a id="SSC000002"></a>`SSC000002` | 400 | **Contract not Found**<br/>Contract {contract_number} is not active<br/><small>Contrato {contract_number} não está ativo</small> |
| <a id="SSC000003"></a>`SSC000003` | 404 | **Benefits not Found**<br/>Benefits with key {benefits_key} was not found.<br/><small>A reserva com chave {benefits_key} não foi encontrada.</small> |
| <a id="SSC000004"></a>`SSC000004` | 404 | **Reservation not Found**<br/>Reservation with key {reservation_key} was not found.<br/><small>A reserva com chave {reservation_key} não foi encontrada.</small> |
| <a id="SSC000005"></a>`SSC000005` | 404 | **Document not Found**<br/>Document with key {document_key} was not found.<br/><small>O documento com chave {document_key} não foi encontrada.</small> |
| <a id="SSC000006"></a>`SSC000006` | 404 | **Balance not Found**<br/>Balance with key {balance_key} was not found.<br/><small>A consulta de saldo com chave {balance_key} não foi encontrada.</small> |
| <a id="SSC0000069"></a>`SSC0000069` | 404 | **Reservation not Found**<br/>Reservation with ID {reservation_id} was not found.<br/><small>A reserva com ID {reservation_id} não foi encontrada.</small> |
| <a id="SSC000007"></a>`SSC000007` | 403 | **Forbidden**<br/>There is not an active authorization for person {document_number}.<br/><small>Não existe uma autorização válida para a pessoa com cpf {document_number}.</small> |
| <a id="SSC0000071"></a>`SSC0000071` | 409 | **Reservation already locked**<br/>Reservation with key {reservation_key} is already locked being processed.<br/><small>A reserva com a key {reservation_key} já está bloqueada sendo processada.</small> |
| <a id="SSC0000072"></a>`SSC0000072` | 400 | **Refinancing contract cannot be reverted**<br/>Refinancing contract cannot be reverted after 7 working days from reservation.<br/><small>Contrato de refinanciamento não pode ser revertido após 7 dias úteis da reserva.</small> |
| <a id="SSC0000073"></a>`SSC0000073` | 400 | **The number of grace competencies is invalid**<br/>The number of grace competencies is invalid. The accepted range is 0 to 6<br/><small>O número da carência de competências está inválido. O intervalo aceito é de 0 a 6</small> |
| <a id="SSC000008"></a>`SSC000008` | 400 | **Bad Request**<br/>The term<br/><small>O documento do termo deve ser o mesmo do requisitado.</small> |
| <a id="SSC000009"></a>`SSC000009` | 400 | **Bad Request**<br/>Given {document_number} document number is invalid.<br/><small>CPF {document_number} fornecido não é valido.</small> |
| <a id="SSC000010"></a>`SSC000010` | 400 | **Bad Request**<br/>Contact phone data is missing<br/><small>Faltou informar os dados de telefone para contato</small> |
| <a id="SSC000011"></a>`SSC000011` | 400 | **Bad Request**<br/>Contact email data is missing<br/><small>Faltou informar os dados de email para contato</small> |
| <a id="SSC000012"></a>`SSC000012` | 400 | **Bad Request**<br/>Contact type attribute is required for signer object<br/><small>O atributo tipo de contato é necessário para o objeto assinante</small> |
| <a id="SSC000013"></a>`SSC000013` | 400 | **Bad Request**<br/>Cannot proceed with webhook from non signed document<br/><small>Não pode proceder com o webhook de um documento não assinado</small> |
| <a id="SSC000014"></a>`SSC000014` | 409 | **Bad Request**<br/>Term of signature is ineligible for signing<br/><small>O termo de assinatura é inelegivel para assinatura</small> |
| <a id="SSC000015"></a>`SSC000015` | 400 | **Bad Request**<br/>Values {invalid_types} are not valid document_types<br/><small>Valores {invalid_types} não são tipos de documentos válidos</small> |
| <a id="SSC000016"></a>`SSC000016` | 409 | **Reservation not deleted**<br/> |
| <a id="SSC000017"></a>`SSC000017` | 404 | **External key not Found**<br/>Reservation with external key {external_key} was not found.<br/><small>A reserva com chave externa {external_key} não foi encontrada.</small> |
| <a id="SSC000018"></a>`SSC000018` | 409 | **Reservation Status Conflict**<br/>Reservation with status<br/><small>Reservas no status</small> |
| <a id="SSC000020"></a>`SSC000020` | 400 | **Bad Request**<br/>Periods due date must occur in sub sequent months.<br/><small>Os períodos devem possuir datas em meses subsequentes.</small> |
| <a id="SSC000021"></a>`SSC000021` | 400 | **Bad Request**<br/>Given reservation must have more than 0 periods.<br/><small>A reserva precisa ter mais do que 0 períodos.</small> |
| <a id="SSC000022"></a>`SSC000022` | 400 | **Bad Request**<br/>Accrual date of the discount initiation needs to be equivalent to the current accrual date and the disbursement accrual date<br/><small>A data de competencia do inicio do desconto precisa ser equivalente a data de competencia atual e a data de competencia do desembolso</small> |
| <a id="SSC000023"></a>`SSC000023` | 400 | **Bad Request**<br/>DataPrev is closed and cannot process this request<br/><small>O DataPrev está fechado e não pode processar esse pedido.</small> |
| <a id="SSC000024"></a>`SSC000024` | 400 | **Bad Request**<br/>Portability Data is missing.<br/><small>Faltou informar os dados da portabilidade.</small> |
| <a id="SSC000025"></a>`SSC000025` | 400 | **Bad Request**<br/>The signer<br/><small>O assinante do termo precisa ser o beneficiario ou seu representante legal caso existente</small> |
| <a id="SSC000026"></a>`SSC000026` | 400 | **Bad Requests**<br/>Unexpected error from DataPrev.<br/><small>Erro inesperado do DataPrev</small> |
| <a id="SSC000027"></a>`SSC000027` | 429 | **Rate Limit Exceeded**<br/>DataPrev rate limit exceeded.<br/><small>Limite de requisições do DataPrev excedido.</small> |
| <a id="SSC000028"></a>`SSC000028` | 409 | **Conflict**<br/>Balance Request with status {status} cannot be retried.<br/><small>Consulta de margem com status {status} não pode ser retentado.</small> |
| <a id="SSC000029"></a>`SSC000029` | 409 | **Reservation Already Registered**<br/>Reservation with external key {external_key} already exists for requester {requester_key}<br/><small>Reserva com a chave externa {external_key} já está cadastrado para o requester {requester_key}</small> |
| <a id="SSC000030"></a>`SSC000030` | 404 | **Disbursement Option not Found**<br/>Disbursement option for {disbursement_date} was not found.<br/><small>Opção de desembolso para {disbursement_date} não foi encontrada.</small> |
| <a id="SSC000031"></a>`SSC000031` | 409 | **Conflict**<br/>Benefits Request with status {status} cannot be retried.<br/><small>Consulta de benefícios com status {status} não pode ser retentado.</small> |
| <a id="SSC000032"></a>`SSC000032` | 400 | **Bad Request**<br/>Refinancing Data is missing.<br/><small>Faltou informar os dados de refinanciamento.</small> |
| <a id="SSC000033"></a>`SSC000033` | 400 | **Bad Request**<br/>Refinancing Data is missing.<br/><small>Faltou informar os dados de refinanciamento.</small> |
| <a id="SSC000034"></a>`SSC000034` | 400 | **Bad Request**<br/>The Reservation(s) must be reserved in order to perform the refinancing.<br/><small>A(s) Reservas(s) não estão averbada(s) para realizar o refinanciamento.</small> |
| <a id="SSC000035"></a>`SSC000035` | 404 | **Reservation not Found**<br/>Reservation with external key {external_key} was not found.<br/><small>A reserva com chave externa {external_key} não foi encontrada.</small> |
| <a id="SSC000036"></a>`SSC000036` | 400 | **Bad Request**<br/>Trying to refinance<br/><small>Tentando refinanciar reserva com titularidade trocada.</small> |
| <a id="SSC000038"></a>`SSC000038` | 409 | **Discount Status Conflict**<br/>Discount with status<br/><small>Disconto no status</small> |
| <a id="SSC000040"></a>`SSC000040` | 404 | **Valid Balance not old than 15 days not Found**<br/>The valid balance enquire is outdated. The most recent balance is from {date}.<br/><small>A consulta de saldo é muito antiga. A consulta mais recente é de {date}.</small> |
| <a id="SSC000041"></a>`SSC000041` | 400 | **Bad Request**<br/>The benefit number {benefit_number} is {reason}<br/><small>O benefício {benefit_number} está {translation_dict[reason]}.</small> |
| <a id="SSC000042"></a>`SSC000042` | 404 | **Protocol not Found**<br/>Protocol with key {external_key} was not found.<br/><small>Protocolo com chave {external_key} não foi encontrada.</small> |
| <a id="SSC000043"></a>`SSC000043` | 404 | **Protocol not Found**<br/>Protocol with hash operation {hash_operation} was not found.<br/><small>Protocolo com hash de operação {hash_operation} não foi encontrada.</small> |
| <a id="SSC000044"></a>`SSC000044` | 400 | **Ivanlid protocol type**<br/>Protocol type {protocol_type} doesn<br/><small>Protocolo do tipo {protocol_type} não existe.</small> |
| <a id="SSC000045"></a>`SSC000045` | 409 |  |
| <a id="SSC000046"></a>`SSC000046` | 400 | **Bad Request**<br/>The INSS product is temporarily unavailable<br/><small>O produto INSS está temporariamente indisponível</small> |
| <a id="SSC000047"></a>`SSC000047` | 400 |  |
| <a id="SSC000048"></a>`SSC000048` | 500 |  |
| <a id="SSC000050"></a>`SSC000050` | 400 | **Invalid Contract Interest**<br/> |
| <a id="SSC000051"></a>`SSC000051` | 500 | **Internal Error**<br/>Erro while creating redis instances.<br/><small>Erro ao criar instâncias do redis.</small> |
| <a id="SSC000053"></a>`SSC000053` | 400 | **Reservation Cannot Be Suspended**<br/>Status {status}, reservation other than reserved status cannot be suspended<br/><small>Status {status}, reserva com status diferente de reservado não pode ser suspensa</small> |
| <a id="SSC000054"></a>`SSC000054` | 400 | **Document Submission Cannot Be Suspended**<br/>Reservation in document submission process, please try again later<br/><small>Reserva em processo de envio de documento, tente novamente mais tarde</small> |
| <a id="SSC000056"></a>`SSC000056` | 400 | **Reservation can**<br/> |
| <a id="SSC000057"></a>`SSC000057` | 400 | **Reservation can**<br/>Unknown success code: {code} to requested endpoint.<br/><small>Código de sucesso desconhecido: {code} para o endpoint requisitado.</small> |
| <a id="SSC000059"></a>`SSC000059` | 400 | **Reservation amount greater than available total balance**<br/>The installment face value: {reservation_amount} is greater than the available total balance (origin installment face value + available total balance):{total_amount_available}. Available total balance: {available_total_balance}.<br/><small>O valor da parcela: {reservation_amount} é maior que o valor total disponível (valor da parcela do contrato de origem + margem total disponível) : {total_amount_available}. Margem total diponível: {available_total_balance}.</small> |
| <a id="SSC000060"></a>`SSC000060` | 400 | **Invalid document size**<br/>The document: {document_type} should have at least 250x250px and at most 5MB.<br/><small>O documento: {document_type} deve ter no mínimo 250x250px e no máximo 5MB.</small> |
| <a id="SSC000061"></a>`SSC000061` | 400 | **Invalid document format**<br/>The document: {document_type} should be in JPEG format.<br/><small>O documento: {document_type} deve estar no formato JPEG.</small> |
| <a id="SSC000062"></a>`SSC000062` | 400 | **Status does not allow patch**<br/>Reservation {reservation_key} is on status {status_enum}. Which does not allow the field {field_name} to be changed<br/><small>Reserva {reservation_key} está no status {status_enum}. Portanto não pode ter o campo {field_name} alterado</small> |
| <a id="SSC000063"></a>`SSC000063` | 400 | **Broken Document**<br/>The document: {document_type} is truncated or broken.<br/><small>O documento: {document_type} está truncado ou corrompido.</small> |
| <a id="SSC000065"></a>`SSC000065` | 404 | **Balance not Found**<br/>Portability origin contract with key {origin_contract_key} was not found.<br/><small>Contrato de origem de portabilidade com chave {origin_contract_key} não foi encontrada.</small> |
| <a id="SSC000066"></a>`SSC000066` | 409 | **Conflict**<br/>Portability Origin Contract Request with status {status} cannot be retried.<br/><small>Contrato de Origem de Portabilidade com status {status} não pode ser retentado.</small> |
| <a id="SSC000067"></a>`SSC000067` | 409 | **Requester Configuration Already Exists**<br/>Requester configuration already exists.<br/><small>Configuração de solicitante já existe.</small> |
| <a id="SSC000068"></a>`SSC000068` | 400 | **Reservation can**<br/> |
| <a id="SSC000070"></a>`SSC000070` | 404 | **Portability Origin Contract not Found**<br/>Portability Origin Contract was not found.<br/><small>Contrato de origem de portabilidade não foi encontrado.</small> |
| <a id="SSC000074"></a>`SSC000074` | 404 | **Balance not Found**<br/>Balance with document number {document_number} was not found.<br/><small>A consulta de saldo com o cpf {document_number} não foi encontrada.</small> |
| <a id="SSC000075"></a>`SSC000075` | 400 | **Invalid last period due date**<br/>The last period due date<br/><small>A data de vencimento da última parcela</small> |
| <a id="SSC000076"></a>`SSC000076` | 400 | **Success balance request not found**<br/>A success balance request for the new benefit number<br/><small>Uma consulta de saldo válida para o novo número de benefício</small> |
| <a id="SSC000077"></a>`SSC000077` | 404 | **Balance not Found**<br/>Balance for document number {document_number} with benefit number {benefit_number} was not found.<br/><small>A consulta de saldo para o cpf {document_number} com número de benefício {benefit_number} não foi encontrada.</small> |
| <a id="SSC000078"></a>`SSC000078` | 404 | **Invalid Disbursement Date**<br/>Disbursement date for this operation is incorrect, it is not between the reservation limit and next accrual.<br/><small>A data de desembolso para esta operação está incorreta, ela não está entre a data limite de averbação e a próxima competência.</small> |
| <a id="SSC000079"></a>`SSC000079` | 400 | **Invalid Contract Interest Rate**<br/> |
| <a id="SSC000080"></a>`SSC000080` | 429 | **Rate limit exceeded**<br/> |
| <a id="SSC000081"></a>`SSC000081` | 404 | **Requester Configuration Not Found**<br/>Requester configuration<br/><small>Configuração de solicitante</small> |
| <a id="SSC000082"></a>`SSC000082` | 404 | **Bucket Configuration Not Found**<br/>Bucket configuration not found.<br/><small>Configuração de balde não encontrada.</small> |
| <a id="SSC000083"></a>`SSC000083` | 400 | **Reservation Failed**<br/>Last Response: {cancel_reason}, Tokens Available: {total_tokens}, Next Refill At: {next_refill_at}<br/><small>Última resposta: {cancel_reason}, Fichas disponíveis: {total_tokens}, Próxima Recarga: {next_refill_at}</small> |
| <a id="SSC000084"></a>`SSC000084` | 400 | **Bad Request**<br/>The reservation has already been processed and the status has changed to {reservation_status}, Available Tokens: {tokens}<br/><small>A reserva já foi processada e o status mudou para {reservation_status}, Fichas disponíveis: {tokens}</small> |
| <a id="SSC000085"></a>`SSC000085` | 400 | **Bad Request**<br/> |
| <a id="SSC000086"></a>`SSC000086` | 400 | **Bad request**<br/>Benefit with number {benefit_number} is too long or incorrect.<br/><small>Número de benefício {benefit_number} é muito longo ou está incorreto.</small> |
| <a id="SSC000087"></a>`SSC000087` | 400 | **Bad Request**<br/>Disbursement date {disbursement_date} is too old, update it.<br/><small>A data de desembolso {disbursement_date} é muito antiga, atualize-a.</small> |
| <a id="SSC000088"></a>`SSC000088` | 404 | **Reservation not Found**<br/>Reservation with contract key {contract_number} was not found.<br/><small>A reserva com chave de contrato {contract_number} não foi encontrada.</small> |
| <a id="SSC000089"></a>`SSC000089` | 404 | **Period not Found**<br/>Period with competence {competence} was not found.<br/><small>O período com competência {competence} não foi encontrado.</small> |
| <a id="SSC000090"></a>`SSC000090` | 400 | **Operation Canceled Without Installments**<br/>Operation canceled and without installments.<br/><small>Operação cancelada e sem parcelas.</small> |
| <a id="SSC000091"></a>`SSC000091` | 409 | **Refinanced Credit Operation inelegible**<br/>Operação refinanciada {refinanced_co_key} inelegível para refinaciamento.<br/><small>Refinanced Credit Operation {refinanced_co_key} inelegible for refinancing.</small> |
| <a id="SSC000092"></a>`SSC000092` | 400 | **Bad Request**<br/>The benefit number {benefit_number} is blocked by the beneficiary. blocked_date: {blocked_date}<br/><small>O benefício {benefit_number} está bloqueado pelo beneficiário. data de bloqueio: {blocked_date}</small> |
| <a id="SSC000093"></a>`SSC000093` | 400 | **Accrual not Found**<br/>Accrual with date {accrual_date} was not found. DATAPREV accrual calendar goes until december of the current year.<br/><small>A competência com data {accrual_date} não foi encontrada. O calendário de competência do DATAPREV vai até dezembro do ano atual.</small> |
| <a id="SSC000094"></a>`SSC000094` | 400 | **Suspension Reservation Failed**<br/>Suspension of reservation failed with http code {http_code}.<br/><small>Suspensão da reserva falhou com código http: {http_code}.</small> |
| <a id="SSC000095"></a>`SSC000095` | 400 | **Reservation Deleted With Canceled Operation**<br/>Reservation with external key {external_key} is deleted and credit operation is canceled.<br/><small>Reserva de external key {external_key} está deletada e operação de crédito está cancelada.</small> |
| <a id="SSC000096"></a>`SSC000096` | 501 | **Not Implemented**<br/>Not implemented<br/><small>Não implementado</small> |
| <a id="SSC000097"></a>`SSC000097` | 400 | **Deactivated Temporary**<br/>Deactivated temporary<br/><small>Desativado temporariamente</small> |
| <a id="SSC000098"></a>`SSC000098` | 400 | **Wrong reservation amount**<br/>New reservation amount {new_reservation_amount} is different from reservation amount to recalculate {reservation_amount_to_recalculate}.<br/><small>O novo valor da reserva {new_reservation_amount} é diferente do valor da reserva a ser recalculado {reservation_amount_to_recalculate}.</small> |
| <a id="SSC000099"></a>`SSC000099` | 408 | **Gateway Timeout**<br/>DataPrev did not respond in time. Please retry later.<br/><small>O DataPrev nao respondeu a tempo. Tente novamente mais tarde.</small> |

---

# Set disbursement date

URL: /en/documentation/emissao_de_divida/configurar_data_de_desembolso

## Request

ENDPOINT /debt/ DEBT-KEY /set_disbursement_date
METHOD POST

**body.json**

```json
{
    "disbursement_date": "2021-09-01",
    "disbursement_bank_account": {
        "name": "Pedro Felipe Henrique Alves",
        "bank_code": "329",
        "account_digit": "1",
        "branch_number": "001",
        "account_number": "94632180173",
        "document_number": "026.923.850-63"
    }
}

```

:::caution **Attention!**

If the issuance of debt with multiple dates is chosen, after the contract is signed, the disbursement date must be set through this endpoint.
:::

### PATH PARAMS

| Field | Type | Description |
|---|---| ---|
| `debt_key` * | string | Debt key returned at the moment of credit operation creation. |

### BODY PARAMS

| Field | Type | Description |Characters |
|---|---|---|---|
| `disbursement_date` * | date | Operation disbursement date. | 10 | 
| `disbursement_bank_account` | object | **[Object Disbursement Bank Account](#object-disbursement_bank_accounts)** - Bank account details for the operation disbursement. |  | 

### Object Disbursement Bank Account

Bank information for disbursement can be changed along with the disbursement date. By default, the disbursement is made to an account held by the debtor.

| Field                 | Type   | Description                                                                                          | Max. Caract. | 
|-----------------------|--------|----------------------------------------------------------------------------------------------------|--------------|
| name                  | string | Account owner's name                                                                           | 50           |
| document_number       | string | Account owner's CPF                                                                            | 11           |
| bank_code *           | string | Financial institution's COMPE code (https://www.bcb.gov.br/pom/spb/estatistica/port/ASTR003.pdf) | 3            |
| branch_number *       | string | Branch number (do not include the branch check digit!)                                  | 4            |
| account_number *      | string | Account number (without the account check digit!)                                               | 10           |
| account_digit *       | string | Account check digit (use zero in place of letters)                                     | 1            |
| account_type          | enum   | [Enumerador Account Type](#enumerador-account-type) Account type                                  | 1            |

## Response

STATUS 400

**body.json**

```json
{
  "key": "25dd0a85-dbd7-453f-9076-d776a9ef7c3a",
  "event_datetime": "2022-03-29 15:30:20",
  "data": {},
  "webhook_type": "debt",
  "status": "disbursement_date_set"
}

```

STATUS 400

**body.json**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Debt inquiry

URL: /en/documentation/emissao_de_divida/consulta_de_divida

## Request

ENDPOINT /debt
METHOD GET

:::caution Do not combine `total_due_balance` with `key`
`total_due_balance` only works in **filter-based queries** (without `key`). When you send the `key` parameter, the endpoint uses the individual lookup route, which **ignores** `total_due_balance` (and other filters) — that's why `balance_due` is not returned.

To get `balance_due`, query **without** `key`, using the other filters. Example:

```bash
GET /debt?total_due_balance=true&contract_number=0369255657%2FMGG&issuer_document_number=05739967929&page_size=10&page=1
```

The response comes as a **list** (`data: [...]`) and each item includes `balance_due`.
:::

## Response

STATUS 200

Response Body: Inquiry without DEBT-KEY

```json
{
  "data": [
    {
      "borrower": {
        "document_number": "68394265057",
        "name": "Xuxa Meneguel"
      },
      "contract_fee_amount": 5.56,
      "installments": [
        {
          "bank_slip_key": null,
          "calendar_days": 57,
          "due_date": "2020-09-30",
          "due_principal": -0.00217819,
          "fine_amount": null,
          "has_interest": true,
          "installment_key": "28eb5907-ed25-4a86-bb9d-b6dc944f13df",
          "installment_number": 1,
          "installment_status": "opened",
          "installment_type": "principal",
          "paid_amount": 0,
          "post_fixed_amount": 0,
          "pre_fixed_amount": 268.75782181,
          "principal_amortization_amount": 1111.9,
          "tax_amount": 0,
          "total_amount": 1380.66,
          "workdays": 40
        }
      ],
      "operation_key": "7986dcc7-4331-478f-af47-adfbdf7f4a36",
      "status": "opened"
    }
  ],
  "pagination": {
    "current_page": 1,
    "next_page": null,
    "rows_per_page": 100,
    "total_pages": 1,
    "total_rows": 55
  }
}

```

Response Body: Inquiry with DEBT-KEY

```json
{
  "data": {
    "additional_iof": 11.547136,
    "after_disbursement_actions": [],
    "all_day_disbursement": true,
    "annual_cet": 41.0883,
    "assigned": false,
    "assigned_at": null,
    "assignment_amount": 3038.72,
    "attached_document_list": [
      {
        "created_at": "2022-10-19T11:53:01",
        "document_key": "5df59dca-b8d1-4dca-8358-8b4bd944f3dc",
        "document_type": {
          "enumerator": "document_identification",
          "translation_path": "co.DocumentType.document_identification"
        },
        "document_url": "https://storage.googleapis.com/sandbox-doc-api/documents/5df59dca-b8d1-4dca-8358-8b4bd944f3dc/image_1666180300436.jpg",
        "related_party_key": null,
        "signature_required": false,
        "signature_url": null,
        "signed": false
      }
    ],
    "balance_due": 3150.62,
    "base_iof": 27.17569413,
    "calculus_correction": null,
    "central_depository": null,
    "cet": 2.91,
    "cetip_assignments": [],
    "cetip_settlements": [],
    "collateral_constituted": true,
    "collateral_type": null,
    "collaterals": [],
    "contract_fee_amount": 0,
    "contract_fees": [],
    "contract_number": "TESTE118261",
    "created_at": "2022-10-19T11:53:00",
    "credit_operation_key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
    "credit_operation_status": {
      "enumerator": "opened",
      "translation_path": "co.CreditOperationStatus.opened",
      "translation_ptbr": "Desembolsada"
    },
    "credit_operation_type": {
      "enumerator": "ccb",
      "translation_path": "co.CreditOperationType.ccb"
    },
    "credit_rating": null,
    "creditor_bank_account_key": "5d068423-6094-49e4-b15b-7740038295a8",
    "custodian": {
      "enumerator": "qi_scd",
      "translation_path": "co.Custodian.qi_scd"
    },
    "decimal_annual_cet": 0.43241941956989105,
    "decimal_cet": 0.0304,
    "disburse_before_assign": true,
    "disbursed_at": "2022-10-19T11:54:47",
    "disbursed_issue_amount": 3000,
    "disbursement_account": [
      {
        "account_branch": "1234",
        "account_digit": "1",
        "account_number": "2345678601",
        "account_type": "checking_account",
        "amount_receivable": null,
        "created_at": "2022-10-19T11:53:01",
        "digitable_line": null,
        "disbursement_type": "pix",
        "document_number": "92147661180",
        "financial_institutions": {
          "code_number": 104,
          "is_active": true,
          "is_pix_participant": true,
          "ispb": "00360305",
          "name": "CAIXA ECONOMICA FEDERAL"
        },
        "financial_institutions_code_number": 104,
        "is_pix_disbursement": true,
        "ispb": "00360305",
        "name": "104 CAIXA ECONOMICA FEDERAL",
        "percentage_receivable": 100,
        "pix_key": null,
        "pix_transfer_key": "da80477f-412e-40a5-81b0-c830b238081e",
        "pix_type": "manual",
        "qr_code_key": null,
        "retry_counter": 0,
        "retry_vector": null,
        "transaction_key": null,
        "webhook_key": null
      }
    ],
    "disbursement_callback": {
      "installments": [
        {
          "bank_slip_key": "9d8c566a-c865-495e-8764-db8351e7ac41",
          "digitable_line": "32990001031000699925348000000207991730000055231",
          "due_date": "2022-11-18",
          "qr_code_key": "bdd41d56-8588-4468-9705-5233994cdc39",
          "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/bdd41d56-8588-4468-9705-5233994cdc395204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63044F44"
        }
      ],
      "key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
      "origin_type": "lego-api",
      "status": "opened",
      "transaction_receipts": [
        {
          "amount": 3000,
          "description": "00360305 1234 2345678601-1 92147661180 - 104 CAIXA ECONOMICA FEDERAL",
          "destination": {
            "account_digit": "1",
            "account_number": "2345678601",
            "bank_ispb": "00360305",
            "branch": "1234",
            "branch_digit": null,
            "document": "92147661180",
            "name": "104 CAIXA ECONOMICA FEDERAL",
            "purpose": "Crédito PIX em Conta",
            "type": "checking_account"
          },
          "fee": 0,
          "origin": {
            "account_branch": "0001",
            "account_digit": "5",
            "account_key": "5d068423-6094-49e4-b15b-7740038295a8",
            "account_number": "00002",
            "bank_code": "329",
            "branch": "0001",
            "branch_digit": null,
            "document": "32402502000135",
            "name": "QI SOCIEDADE DE CRÉDITO DIRETO S.A.",
            "type": "payment_account"
          },
          "origin_transaction_key": null,
          "timestamp": "2022-10-19T11:55:03",
          "transaction_key": "da80477f-412e-40a5-81b0-c830b238081e"
        }
      ]
    },
    "disbursement_confirmed_at": "2022-10-20T13:00:56",
    "disbursement_date": "2022-10-19",
    "disbursement_end_date": "2022-10-19",
    "disbursement_inelegibility_reason": null,
    "disbursement_inelegibility_reason_issued": null,
    "disbursement_options": [
      {
        "additional_iof": 11.547136,
        "annual_cet": 41.0883,
        "assignment_amount": 3038.72,
        "base_iof": 27.17569413,
        "calculus_correction": null,
        "cet": 2.91,
        "contract_fee_amount": 0,
        "contract_fees": [],
        "created_at": "2022-10-19T11:53:01",
        "disbursed_issue_amount": 3000,
        "disbursement_date": "2022-10-19",
        "external_contract_fee_amount": 0,
        "external_contract_fees": [],
        "first_due_date": "2022-11-18",
        "installments": [
          {
            "additional_costs": [],
            "business_due_date": "2022-11-21",
            "calendar_days": 30,
            "created_at": "2022-10-19T11:53:01",
            "due_date": "2022-11-18",
            "due_interest": 0,
            "due_principal": 3038.72,
            "fine_amount": null,
            "has_interest": true,
            "installment_number": 1,
            "post_fixed_amount": 0,
            "pre_fixed_amount": 75.66402982,
            "principal_amortization_amount": 476.64597018,
            "tax_amount": 1.17254909,
            "total_amount": 552.31,
            "workdays": 20
          }
        ],
        "interest_subsidy_amount": 0,
        "issue_amount": 3038.72,
        "net_external_contract_fee_amount": 0,
        "prefixed_interest_rate": null,
        "share_quantity": 4,
        "total_iof": 38.72
      }
    ],
    "disbursement_start_date": "2022-10-19",
    "document_certifier": {
      "enumerator": "electronic_client_side",
      "translation_path": "co.DocumentCertifier.electronic_client_side"
    },
    "early_settlement_configuration": {
      "created_at": "2022-10-19T11:53:00",
      "early_settlement_configuration_type": {
        "enumerator": "fixed_rate",
        "translation_path": "co.EarlySettlementConfigurationType.fixed_rate"
      },
      "effective_end_date": null,
      "fixed_interest_rate": 0
    },
    "endorsement": null,
    "entry": null,
    "events": [],
    "external_contract_fee_amount": 0,
    "external_contract_fees": [],
    "extra_fields": null,
    "facial_biometrics_enabled": false,
    "final_disbursement_amount": 3000,
    "financial_index": null,
    "fine_configuration": {
      "contract_fine_rate": 0.02,
      "created_at": "2022-10-19T11:53:00",
      "fine_delay_rate": {
        "annual_rate": 0.12682503,
        "created_at": "2022-10-19T11:53:00",
        "daily_rate": 0.00033173,
        "interest_base": {
          "enumerator": "calendar_days",
          "translation_path": "co.InterestBase.calendar_days",
          "year_days": 360
        },
        "monthly_rate": 0.01
      }
    },
    "first_due_date": "2022-11-18",
    "first_due_date_delay": null,
    "if_code": null,
    "installments": [
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": "9d8c566a-c865-495e-8764-db8351e7ac41",
        "business_due_date": "2022-11-21",
        "calendar_days": 30,
        "cetip_settlements": [],
        "created_at": "2022-10-19T11:53:00",
        "digitable_line": "32990001031000699925348000000207991730000055231",
        "due_date": "2022-11-18",
        "due_interest": 0,
        "due_principal": 3038.72,
        "events": [
          {
            "amount": null,
            "created_at": "2022-10-19T11:54:47",
            "event_date": "2022-10-19T11:54:47",
            "installment_event_type": {
              "enumerator": "open",
              "translation_path": "co.InstallmentEventType.open"
            },
            "installment_old_status": {
              "enumerator": "created",
              "translation_path": "co.InstallmentStatus.created"
            },
            "old_due_date": null
          },
          {
            "amount": null,
            "created_at": "2022-11-18T08:00:10",
            "event_date": "2022-11-18T08:00:10",
            "installment_event_type": {
              "enumerator": "maturity",
              "translation_path": "co.InstallmentEventType.maturity"
            },
            "installment_old_status": {
              "enumerator": "opened",
              "translation_path": "co.InstallmentStatus.opened"
            },
            "old_due_date": null
          },
          {
            "amount": 11.76,
            "created_at": "2022-11-22T08:00:14",
            "event_date": "2022-11-22T08:00:14",
            "installment_event_type": {
              "enumerator": "delay_fine",
              "translation_path": "co.InstallmentEventType.delay_fine"
            },
            "installment_old_status": {
              "enumerator": "waiting_payment",
              "translation_path": "co.InstallmentStatus.waiting_payment"
            },
            "old_due_date": null
          },
          {
            "amount": 11.94,
            "created_at": "2022-11-23T09:13:46",
            "event_date": "2022-11-23T09:13:46",
            "installment_event_type": {
              "enumerator": "delay_fine",
              "translation_path": "co.InstallmentEventType.delay_fine"
            },
            "installment_old_status": {
              "enumerator": "overdue",
              "translation_path": "co.InstallmentStatus.overdue"
            },
            "old_due_date": null
          },
          {
            "amount": 12.12,
            "created_at": "2022-11-24T09:15:55",
            "event_date": "2022-11-24T09:15:55",
            "installment_event_type": {
              "enumerator": "delay_fine",
              "translation_path": "co.InstallmentEventType.delay_fine"
            },
            "installment_old_status": {
              "enumerator": "overdue",
              "translation_path": "co.InstallmentStatus.overdue"
            },
            "old_due_date": null
          },
          {
            "amount": 12.3,
            "created_at": "2022-11-25T09:24:45",
            "event_date": "2022-11-25T09:24:44",
            "installment_event_type": {
              "enumerator": "delay_fine",
              "translation_path": "co.InstallmentEventType.delay_fine"
            },
            "installment_old_status": {
              "enumerator": "overdue",
              "translation_path": "co.InstallmentStatus.overdue"
            },
            "old_due_date": null
          },
          {
            "amount": 12.84,
            "created_at": "2022-11-28T09:37:41",
            "event_date": "2022-11-28T09:37:41",
            "installment_event_type": {
              "enumerator": "delay_fine",
              "translation_path": "co.InstallmentEventType.delay_fine"
            },
            "installment_old_status": {
              "enumerator": "overdue",
              "translation_path": "co.InstallmentStatus.overdue"
            },
            "old_due_date": null
          },
          {
            "amount": 13.02,
            "created_at": "2022-11-29T09:17:44",
            "event_date": "2022-11-29T09:17:44",
            "installment_event_type": {
              "enumerator": "delay_fine",
              "translation_path": "co.InstallmentEventType.delay_fine"
            },
            "installment_old_status": {
              "enumerator": "overdue",
              "translation_path": "co.InstallmentStatus.overdue"
            },
            "old_due_date": null
          }
        ],
        "fine_amount": 13.02,
        "has_interest": true,
        "installment_key": "1d76836e-1fcc-4b67-8c01-64faa43de9c8",
        "installment_number": 1,
        "installment_payment": [],
        "installment_status": {
          "enumerator": "overdue",
          "translation_path": "co.InstallmentStatus.overdue"
        },
        "installment_type": {
          "enumerator": "principal",
          "translation_path": "co.InstallmentType.principal"
        },
        "original_due_principal": 3038.72,
        "original_pre_fixed_amount": 75.66402982,
        "original_principal_amortization_amount": 476.64597018,
        "original_total_amount": 552.31,
        "paid_amount": 0,
        "paid_at": null,
        "payment_type": {
          "enumerator": "bankslip",
          "translation_path": "co.PaymentType.bankslip"
        },
        "post_fixed_amount": 0,
        "pre_fixed_amount": 75.66402982,
        "principal_amortization_amount": 476.64597018,
        "qr_code_key": "bdd41d56-8588-4468-9705-5233994cdc39",
        "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/bdd41d56-8588-4468-9705-5233994cdc395204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63044F44",
        "renegotiation_proposal_key": null,
        "tax_amount": 1.17254909,
        "total_accrual_amount": null,
        "total_amount": 565.33,
        "total_paid_amount": 0,
        "updated_at": "2022-11-29T09:17:44",
        "workdays": 20
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": "527835e4-7b09-42f2-a7d0-befed3a326fd",
        "business_due_date": "2022-12-20",
        "calendar_days": 31,
        "cetip_settlements": [],
        "created_at": "2022-10-19T11:53:00",
        "digitable_line": "32990001031000699925349000000205492040000055231",
        "due_date": "2022-12-19",
        "due_interest": 0,
        "due_principal": 2562.07402982,
        "events": [
          {
            "amount": null,
            "created_at": "2022-10-19T11:54:47",
            "event_date": "2022-10-19T11:54:47",
            "installment_event_type": {
              "enumerator": "open",
              "translation_path": "co.InstallmentEventType.open"
            },
            "installment_old_status": {
              "enumerator": "created",
              "translation_path": "co.InstallmentStatus.created"
            },
            "old_due_date": null
          }
        ],
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "dde36938-8594-4507-a87d-cd2dd5309817",
        "installment_number": 2,
        "installment_payment": [],
        "installment_status": {
          "enumerator": "opened",
          "translation_path": "co.InstallmentStatus.opened"
        },
        "installment_type": {
          "enumerator": "principal",
          "translation_path": "co.InstallmentType.principal"
        },
        "original_due_principal": 2562.07402982,
        "original_pre_fixed_amount": 65.94922003,
        "original_principal_amortization_amount": 486.36077997,
        "original_total_amount": 552.31,
        "paid_amount": 0,
        "paid_at": null,
        "payment_type": {
          "enumerator": "bankslip",
          "translation_path": "co.PaymentType.bankslip"
        },
        "post_fixed_amount": 0,
        "pre_fixed_amount": 65.94922003,
        "principal_amortization_amount": 486.36077997,
        "qr_code_key": "9d2980e9-fa0c-4b21-a7c5-5ca266c9aba8",
        "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/9d2980e9-fa0c-4b21-a7c5-5ca266c9aba85204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***6304FBC3",
        "renegotiation_proposal_key": null,
        "tax_amount": 2.43277662,
        "total_accrual_amount": null,
        "total_amount": 552.31,
        "total_paid_amount": 0,
        "updated_at": "2022-10-19T11:56:43",
        "workdays": 21
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": "d69c9ab6-01f1-40bb-9519-a06ee2230c22",
        "business_due_date": "2023-01-19",
        "calendar_days": 30,
        "cetip_settlements": [],
        "created_at": "2022-10-19T11:53:00",
        "digitable_line": "32990001031000699925350000000203192340000055231",
        "due_date": "2023-01-18",
        "due_interest": 0,
        "due_principal": 2075.71324985,
        "events": [
          {
            "amount": null,
            "created_at": "2022-10-19T11:54:47",
            "event_date": "2022-10-19T11:54:47",
            "installment_event_type": {
              "enumerator": "open",
              "translation_path": "co.InstallmentEventType.open"
            },
            "installment_old_status": {
              "enumerator": "created",
              "translation_path": "co.InstallmentStatus.created"
            },
            "old_due_date": null
          }
        ],
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "93273ee0-71bd-46a6-b5e2-39e03a365b16",
        "installment_number": 3,
        "installment_payment": [],
        "installment_status": {
          "enumerator": "opened",
          "translation_path": "co.InstallmentStatus.opened"
        },
        "installment_type": {
          "enumerator": "principal",
          "translation_path": "co.InstallmentType.principal"
        },
        "original_due_principal": 2075.71324985,
        "original_pre_fixed_amount": 51.68519286,
        "original_principal_amortization_amount": 500.62480714,
        "original_total_amount": 552.31,
        "paid_amount": 0,
        "paid_at": null,
        "payment_type": {
          "enumerator": "bankslip",
          "translation_path": "co.PaymentType.bankslip"
        },
        "post_fixed_amount": 0,
        "pre_fixed_amount": 51.68519286,
        "principal_amortization_amount": 500.62480714,
        "qr_code_key": "d79eb27b-7a1e-4d4c-94a1-f20045c4904e",
        "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/d79eb27b-7a1e-4d4c-94a1-f20045c4904e5204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***6304E949",
        "renegotiation_proposal_key": null,
        "tax_amount": 3.73566231,
        "total_accrual_amount": null,
        "total_amount": 552.31,
        "total_paid_amount": 0,
        "updated_at": "2022-10-19T11:56:43",
        "workdays": 22
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": "5c62c50f-5326-4226-b154-a0cc6d2f62e7",
        "business_due_date": "2023-02-23",
        "calendar_days": 35,
        "cetip_settlements": [],
        "created_at": "2022-10-19T11:53:00",
        "digitable_line": "32990001031000699925351000000201192690000055231",
        "due_date": "2023-02-22",
        "due_interest": 0,
        "due_principal": 1575.08844271,
        "events": [
          {
            "amount": null,
            "created_at": "2022-10-19T11:54:47",
            "event_date": "2022-10-19T11:54:47",
            "installment_event_type": {
              "enumerator": "open",
              "translation_path": "co.InstallmentEventType.open"
            },
            "installment_old_status": {
              "enumerator": "created",
              "translation_path": "co.InstallmentStatus.created"
            },
            "old_due_date": null
          }
        ],
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "1f7b16fe-04b6-4f07-a807-eb3501e44e0d",
        "installment_number": 4,
        "installment_payment": [],
        "installment_status": {
          "enumerator": "opened",
          "translation_path": "co.InstallmentStatus.opened"
        },
        "installment_type": {
          "enumerator": "principal",
          "translation_path": "co.InstallmentType.principal"
        },
        "original_due_principal": 1575.08844271,
        "original_pre_fixed_amount": 45.8505547,
        "original_principal_amortization_amount": 506.4594453,
        "original_total_amount": 552.31,
        "paid_amount": 0,
        "paid_at": null,
        "payment_type": {
          "enumerator": "bankslip",
          "translation_path": "co.PaymentType.bankslip"
        },
        "post_fixed_amount": 0,
        "pre_fixed_amount": 45.8505547,
        "principal_amortization_amount": 506.4594453,
        "qr_code_key": "b55464c8-3764-4ee2-a814-ce22396aabe7",
        "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/b55464c8-3764-4ee2-a814-ce22396aabe75204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63044215",
        "renegotiation_proposal_key": null,
        "tax_amount": 5.23273899,
        "total_accrual_amount": null,
        "total_amount": 552.31,
        "total_paid_amount": 0,
        "updated_at": "2022-10-19T11:56:43",
        "workdays": 23
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": "256be15f-dcc6-4775-8298-c3efde5a1147",
        "business_due_date": "2023-03-21",
        "calendar_days": 26,
        "cetip_settlements": [],
        "created_at": "2022-10-19T11:53:00",
        "digitable_line": "32990001031000699925352000000209192950000055231",
        "due_date": "2023-03-20",
        "due_interest": 0,
        "due_principal": 1068.62899741,
        "events": [
          {
            "amount": null,
            "created_at": "2022-10-19T11:54:47",
            "event_date": "2022-10-19T11:54:47",
            "installment_event_type": {
              "enumerator": "open",
              "translation_path": "co.InstallmentEventType.open"
            },
            "installment_old_status": {
              "enumerator": "created",
              "translation_path": "co.InstallmentStatus.created"
            },
            "old_due_date": null
          }
        ],
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "3ed37dc1-61f8-44f1-af21-a55f0cf0795d",
        "installment_number": 5,
        "installment_payment": [],
        "installment_status": {
          "enumerator": "opened",
          "translation_path": "co.InstallmentStatus.opened"
        },
        "installment_type": {
          "enumerator": "principal",
          "translation_path": "co.InstallmentType.principal"
        },
        "original_due_principal": 1068.62899741,
        "original_pre_fixed_amount": 23.02305805,
        "original_principal_amortization_amount": 529.28694195,
        "original_total_amount": 552.31,
        "paid_amount": 0,
        "paid_at": null,
        "payment_type": {
          "enumerator": "bankslip",
          "translation_path": "co.PaymentType.bankslip"
        },
        "post_fixed_amount": 0,
        "pre_fixed_amount": 23.02305805,
        "principal_amortization_amount": 529.28694195,
        "qr_code_key": "64e05528-83fb-432a-8af7-491ca4eb7b90",
        "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/64e05528-83fb-432a-8af7-491ca4eb7b905204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***630472F7",
        "renegotiation_proposal_key": null,
        "tax_amount": 6.59703244,
        "total_accrual_amount": null,
        "total_amount": 552.31,
        "total_paid_amount": 0,
        "updated_at": "2022-10-19T11:56:43",
        "workdays": 18
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": "a8c2edaa-ed3d-4c5b-808e-b26947a5e79e",
        "business_due_date": "2023-04-19",
        "calendar_days": 29,
        "cetip_settlements": [],
        "created_at": "2022-10-19T11:53:01",
        "digitable_line": "32990001031000699925353000000207293240000055232",
        "due_date": "2023-04-18",
        "due_interest": 0,
        "due_principal": 539.34205545,
        "events": [
          {
            "amount": null,
            "created_at": "2022-10-19T11:54:47",
            "event_date": "2022-10-19T11:54:47",
            "installment_event_type": {
              "enumerator": "open",
              "translation_path": "co.InstallmentEventType.open"
            },
            "installment_old_status": {
              "enumerator": "created",
              "translation_path": "co.InstallmentStatus.created"
            },
            "old_due_date": null
          }
        ],
        "fine_amount": null,
        "has_interest": true,
        "installment_key": "2b58b2be-89cd-4710-a6a5-81180938b501",
        "installment_number": 6,
        "installment_payment": [],
        "installment_status": {
          "enumerator": "opened",
          "translation_path": "co.InstallmentStatus.opened"
        },
        "installment_type": {
          "enumerator": "principal",
          "translation_path": "co.InstallmentType.principal"
        },
        "original_due_principal": 539.34205545,
        "original_pre_fixed_amount": 12.97660456,
        "original_principal_amortization_amount": 539.34339544,
        "original_total_amount": 552.32,
        "paid_amount": 0,
        "paid_at": null,
        "payment_type": {
          "enumerator": "bankslip",
          "translation_path": "co.PaymentType.bankslip"
        },
        "post_fixed_amount": 0,
        "pre_fixed_amount": 12.97660456,
        "principal_amortization_amount": 539.34339544,
        "qr_code_key": "dcc7d257-e6a1-4d0a-88f7-1acf662482b5",
        "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/dcc7d257-e6a1-4d0a-88f7-1acf662482b55204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***6304C9A1",
        "renegotiation_proposal_key": null,
        "tax_amount": 8.00493468,
        "total_accrual_amount": null,
        "total_amount": 552.32,
        "total_paid_amount": 0,
        "updated_at": "2022-10-19T11:56:43",
        "workdays": 20
      }
    ],
    "interest_grace_period": 0,
    "interest_payment_month_period": 1,
    "interest_subsidy_amount": 0,
    "interest_subsidy_percentage": 0,
    "interest_type": {
      "enumerator": "pre_price_days",
      "translation_path": "co.InterestType.pre_price_days"
    },
    "iof_charge_method": "financed",
    "ipoc_code": "324025020203192147661180DiDi118261",
    "is_allowed_to_disburse": true,
    "is_portability": false,
    "is_refinancing": 0,
    "isin_number": null,
    "issue_amount": 3038.72,
    "issue_date": "2022-10-19",
    "issuer_document_number": "92147661180",
    "issuer_name": "Wxy  Wsx",
    "kyc": null,
    "modality": {
      "code": "0203",
      "description": "crédito pessoal - sem consignação em folha de pagam.",
      "enumerator": null,
      "visible": true
    },
    "net_external_contract_fee_amount": 0,
    "next_due_date": "2022-12-19",
    "number_of_installments": 6,
    "operation_extra_fields": null,
    "operation_type": {
      "enumerator": "structured_operation",
      "translation_path": "co.OperationType.structured_operation"
    },
    "origin_key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
    "origin_type": {
      "enumerator": "lego-api",
      "translation_path": "co.OriginType.lego-api"
    },
    "original_prefixed_interest_rate": {
      "annual_rate": 0.34331516,
      "created_at": "2022-10-19T11:53:00",
      "daily_rate": 0.00082017,
      "interest_base": {
        "enumerator": "calendar_days",
        "translation_path": "co.InterestBase.calendar_days",
        "year_days": 360
      },
      "monthly_rate": 0.0249
    },
    "original_total_iof": 38.72,
    "payment_and_settlement_agent": {
      "enumerator": "qi_scd",
      "translation_path": "co.PaymentAndSettlementAgent.qi_scd"
    },
    "payment_type": {
      "enumerator": "bankslip",
      "translation_path": "co.PaymentType.bankslip"
    },
    "payroll_data": null,
    "portability_amount": null,
    "portability_financial_institution_code_number": null,
    "portability_original_contract": null,
    "post_fixed_interest_base": {
      "enumerator": "workdays",
      "translation_path": "co.InterestBase.workdays",
      "year_days": 252
    },
    "post_fixed_interest_rate": null,
    "prefixed_interest_rate": {
      "annual_rate": 0.34331516,
      "created_at": "2022-10-19T11:53:00",
      "daily_rate": 0.00082017,
      "interest_base": {
        "enumerator": "calendar_days",
        "translation_path": "co.InterestBase.calendar_days",
        "year_days": 360
      },
      "monthly_rate": 0.0249
    },
    "principal_amortization_month_period": 1,
    "principal_grace_period": 0,
    "purchaser_document_number": "32402502000135",
    "rebate_account": null,
    "refinanced_credit_operations": [],
    "registration_institution": {
      "enumerator": "qi_scd",
      "translation_path": "co.RegistrationInstitution.qi_scd"
    },
    "related_party_list": [
      {
        "address": {
          "city": "Aguascalientes",
          "complement": null,
          "created_at": "2022-10-19T11:52:59",
          "neighborhood": "Aguascalientes",
          "number": "1",
          "postal_code": "20000000",
          "state": "SP",
          "street": "Zona Centro"
        },
        "attached_document_list": [
          {
            "created_at": "2022-10-19T11:53:01",
            "document_key": "5df59dca-b8d1-4dca-8358-8b4bd944f3dc",
            "document_type": {
              "enumerator": "document_identification",
              "translation_path": "co.DocumentType.document_identification"
            },
            "document_url": "https://storage.googleapis.com/sandbox-doc-api/documents/5df59dca-b8d1-4dca-8358-8b4bd944f3dc/image_1666180300436.jpg",
            "related_party_key": null,
            "signature_required": false,
            "signature_url": null,
            "signed": false
          }
        ],
        "birth_date": "1997-10-19",
        "birth_place": null,
        "cnae_code": null,
        "company_document_number": null,
        "created_at": "2022-10-19T11:53:01",
        "document_identification_date": null,
        "document_identification_number": "",
        "document_identification_type": null,
        "email": "wxr@ff.com",
        "foundation_date": null,
        "gender": null,
        "income": 0.01,
        "individual_document_number": "92147661180",
        "is_pep": false,
        "marital_status": {
          "enumerator": "single",
          "translation_path": "co.MaritalStatus.single"
        },
        "mother_name": null,
        "name": "Wxy  Wsx",
        "nationality": "nationality",
        "person_type": "natural",
        "phone": {
          "area_code": "00",
          "country_code": "055",
          "created_at": "2022-10-19T11:53:00",
          "number": "016048311",
          "phone_key": "341d7c67-963c-49a5-b585-265425d71f52",
          "phone_type": null
        },
        "profession": null,
        "property_system": null,
        "related_party_key": "203b2ada-ff3e-44a6-a843-f244aa1afbc9",
        "revenue": null,
        "role_type": {
          "enumerator": "issuer",
          "translation_path": "co.RoleType.issuer"
        },
        "simples_nacional_participant": null,
        "spouse_document_number": null,
        "trading_name": null
      }
    ],
    "requester_identifier_key": "89bb875a4a654ecfbad0c6ce0b3b5037",
    "requester_key": "75f2ab85-a5ce-40b9-9b1e-915175906d78",
    "requester_name": "DiDi Global (99Pay)",
    "resource_source_account": {
      "enumerator": "third_party",
      "translation_path": "co.ResourceSourceAccount.third_party"
    },
    "selfie_enabled": false,
    "settlement_bank_account_key": null,
    "share_quantity": 4,
    "signature_method": {
      "enumerator": "email"
    },
    "tax_configuration": {
      "created_at": "2019-03-15T13:09:32",
      "iof_additional_rate": 0.0038,
      "iof_rate": 0.000082
    },
    "tax_exempt_amount": null,
    "third_party_account_key": "5d068423-6094-49e4-b15b-7740038295a8",
    "total_iof": 38.72
  },
  "operation_key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
  "status": "opened",
  "webhook_type": "signed_debt"
}

```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

## Query Params
| Field | Type | Description                                                   | Characters |
|---|---|---------------------------------------------------------------| ---|
| `key` | string | Debt key returned at the moment of credit operation creation. | - |
| `requester_identifier_key` | string | Unique UUID4 key sent in credit operation creation payload.   | - |
| `issuer_document_number` | string | Número de documento do emitente.                              | - |
| `issuer_name` | string | Issuer's document number.                                     | - |
| `status` | string | Operation status.                                             | - |
| `page` | string | Current page being queried.                                   | - |
| `page_size` | string | Number of results that fit on the page.                       | - |
| `total_due_balance` | boolean | When sent as `true`, includes the `balance_due` field (operation's total outstanding balance) in the response. By default (`false` or absent), `balance_due` is **not** returned. | - |

:::tip Outstanding balance (`balance_due`)
The `balance_due` field represents the operation's total outstanding balance and is **only returned when the query is made with the `total_due_balance=true` parameter**. Without it, the response does not include the outstanding balance.

Example request:

```bash
GET /debt?contract_number=ABC1234&total_due_balance=true
```
:::

---

# Debt Query by Contract Number

URL: /en/documentation/emissao_de_divida/consulta_por_contract_number

## Request

ENDPOINT /v2/credit_operation/contract_number/ CONTRACT-NUMBER
METHOD GET

## ⚠️ Important Note

If the contract number contains a forward slash (`/`), it is necessary to **encode the slash** as `%2F`.

### Practical example
**Original input:**
```
contract_number = 02159312/FGP
```

**Should be sent as:**
```
02159312%2FFGP
```

### Python example for encoding:
```python
import urllib.parse

contract_number = "02159312/FGP"
encoded_contract_number = urllib.parse.quote(contract_number)
print(encoded_contract_number)  # 02159312%2FFGP
```

:::

### Path params

| Field | Type | Description | Characters |
|---|---|---|---|   
| `contract_number` * | string | Credit contract number. | string |

## Response

STATUS 200

Response Body

```json
{
  "credit_operation_key": "eaf5836a-ea6f-4baa-ac26-ce5199dfa448",
  "issue_amount": 1006.77,
  "origin_key": "52539e23-5c01-4b9c-8a68-6ed750ec7bc5",
  "assigned_at": "2025-08-24T10:00:00Z",
  "total_iof": 6.77,
  "disbursement_start_date": "2022-08-24",
  "disbursement_end_date": "2022-08-24",
  "issue_date": "2022-08-24",
  "requester_identifier_key": "5cb7456c-f2e3-41b3-b17a-ad47ba3c3cda",
  "installments": [
    {
      "business_due_date": "2022-08-30",
      "due_date": "2022-08-29",
      "calendar_days": 5,
      "due_interest": 0,
      "due_principal": 1006.77,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 18.93,
      "principal_amortization_amount": 363.14,
      "tax_amount": 0.15,
      "total_amount": 382.07,
      "workdays": 3,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "b56f61ec-202c-4a7a-8a5e-11f90972bae8",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 1006.77,
      "original_pre_fixed_amount": 18.93,
      "original_principal_amortization_amount": 363.14,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 1,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    },
    {
      "business_due_date": "2022-09-30",
      "due_date": "2022-09-29",
      "calendar_days": 31,
      "due_interest": 0,
      "due_principal": 643.63499424,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 78.82,
      "principal_amortization_amount": 303.25,
      "tax_amount": 0.9,
      "total_amount": 382.07,
      "workdays": 22,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "2a95a560-bec6-4207-9a38-98c72e023c59",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 643.63,
      "original_pre_fixed_amount": 78.82,
      "original_principal_amortization_amount": 303.25,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 2,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    },
    {
      "business_due_date": "2022-11-01",
      "due_date": "2022-10-31",
      "calendar_days": 32,
      "due_interest": 0,
      "due_principal": 340.38585509,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 41.68,
      "principal_amortization_amount": 340.39,
      "tax_amount": 1.9,
      "total_amount": 382.07,
      "workdays": 21,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "61924f59-11e3-49d0-9cf7-2a1d0ce54924",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 340.39,
      "original_pre_fixed_amount": 41.68,
      "original_principal_amortization_amount": 340.39,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 3,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    }
  ],
  "first_due_date": "2022-08-29",
  "requester_key": "52f36417-368e-4f5b-8841-71e3b9caa72f",
  "original_total_iof": 6.77,
  "contract_number": "0000000001/WO",
  "credit_operation_status_enumerator": "waiting_signature",
  "operation_type_enumerator": "structured_operation",
  "disbursement_date": "2022-08-24",
  "issuer_name": "Wilker Oliveiraço",
  "issuer_document_number": "37197645832",
  "external_contract_fees": [
    {
      "amount_type": {
        "enumerator": "percentage"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "spread_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    }
  ]
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Debt Query by Credit Operation Key

URL: /en/documentation/emissao_de_divida/consulta_por_credit_operation_key

## Request

ENDPOINT /v2/credit_operation/ CREDIT-OPERATION-KEY
METHOD GET

### Path params

| Field | Type | Description | Characters |
|---|---|---|---|   
| `credit_operation_key` * | string | Credit operation key. | UUID |

### Query params

| Field | Type | Description | Default |
|---|---|---|---|
| `eval_present_value` | boolean | When `true`, calculates the present value of each installment and returns the `present_amount` field in each `installments` item, plus a root-level `present_amount` with the sum of all installments. Cannot be used for operations in status: `waiting_signature`, `signed`, `issued`, `canceled`, `canceled_permanently` or `amended`. | `false` |
| `calculate_delay` | boolean | Includes delay interest in the present value calculation. Only takes effect when `eval_present_value=true`. | `false` |
| `calculate_spread` | boolean | Includes spread in the present value calculation. Only takes effect when `eval_present_value=true`. | `true` |
| `present_value_reference_date` | string (date) | Reference date (`YYYY-MM-DD`) used as the basis for the present value calculation. Only takes effect when `eval_present_value=true`. | today |

## Response

STATUS 200

Response Body

**Without eval_present_value**

```json
{
  "credit_operation_key": "eaf5836a-ea6f-4baa-ac26-ce5199dfa448",
  "issue_amount": 1006.77,
  "origin_key": "52539e23-5c01-4b9c-8a68-6ed750ec7bc5",
  "total_iof": 6.77,
  "disbursement_start_date": "2022-08-24",
  "disbursement_end_date": "2022-08-24",
  "assigned_at": "2025-08-24T10:00:00Z",
  "issue_date": "2022-08-24",
  "requester_identifier_key": "5cb7456c-f2e3-41b3-b17a-ad47ba3c3cda",
  "installments": [
    {
      "business_due_date": "2022-08-30",
      "due_date": "2022-08-29",
      "calendar_days": 5,
      "due_interest": 0,
      "due_principal": 1006.77,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 18.93,
      "principal_amortization_amount": 363.14,
      "tax_amount": 0.15,
      "total_amount": 382.07,
      "workdays": 3,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "b56f61ec-202c-4a7a-8a5e-11f90972bae8",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 1006.77,
      "original_pre_fixed_amount": 18.93,
      "original_principal_amortization_amount": 363.14,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 1,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    },
    {
      "business_due_date": "2022-09-30",
      "due_date": "2022-09-29",
      "calendar_days": 31,
      "due_interest": 0,
      "due_principal": 643.63499424,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 78.82,
      "principal_amortization_amount": 303.25,
      "tax_amount": 0.9,
      "total_amount": 382.07,
      "workdays": 22,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "2a95a560-bec6-4207-9a38-98c72e023c59",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 643.63,
      "original_pre_fixed_amount": 78.82,
      "original_principal_amortization_amount": 303.25,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 2,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    },
    {
      "business_due_date": "2022-11-01",
      "due_date": "2022-10-31",
      "calendar_days": 32,
      "due_interest": 0,
      "due_principal": 340.38585509,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 41.68,
      "principal_amortization_amount": 340.39,
      "tax_amount": 1.9,
      "total_amount": 382.07,
      "workdays": 21,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "61924f59-11e3-49d0-9cf7-2a1d0ce54924",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 340.39,
      "original_pre_fixed_amount": 41.68,
      "original_principal_amortization_amount": 340.39,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 3,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    }
  ],
  "first_due_date": "2022-08-29",
  "requester_key": "52f36417-368e-4f5b-8841-71e3b9caa72f",
  "original_total_iof": 6.77,
  "contract_number": "0000000001/WO",
  "credit_operation_status_enumerator": "waiting_signature",
  "operation_type_enumerator": "structured_operation",
  "disbursement_date": "2022-08-24",
  "issuer_name": "Wilker Oliveiraço",
  "issuer_document_number": "37197645832",
  "external_contract_fees": [
    {
      "amount_type": {
        "enumerator": "percentage"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "spread_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    }
  ]
}
```

**With eval_present_value=true**

```json
{
  "credit_operation_key": "eaf5836a-ea6f-4baa-ac26-ce5199dfa448",
  "issue_amount": 1006.77,
  "present_amount": 889.87,
  "origin_key": "52539e23-5c01-4b9c-8a68-6ed750ec7bc5",
  "total_iof": 6.77,
  "disbursement_start_date": "2022-08-24",
  "disbursement_end_date": "2022-08-24",
  "assigned_at": "2025-08-24T10:00:00Z",
  "issue_date": "2022-08-24",
  "requester_identifier_key": "5cb7456c-f2e3-41b3-b17a-ad47ba3c3cda",
  "installments": [
    {
      "business_due_date": "2022-08-30",
      "due_date": "2022-08-29",
      "calendar_days": 5,
      "due_interest": 0,
      "due_principal": 1006.77,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 18.93,
      "principal_amortization_amount": 363.14,
      "tax_amount": 0.15,
      "total_amount": 382.07,
      "workdays": 3,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "b56f61ec-202c-4a7a-8a5e-11f90972bae8",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 1006.77,
      "original_pre_fixed_amount": 18.93,
      "original_principal_amortization_amount": 363.14,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 1,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0,
      "present_amount": 296.62
    },
    {
      "business_due_date": "2022-09-30",
      "due_date": "2022-09-29",
      "calendar_days": 31,
      "due_interest": 0,
      "due_principal": 643.63499424,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 78.82,
      "principal_amortization_amount": 303.25,
      "tax_amount": 0.9,
      "total_amount": 382.07,
      "workdays": 22,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "2a95a560-bec6-4207-9a38-98c72e023c59",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 643.63,
      "original_pre_fixed_amount": 78.82,
      "original_principal_amortization_amount": 303.25,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 2,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0,
      "present_amount": 296.62
    },
    {
      "business_due_date": "2022-11-01",
      "due_date": "2022-10-31",
      "calendar_days": 32,
      "due_interest": 0,
      "due_principal": 340.38585509,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 41.68,
      "principal_amortization_amount": 340.39,
      "tax_amount": 1.9,
      "total_amount": 382.07,
      "workdays": 21,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "61924f59-11e3-49d0-9cf7-2a1d0ce54924",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 340.39,
      "original_pre_fixed_amount": 41.68,
      "original_principal_amortization_amount": 340.39,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 3,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0,
      "present_amount": 296.63
    }
  ],
  "first_due_date": "2022-08-29",
  "requester_key": "52f36417-368e-4f5b-8841-71e3b9caa72f",
  "original_total_iof": 6.77,
  "contract_number": "0000000001/WO",
  "credit_operation_status_enumerator": "waiting_signature",
  "operation_type_enumerator": "structured_operation",
  "disbursement_date": "2022-08-24",
  "issuer_name": "Wilker Oliveiraço",
  "issuer_document_number": "37197645832",
  "external_contract_fees": [
    {
      "amount_type": {
        "enumerator": "percentage"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "spread_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    }
  ]
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Debt Inquiry by Requester Identifier Key

URL: /en/documentation/emissao_de_divida/consulta_por_requester_identifier_key

## Request

ENDPOINT /v2/credit_operation/requester_identifier_key/ REQUESTER-IDENTIFIER-KEY
METHOD GET

### Path params

| Field | Type | Description | Characters |
|---|---|---|---|   
| `requester_identifier_key` * | string | UUID4 key sent during debt creation. | UUID |

### Query params

| Field | Type | Description | Default |
|---|---|---|---|
| `eval_present_value` | boolean | When `true`, calculates the present value of each installment and returns the `present_amount` field in each `installments` item, plus a root-level `present_amount` with the sum of all installments. Cannot be used for operations in status: `waiting_signature`, `signed`, `issued`, `canceled`, `canceled_permanently` or `amended`. | `false` |
| `calculate_delay` | boolean | Includes delay interest in the present value calculation. Only takes effect when `eval_present_value=true`. | `false` |
| `calculate_spread` | boolean | Includes spread in the present value calculation. Only takes effect when `eval_present_value=true`. | `true` |
| `present_value_reference_date` | string (date) | Reference date (`YYYY-MM-DD`) used as the basis for the present value calculation. Only takes effect when `eval_present_value=true`. | today |

## Response

STATUS 200

Response Body

**Without eval_present_value**

```json
{
  "credit_operation_key": "eaf5836a-ea6f-4baa-ac26-ce5199dfa448",
  "issue_amount": 1006.77,
  "origin_key": "52539e23-5c01-4b9c-8a68-6ed750ec7bc5",
  "total_iof": 6.77,
  "disbursement_start_date": "2022-08-24",
  "disbursement_end_date": "2022-08-24",
  "assigned_at": "2025-08-24T10:00:00Z",
  "issue_date": "2022-08-24",
  "requester_identifier_key": "5cb7456c-f2e3-41b3-b17a-ad47ba3c3cda",
  "installments": [
    {
      "business_due_date": "2022-08-30",
      "due_date": "2022-08-29",
      "calendar_days": 5,
      "due_interest": 0,
      "due_principal": 1006.77,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 18.93,
      "principal_amortization_amount": 363.14,
      "tax_amount": 0.15,
      "total_amount": 382.07,
      "workdays": 3,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "b56f61ec-202c-4a7a-8a5e-11f90972bae8",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 1006.77,
      "original_pre_fixed_amount": 18.93,
      "original_principal_amortization_amount": 363.14,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 1,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    },
    {
      "business_due_date": "2022-09-30",
      "due_date": "2022-09-29",
      "calendar_days": 31,
      "due_interest": 0,
      "due_principal": 643.63499424,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 78.82,
      "principal_amortization_amount": 303.25,
      "tax_amount": 0.9,
      "total_amount": 382.07,
      "workdays": 22,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "2a95a560-bec6-4207-9a38-98c72e023c59",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 643.63,
      "original_pre_fixed_amount": 78.82,
      "original_principal_amortization_amount": 303.25,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 2,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    },
    {
      "business_due_date": "2022-11-01",
      "due_date": "2022-10-31",
      "calendar_days": 32,
      "due_interest": 0,
      "due_principal": 340.38585509,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 41.68,
      "principal_amortization_amount": 340.39,
      "tax_amount": 1.9,
      "total_amount": 382.07,
      "workdays": 21,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "61924f59-11e3-49d0-9cf7-2a1d0ce54924",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 340.39,
      "original_pre_fixed_amount": 41.68,
      "original_principal_amortization_amount": 340.39,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 3,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0
    }
  ],
  "first_due_date": "2022-08-29",
  "requester_key": "52f36417-368e-4f5b-8841-71e3b9caa72f",
  "original_total_iof": 6.77,
  "contract_number": "0000000001/WO",
  "credit_operation_status_enumerator": "waiting_signature",
  "operation_type_enumerator": "structured_operation",
  "disbursement_date": "2022-08-24",
  "issuer_name": "Wilker Oliveiraço",
  "issuer_document_number": "37197645832",
  "external_contract_fees": [
    {
      "amount_type": {
        "enumerator": "percentage"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "spread_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    }
  ]
}
```

**With eval_present_value=true**

```json
{
  "credit_operation_key": "eaf5836a-ea6f-4baa-ac26-ce5199dfa448",
  "issue_amount": 1006.77,
  "present_amount": 889.87,
  "origin_key": "52539e23-5c01-4b9c-8a68-6ed750ec7bc5",
  "total_iof": 6.77,
  "disbursement_start_date": "2022-08-24",
  "disbursement_end_date": "2022-08-24",
  "assigned_at": "2025-08-24T10:00:00Z",
  "issue_date": "2022-08-24",
  "requester_identifier_key": "5cb7456c-f2e3-41b3-b17a-ad47ba3c3cda",
  "installments": [
    {
      "business_due_date": "2022-08-30",
      "due_date": "2022-08-29",
      "calendar_days": 5,
      "due_interest": 0,
      "due_principal": 1006.77,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 18.93,
      "principal_amortization_amount": 363.14,
      "tax_amount": 0.15,
      "total_amount": 382.07,
      "workdays": 3,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "b56f61ec-202c-4a7a-8a5e-11f90972bae8",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 1006.77,
      "original_pre_fixed_amount": 18.93,
      "original_principal_amortization_amount": 363.14,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 1,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0,
      "present_amount": 296.62
    },
    {
      "business_due_date": "2022-09-30",
      "due_date": "2022-09-29",
      "calendar_days": 31,
      "due_interest": 0,
      "due_principal": 643.63499424,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 78.82,
      "principal_amortization_amount": 303.25,
      "tax_amount": 0.9,
      "total_amount": 382.07,
      "workdays": 22,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "2a95a560-bec6-4207-9a38-98c72e023c59",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 643.63,
      "original_pre_fixed_amount": 78.82,
      "original_principal_amortization_amount": 303.25,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 2,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0,
      "present_amount": 296.62
    },
    {
      "business_due_date": "2022-11-01",
      "due_date": "2022-10-31",
      "calendar_days": 32,
      "due_interest": 0,
      "due_principal": 340.38585509,
      "fine_amount": 0,
      "has_interest": true,
      "post_fixed_amount": 0,
      "pre_fixed_amount": 41.68,
      "principal_amortization_amount": 340.39,
      "tax_amount": 1.9,
      "total_amount": 382.07,
      "workdays": 21,
      "accrual_reference_date": null,
      "advanced_paid_amount": 0.0,
      "bank_slip_key": null,
      "digitable_line": null,
      "installment_key": "61924f59-11e3-49d0-9cf7-2a1d0ce54924",
      "installment_status": "created",
      "installment_type": "principal",
      "original_due_principal": 340.39,
      "original_pre_fixed_amount": 41.68,
      "original_principal_amortization_amount": 340.39,
      "paid_amount": 0.0,
      "original_total_amount": 382.07,
      "qr_code_key": null,
      "qr_code_url": null,
      "renegotiation_proposal_key": null,
      "total_accrual_amount": 0,
      "total_paid_amount": 0,
      "installment_number": 3,
      "paid_at": null,
      "updated_at": null,
      "principal_amortization_payment_amount": 0,
      "prefixed_interest_payment_amount": 0,
      "present_amount": 296.63
    }
  ],
  "first_due_date": "2022-08-29",
  "requester_key": "52f36417-368e-4f5b-8841-71e3b9caa72f",
  "original_total_iof": 6.77,
  "contract_number": "0000000001/WO",
  "credit_operation_status_enumerator": "waiting_signature",
  "operation_type_enumerator": "structured_operation",
  "disbursement_date": "2022-08-24",
  "issuer_name": "Wilker Oliveiraço",
  "issuer_document_number": "37197645832",
  "external_contract_fees": [
    {
      "amount_type": {
        "enumerator": "percentage"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "spread_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    },
    {
      "amount_type": {
        "enumerator": "absolute"
      },
      "fee_amount": 0.0,
      "tax_amount": 0.0,
      "irrf_amount": 0.0,
      "amount": 0.0,
      "pis_amount": 0.0,
      "amount_released": 0.0,
      "fee_type": {
        "enumerator": "tac_tax_free"
      },
      "cofins_amount": 0.0,
      "csll_amount": 0.0,
      "description": null,
      "net_fee_amount": 0.0,
      "rebate_account": null,
      "billing_type": {
        "enumerator": "disbursement"
      },
      "created_at": "2025-10-14T22:18:07"
    }
  ]
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Operation Disbursement

URL: /en/documentation/emissao_de_divida/desembolso_da_operacao

The disbursement of an operation is the release of funds originating from the credit contract. At QI Tech, the disbursement method follows the credit product configurations as specified in the disbursement settings.

:::info Information
By default, operations are disbursed via PIX to the account sent for the operation, but there are five
options that can be selected:

**1- Pix with account information**;

**2- Pix with key**;

**3- TED**;

**4- QR code Pix**;

**5- Boleto**;

They have specific fields and are detailed in the "disbursement_bank_accounts" key of the contract issuance.
:::

QI Tech's disbursement routine runs every minute, checking if all requirements configured for the product have been met for that specific contract and changing its status.

## Disbursement Requirements

- **Disbursement date**

The operation's credit contract is only disbursed on the date defined as "disbursement_date".

- **Credit contract issued and signed**

The operation's credit contract must be issued and signed.

- **Collateral established**

In the case of operations that require guarantees, the collateral must be established for the disbursement to proceed.

- **Disbursement approval**

If the "disbursement approval" configuration is active, the contract will only be disbursed after the approval API call.

- **Operations with down payment need to be paid**

If the created operation has a down payment parameter, disbursement only occurs after payment and financial settlement in the QI Tech system.

- **Limit alignment**

It is necessary that available credit limit exists for the operation to be disbursed.

---

# Personal Debt Issuance

URL: /en/documentation/emissao_de_divida/emissao/emissao_de_divida_pf

With the debt issuance API, it is possible to request the issuance of a debt for an individual. 
It is not necessary to pre-register the borrower; simply provide the registration details at the time of the debt request.

:::danger Attention!

QI Tech offers a solution for onboarding new clients and anti-fraud.

[Check out the documentation for these APIs here..](https://www.zaig.com.br/en/devcenter.html)

To receive a quote, contact our sales team:

comercial@qitech.com.br or (11) 3522-1301.
:::

The debt API is designed to be executed in just one request, after a prior upload of files ([document upload](../../upload_de_documentos)).
The header and body signature format for this request is described in detail
[here](../../primeiros_passos/teste_de_autenticacao).

## Request

ENDPOINT /debt
METHOD POST

Request Body

```json
{
	"borrower": {
		"name": "Alan Mathison Turing",
		"email": "alan.turing@email.com",
		"phone": {
			"number": "912345678",
			"area_code": "11",
			"country_code": "055"
		},
		"is_pep": false,
		"address": {
			"city": "São Paulo",
			"state": "SP",
			"number": "1000",
			"street": "Avenida Feliz",
			"complement": "AP 801",
			"postal_code": "49026100",
			"neighborhood": "Centro"
		},
		"role_type": "issuer",
		"birth_date": "1990-11-20",
		"mother_name": "Nome da Mãe do Alan",
		"nationality": "brasileiro",
		"person_type": "natural",
		"individual_document_number": "96969879003",
        "document_identification": "494598fd-c226-4332-a500-591ae3884673"
	},
	"financial": {
        "amount": 123456,
        "interest_type": "pre_price_days",
        "credit_operation_type": "ccb",
        "annual_interest_rate": 2.32,
        "disbursement_date": "2023-03-01",
        "interest_grace_period": 0,
        "principal_grace_period": 0,
        "number_of_installments": 2,
        "fine_configuration": {
          "contract_fine_rate": 0.02,
          "interest_base": "calendar_days",
          "monthly_rate": 0.01
        }
    },
	"disbursement_bank_account": {
		"name": "Alan Mathison Turing",
        "document_number": "96969879003",
		"bank_code": "341",
        "branch_number": "8615",
        "account_number": "22110",
        "account_digit": "2",
		"account_type": "checking_account"
	},
	"purchaser_document_number": "32402502000135"
}
```

## Response

The response to this debt request will return the payment plan as well as a DEBT-KEY, which is the debt identifier in QI SCD.

STATUS 200

Response Body

```json
{
  "data": {
    "additional_iof": 469.1328,
    "annual_cet": "283,3821%",
    "assignment_amount": 124690.56,
    "base_iof": 473.6829374063069,
    "borrower": {
      "document_number": "96969879003",
      "name": "Alan Mathison Turing"
    },
    "cet": "11,8500%",
    "collaterals": [],
    "contract": {
      "number": "0000067563/AMT",
      "signature_information": [
        {
          "signature_url": null,
          "signer_document_number": "15627918004",
          "signer_email": "alan.turing@email.com",
          "signer_external_key": null,
          "signer_name": "Alan Mathison Turing",
          "signer_role": "issuer"
        }
      ],
      "urls": [
        "https://storage.googleapis.com/sandbox-doc-api/documents/5af36fcd-8e4c-4421-ad45-7bcba899c0d3/SYNGENTASANDBOX-ALAN_MATHISON_TURING-CCB-0000067563-20230302234816.pdf"
      ]
    },
    "contract_fee_amount": 1234.56,
    "contract_fees": [
      {
        "fee_amount": 1234.56,
        "fee_type": "tac"
      }
    ],
    "external_contract_fee_amount": 1234.56,
    "external_contract_fees": [
      {
        "fee_amount": 1234.56,
        "fee_type": "spread",
        "net_fee_amount": 1120.36,
        "tax_amount": 114.2
      }
    ],
    "installments": [
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2023-04-03",
        "calendar_days": 31,
        "digitable_line": null,
        "due_date": "2023-04-02",
        "due_interest": 0,
        "due_principal": 123456,
        "fine_amount": null,
        "has_interest": true,
        "installment_history": [],
        "installment_key": "da264e95-2bbd-47de-876b-bfea7d25e266",
        "installment_number": 1,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 123456,
        "original_pre_fixed_amount": 13245.468714162304,
        "original_principal_amortization_amount": 58473.151285837695,
        "original_total_amount": 71718.62,
        "paid_amount": 0,
        "paid_at": null,
        "post_fixed_amount": 0,
        "pre_fixed_amount": 13245.468714162304,
        "principal_amortization_amount": 58473.151285837695,
        "qr_code_key": null,
        "qr_code_url": null,
        "renegotiation_proposal_key": null,
        "tax_amount": 148.63875056859942,
        "total_accrual_amount": null,
        "total_amount": 71718.62,
        "total_paid_amount": 0,
        "workdays": 21
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2023-05-02",
        "calendar_days": 30,
        "digitable_line": null,
        "due_date": "2023-05-02",
        "due_interest": 0,
        "due_principal": 64982.848714162305,
        "fine_amount": null,
        "has_interest": true,
        "installment_history": [],
        "installment_key": "cac7064b-2310-45e1-a91f-5e8f39f0f0ea",
        "installment_number": 2,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 64982.848714162305,
        "original_pre_fixed_amount": 6735.77577015044,
        "original_principal_amortization_amount": 64982.84422984956,
        "original_total_amount": 71718.62,
        "paid_amount": 0,
        "paid_at": null,
        "post_fixed_amount": 0,
        "pre_fixed_amount": 6735.77577015044,
        "principal_amortization_amount": 64982.84422984956,
        "qr_code_key": null,
        "qr_code_url": null,
        "renegotiation_proposal_key": null,
        "tax_amount": 325.0441868377075,
        "total_accrual_amount": null,
        "total_amount": 71718.62,
        "total_paid_amount": 0,
        "workdays": 19
      }
    ],
    "iof_charge_method": "financed",
    "issue_amount": 123456,
    "net_external_contract_fee_amount": 1120.36,
    "number_of_installments": 2,
    "prefixed_interest_rate": {
      "annual_rate": 2.32,
      "created_at": "2023-03-02T23:48:15",
      "daily_rate": 0.00329298,
      "interest_base": "calendar_days_365",
      "monthly_rate": 0.10516767
    },
    "requester_identifier_key": "1c2ca4dc-2a20-4dd4-bd5f-af143fadadf4",
    "total_iof": 942.82,
    "total_pre_fixed_amount": 19981.244484312745
  },
  "event_datetime": "2023-03-02 23:48:20",
  "key": "1c2ca4dc-2a20-4dd4-bd5f-af143fadadf4",
  "status": "waiting_signature",
  "webhook_type": "debt"
}
```

## Definições

### Object Request Body
| Field                           | Type   | Description                                                                                                                                                                                                        | Max. Caract. | 
|---------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **borrower** *                  | object | **[Object Borrower](#object-borrower)** - Credit operation debtor
                                                                                                                                         | -            | 
| **disbursement_bank_account** * | object | **[Object Disbursement Bank Account](#object-disbursement_bank_accounts)** - Bank account details for the operation disbursement                                                                                | -            |
| **financial** *                 | object | **[Object Financial](#object-financial)** - Bank account details for the operation disbursement. Identifier indicating that the sent object is an individual. It must ALWAYS contain the value "natural" for individual borrowers. | -            |
| **purchaser_document_number** * | string | CNPJ of the credit operation assignee (buyer)                                                                                                                                                           | -            |

### Object Borrower
| Field                            | Type    | Description                                                                             | Max. Caract. | 
|----------------------------------|---------|---------------------------------------------------------------------------------------|--------------|
| **name** *                       | string  | Borrower's name                                                                       | 100          |
| **email**                        | string  | Borrower's email                                                                      | 254          |
| **phone**                        | object  | **[Object Phone](#object-phone)** - Borrower's contact phone                    | -            | 
| **is_pep** *                     | boolean | PEP indicator (http://www.portaldatransparencia.gov.br/download-de-dados/pep)      | -            |
| **address** *                    | object  | **[Object Address](#object-address)** - Borrower's address                           | -            | 
| **role_type** *                  | enum    | default: _issuer_                                                                     | -            |
| **birth_date** *                 | date    | Borrower's date of birth (format "YYYY-MM-DD")                                  | -            |
| **mother_name** *                | string  | Borrower's mother's name                                                               | 100          |
| **nationality**                  | string  | Borrower's nationality                                                              | 50           |
| **person_type** *                | string  | Individual indicator - default: _natural_                                       | -            |
| **individual_document_number** * | string  | Borrower's CPF (numbers only)                                                       | 11           |
| **document_identification**     * | string  | DOCUMENT_KEY of the Borrower's photo identification document PDF (RG or CNH) | -            |
| **document_identification_back** |string | DOCUMENT_KEY of the PDF of the back side of the photo identification document (RG or CNH) (previously sent) | 11 |
| **wedding_certificate**          | string | DOCUMENT_KEY of the marriage certificate PDF (previously sent). If marital_status is "single," the value of this field must be NULL.. | 11 |
| **proof_of_residence** *    |string | DOCUMENT_KEY of the address proof PDF (previously sent). | 11 |

### Object Address
| Field              | Type   | Description                                                                | Max. Caract. | 
|--------------------|--------|--------------------------------------------------------------------------|--------------| 
| **city** *         | string |  City                                                       | 100          |
| **state** *        | string |  State (with two uppercase characters)                      | 2            |
| **number** *       | string | Number                                                       | 10           |
| **street** *       | string | Street                                                          | 100          |
| **complement** *   | string | Address complement (free text)                                    | 100          |
| **postal_code** *  | string | Postal Code (http://www.buscacep.correios.com.br/sistemas/buscacep/) | 8            |
| **neighborhood** * | string | Neighborhood                                                       | 100          |

### Object Phone
| Field              | Description | Example                                               | Max. Caract. | 
|--------------------|-----------|-------------------------------------------------------|--------------| 
| **number** *       | string    | Phone number                                    | 10           |
| **area_code** *    | string    | Phone area code (DDD) (https://ddd.guiamais.com.br/) | 2            |
| **country_code** * | string    | Phone DDI code (https://ddi.guiamais.com.br/) | 3            |

### Object Disbursement Bank Account

A debt issuance must contain the disbursement bank account information, typically an account held by the debtor.

| Field                 | Type   | Description                                                                                          | Max. Caract. | 
|-----------------------|--------|----------------------------------------------------------------------------------------------------|--------------|
| name                  | string | Account owner's name                                                                           | 50           |
| document_number       | string | Account owner's CPF                                                                            | 11           |
| bank_code *           | string | Financial institution's COMPE code (https://www.bcb.gov.br/pom/spb/estatistica/port/ASTR003.pdf) | 3            |
| branch_number *       | string | Branch number (do not include the branch check digit!)                                  | 4            |
| account_number *      | string | Account number (without the account check digit!)                                               | 10           |
| account_digit *       | string | Account check digit (use zero in place of letters)                                     | 1            |
| account_type          | enum   | [Enumerador Account Type](#enumerador-account-type) Account type                                  | 1            |

### Object Financial

The financial object describes the financial information of the credit operation.

| Field                      | Type   | Description                                                                                                     | Max. Caract. |
|----------------------------|--------|---------------------------------------------------------------------------------------------------------------|--------------|
| **amout**                  | float  | Issuance/Nominal value of the credit operation                                                               | -            |
| **interest_type**          | object | **[Enumerador Interest Type](#enumerador-interest-type)** - Amortization method and interest calculation method | -            |
| **credit_operation_type**  | object | **[Enumerador Credit Operation Type](#enumerador-credit-operation-type)** - Credit contract type       | -            |
| **annual_interest_rate**   | float  | Pre-fixed interest rate expressed in decimal per year                                                           | -            |
| **disbursement_date**      | date   | Operation disbursement date                                                                                | -            |
| **interest_grace_period**  | int    | Interest grace period (in months)                                                                                  | -            |
| **principal_grace_period** | int    | Principal grace period                                                                                 | -            |
| **number_of_installments** | int    | Number of installments of the credit operation                                                                     | -            |
| **fine_configuration**     | object | **[Object Fine Configuration](#object-fine-configuration)** - Late interest and penalty configuration        | -            |

### Object Fine Configuration

In the Fine Configuration object, the penalty and interest values for late payment in the credit operation are specified.

| Field                  | Type  | Description                                                                            | Max. Caract. |
|------------------------|-------|--------------------------------------------------------------------------------------|--------------|
| **contract_fine_rate** | float | Penalty rate for delay                                                       | -            |
| **interest_base**      | enum  | **[Enumerador Interest Base](#enumerador-interest-base)** - Interest calculation base | -            |
| **monthly_rate**       | float | Monthly late interest rate                                                 | -            |

### Object Rebates
| Field                           | Type   | Description                                                                                                                                                                                                        | Max. Caract. | 
|---------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **fee_type** *                  | enum | Fee type.                                                                                                                                   | -            | 
| **amount_type** * | object | Type of the amount to be charged.                                                                                 | -            |
| **amount** *                 | object | Fee amount. If the fee type is percentage, the value must be between 0 and 100. | -            |

### Response Body
| Field                      | Type   | Description                                                      | Max. Caract. |
|----------------------------|--------|----------------------------------------------------------------|--------------|
| **data[n].data**           | object | **[Object Data](#object-data)**                                | -            |
| **data[n].event_datetime** | date   | Moment of credit operation generation                      | -            |
| **data[n].key**            | string | **DEBT-KEY** - Unique key of the credit operation within QI | -            |
| **data[n].status**         | string | **[Possívies Status de uma dívida](../status_de_uma_divida)**     | -            |
| **data[n].type**           | string | _debt_                                                         | -            |

# Enumerators

### Person Type Enumerators_
| Enumerator             | Description             |
|------------------------|-----------------------|
| **legal**   | Corporate        |
| **natural**    | Person    |

### Amount Type_Enumerators
| Enumerator             | Description             |
|------------------------|-----------------------|
| **tac**   | Fee charged to the borrower. |
| **spread**    | Fee charged to the fund added to the operation's transfer price.    |

### Account Type_Enumerators
| Enumerator             | Description             |
|------------------------|-----------------------|
| **checking_account**   | checking account        |
| **deposit_account**    | deposit account     |
| **guaranteed_account** | guaranteed account     |
| **investment_account** | investment account |
| **payment_account**    | payment account    |
| **saving_account**     | saving account        |
| **salary_account**     | salary account         |

### Interest Type Enumerators_
| Enumerator           | Description                                                                                                                                                                |
|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **pre_price_days**   | Price amortization method (equal installments) with calculation of pre-fixed interest per day                                                                                     |
| **pre_price**        | Price amortization method (equal installments) with pre-fixed interest calculation in fixed periods (30 days)                                                                |
| **pre_sac**          | SAC amortization method (constant amortization) with pre-fixed interest calculation per day                                                                                 |
| **post_sac**         | SAC amortization method (constant amortization) with interest calculation based on a pre-fixed rate + post-fixed indexer (CDI, IPCA, or IGPM) per day                  |
| **post_price**       | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (CDI, IPCA, or IGPM) in fixed periods (30 days) |
| **post_price_days**  | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (CDI, IPCA, or IGPM) per day                      |

### Credit Operation Type_Enumerators
| Enumerador    | Description                      |
|---------------|--------------------------------|
| **ccb**       | "Cédula de Crédito Bancário"     |
| **cce**       | "Cédula de Crédito à Exportação" |
| **cci**       | "Cédula de Crédito Imobiliário"  |
| **nce**       | "Nota de Crédito à Exportação"   |

### Interest Base_Enumerators
| Enumerador            | Description                                                                 |
|-----------------------|---------------------------------------------------------------------------|
| **workdays**          | Interest calculation base in business days considering a year of 252 days    |
| **calendar_days**     | Interest calculation base in calendar days considering a year of 360 days |
| **calendar_days_365** | Interest calculation base in calendar days considering a year of 365 days |

### Fee Type_Enumerators
Each type of fee must be enabled and configured in advance by QI Tech.

| Enumerador            | Description                                                                  |
|-----------------------|----------------------------------------------------------------------------|
| **tac**               | Registration opening fee                                             |
| **spread**            | Spread charged on the acquisition value of the credit operation                  |
| **warranty_analysis** | Warrantly analysis fee                                             |
| **ted_fee**           | TED fee                                                              |
| **spread_ted_fee**    | TED fee spread charged on the acquisition value of the credit operation |
| **spread_merchant**   | Spread allocated to merchant remuneration, charged on the acquisition (assignment) value of the credit operation |
| **tac_assignment_discount** | Portion of the registration opening fee (TAC) allocated to the fund (assignee), charged from the borrower; part of the operation's issued amount |

---

# Issuance of Corporate debt

URL: /en/documentation/emissao_de_divida/emissao/emissao_de_divida_pj

With the debt issuance API, it is possible to request the issuance of a debt for a legal entity. 
It is not necessary to pre-register the borrower; simply provide the registration details at the time of the debt request.

:::danger Attention!

QI Tech offers a solution for onboarding new clients and anti-fraud.

[Check out the documentation for these APIs here..](https://www.zaig.com.br/en/devcenter.html)

To receive a quote, contact our sales team:

comercial@qitech.com.br or (11) 3522-1301.
:::

The debt API is designed to be executed in just one request, after a prior upload of files ([document upload](../../upload_de_documentos)).
The header and body signature format for this request is described in detail
[here](../../primeiros_passos/teste_de_autenticacao).

## Request

ENDPOINT /debt
METHOD POST

Request Body

```json
{
    "borrower": {
        "name": "RAZAO SOCIAL EMPRESA",
        "email": "emailempresa@email.com",
        "phone": {
            "number": "991112222",
            "area_code": "11",
            "country_code": "055"
        },
        "address": {
            "city": "São Paulo",
            "state": "SP",
            "number": "215",
            "street": "Rua Gilberto Sabino",
            "complement": "3 andar",
            "postal_code": "05425020",
            "neighborhood": "Pinheiros"
        },
        "cnae_code": "6822-6/00",
        "role_type": "issuer",
        "person_type": "legal",
        "company_type": "ltda",
        "trading_name": "NOME FANTASIA DA EMPRESA",
        "foundation_date": "2019-07-05",
        "attached_documents_list": [],
        "company_document_number": "80282008000127",
        "company_statute": "aa28e598-55e2-40f1-8884-671772c541a1",
        "company_representatives": [
            {
                "name": "NOME DO REPRESENTANTE",
                "email": "nomedorepresentante@email.com",
                "phone": {
                    "number": "990121234",
                    "area_code": "11",
                    "country_code": "055"
                },
                "is_pep": false,
                "final_beneficiary": true,
                "spouse": {
                    "name": "NOME CONJUGE REPRESENTANTE",
                    "email": "conjugerepresentante@email.com",
                    "phone": {
                        "number": "988881234",
                        "area_code": "11",
                        "country_code": "055"
                    },
                    "birth_date": "1994-12-04",
                    "person_type": "natural",
                    "is_pep": false,
                    "mother_name": "NOME DA MAE DO CONJUGE DO REPRESENTANTE",
                    "individual_document_number": "26571990032",
                    "document_identification_number": "10101010100",
                    "address": {
                        "city": "São Paulo",
                        "state": "SP",
                        "number": "215",
                        "street": "Rua Gilberto Sabino",
                        "complement": "3 andar",
                        "postal_code": "05425020",
                        "neighborhood": "Pinheiros"
                    }
                },
                "address": {
                    "city": "São Paulo",
                    "state": "SP",
                    "number": "215",
                    "street": "Rua Gilberto Sabino",
                    "complement": "3 andar",
                    "postal_code": "05425020",
                    "neighborhood": "Pinheiros"
                },
                "role_type": "company_representative",
                "birth_date": "1993-09-10",
                "profession": "DIRETOR",
                "mother_name": "NOME DA MAE DO REPRESENTANTE",
                "nationality": "BRASILEIRO",
                "person_type": "natural",
                "marital_status": "married",
                "property_system": "partial_communion_of_goods",
                "attached_documents_list": [],
                "individual_document_number": "31057466093",
                "document_identification_number": "20202020200"
            }
        ]
    },
    "financial": {
        "disbursed_amount": 10000,
        "interest_type": "pre_price_days",
        "credit_operation_type": "ccb",
        "monthly_interest_rate": 0.03,
        "disbursement_date": "2023-05-04",
        "first_due_date": "2023-06-03",
        "interest_grace_period": 0,
        "principal_grace_period": 0,
        "number_of_installments": 1,
        "fine_configuration": {
            "contract_fine_rate": 0.02,
            "interest_base": "calendar_days",
            "monthly_rate": 0.01
        }
    },
    "disbursement_bank_account": {
        "name": "RAZAO SOCIAL EMPRESA",
        "document_number": "80282008000127",
        "bank_code": "341",
        "branch_number": "8615",
        "account_number": "22110",
        "account_digit": "2",
        "account_type": "checking_account"
    },
    "purchaser_document_number": "32402502000135"
}

```

## Response

The response to this debt request will return the payment plan as well as a DEBT-KEY, which is the debt identifier in QI SCD.

STATUS 200

Response Body

```json
{
  "data": {
    "additional_iof": 38.57988,
    "annual_cet": "71,3492%",
    "assignment_amount": 10254.13,
    "base_iof": 12.487704111671501,
    "borrower": {
      "document_number": "80282008000127",
      "name": "RAZAO SOCIAL EMPRESA",
      "related_party_key": "7620181e-f46a-45c1-a4ea-60439b9662ad"
    },
    "cet": "4,5900%",
    "collaterals": [],
    "contract": {
      "number": "0000069971/RSE",
      "signature_information": [
        {
          "signature_url": null,
          "signer_document_number": "31057466093",
          "signer_email": "nomedorepresentante@email.com",
          "signer_external_key": null,
          "signer_name": "NOME DO REPRESENTANTE",
          "signer_role": "issuer"
        }
      ],
      "urls": [
        "https://storage.googleapis.com/sandbox-doc-api/documents/df3e4530-3deb-4ba8-ad4e-c28ebeffb831/20230504122831.pdf"
      ]
    },
    "contract_fee_amount": 101.53,
    "contract_fees": [
      {
        "fee_amount": 101.53,
        "fee_type": "tac"
      }
    ],
    "external_contract_fee_amount": 101.53,
    "external_contract_fees": [
      {
        "fee_amount": 101.53,
        "fee_type": "spread",
        "net_fee_amount": 92.14,
        "tax_amount": 9.39
      },
      {
        "fee_amount": 0,
        "fee_type": "tac",
        "net_fee_amount": 0,
        "tax_amount": 0
      }
    ],
    "installments": [
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2023-06-05",
        "calendar_days": 30,
        "digitable_line": null,
        "due_date": "2023-06-03",
        "due_interest": 0,
        "due_principal": 10152.6,
        "fine_amount": null,
        "has_interest": true,
        "installment_history": [],
        "installment_key": "0eb42a83-557a-437a-9819-099b5364cde9",
        "installment_number": 1,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 10152.6,
        "original_pre_fixed_amount": 300.3450311613816,
        "original_principal_amortization_amount": 10152.60496883862,
        "original_total_amount": 10452.95,
        "paid_amount": 0,
        "paid_at": null,
        "post_fixed_amount": 0,
        "pre_fixed_amount": 300.3450311613816,
        "principal_amortization_amount": 10152.60496883862,
        "qr_code_key": null,
        "qr_code_url": null,
        "renegotiation_proposal_key": null,
        "tax_amount": 12.487704111671501,
        "total_accrual_amount": null,
        "total_amount": 10452.95,
        "total_paid_amount": 0,
        "workdays": 21
      }
    ],
    "iof_charge_method": "financed",
    "issue_amount": 10152.6,
    "net_external_contract_fee_amount": 92.14,
    "number_of_installments": 1,
    "prefixed_interest_rate": {
      "annual_rate": 0.42576089,
      "created_at": "2023-05-04T12:28:30",
      "daily_rate": 0.00097227,
      "interest_base": "calendar_days_365",
      "monthly_rate": 0.03
    },
    "requester_identifier_key": "feceb7fe-1305-45eb-899d-c87d36bcc534",
    "total_iof": 51.07,
    "total_pre_fixed_amount": 300.3450311613816
  },
  "event_datetime": "2023-05-04 12:28:35",
  "key": "feceb7fe-1305-45eb-899d-c87d36bcc534",
  "status": "waiting_signature",
  "webhook_type": "debt"
}

```

### Object Request Body
| Field                           | Type   | Description                                                                                                                                                                                                        | Max. Caract. | 
|---------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **borrower** *                  | object | **[Object Borrower](#object-borrower)** - Credit operation borrower                                                                                                                                         | -            |
| **guarantor**                   | object | **[Object Guarantor](#object-borrower)** - Credit operation guarantors                                                                                                                       | -            |  
| **disbursement_bank_account** * | object | **[Object Disbursement Bank Account](#object-disbursement_bank_accounts)** - Bank account details for the operation disbursement                                                                                 | -            |
| **financial** *                 | object | **[Object Financial](#object-financial)** - Bank account details for the operation disbursement. Identifier indicating that the sent object is an individual. It must ALWAYS contain the value "natural" for individual borrowers | -            |
| **purchaser_document_number** * | string | CNPJ do cessionário (comprador) da operação de crédito                                                                                                                                                           | -            |

### Object Borrower  
| Field                            | Type    | Description                                                                             | Max. Caract. | 
|----------------------------------|---------|---------------------------------------------------------------------------------------|--------------|
| **name** *                       | string  | Company's corporate name                                                                   | 100          |
| **trading_name** * | string | Nome fantasia |  |
| **email**   *                     | string  | Company's institutional email                                                                 | 254          |
| **phone**  *                      | object  | **[Object Phone](#object-phone)** - Company's phone number                     | -            | 
| **is_pep** *                     | boolean | PEP indicator (http://www.portaldatransparencia.gov.br/download-de-dados/pep)      | -            |
| **address** *                    | object  | **[Object Address](#object-address)** - Borrower's address

                           | -            | 
| **role_type** *                  | enum    | default: _issuer_                                                                     | -            |
| **person_type** *                | string  | Legal entity indicator - default: _legal_                                       | -            |
| **company_document_number** *    | string  | CNPJ (numbers only)                                                                 | -            |
| **cnae_code** * | string |  National Classification of Economic Activities | |
| **company_representatives** *    | array of objects | List of the company's legal representatives  | **[Object Company Representatives](#object-company_representatives)** |
| **company_type** * | enum |  Company type: "ltda", "sa",  "micro_enterprise" ou  "freelancer"| -  |
| **company_statute** * | string | document_key of the company's articles of association PDF | |
| **directors_election_minute** | string | document_key of the company's election minutes PDF (mandatory only for companies with company_type "sa") | |
| **foundation_date** * | date | Company opening date (format "YYYY-MM-DD") |  |

As shown above, both the "borrower" field and the "guarantors" fields can be populated by either a PF Object or a PJ Object. The PJ Object represents a legal entity in QI Tech.

### Object Company Representatives

| Filed | Description | Exampe | Máx. Caract. | 
|---|---|---|---| 
| **person_type** * | string | Identifier indicating that the sent object is an individual or a legal entity. | natural |
| **name** * | string | Corporate name for corporate operations or person's name for person operations. Limited to 100 characters. |  |
| **mother_name** * | string | Mother's name of the client in case of person. Limited to 100 characters. |  |
| **birth_date** * | string | Date of birth of the person (format "YYYY-MM-DD") | - |
| **profession** * |string | Client's profession. Limited to 64 characters. | 64 |
| **nationality** * | string | Client's nationality.  | 50  |
| **marital_status** * | string | Client's marital status.l do cliente. |
| **property_system** * |string | Property separation regime (mandatory only for individuals with marital_status "married").. | **[Enumeradores property_system](#enumeradores-property_system)**  |
| **wedding_certificate** * | string | DOCUMENT_KEY of the marriage certificate PDF (previously sent). If marital_status is "single," the value of this field must be NULL.. |  |
| **spouse** * |string |**[Object Spouse](#object-spouse)** (Mandatory only when "compulsory_separation_of_goods" is "total_communion_of_goods," "partial_communion_of_goods," "final_participation_of_acquisitions," or "compulsory_separation_of_goods." If marital_status is "single," the value of this field must be NULL. | **[Object Spouse](#object-spouse)** |
| **is_pep** * |  boolean |Declaration if the person is PEP (http://www.portaldatransparencia.gov.br/download-de-dados/pep). | true/false |
| **final_beneficiary** | boolean | Declaration if the person is the final beneficiary of the company. | true/false |
| **individual_document_number** * |string | Person's CPF (numbers only). | 10 |
| **document_identification** * |string | DOCUMENT_KEY of the photo identification document PDF (RG or CNH) (previously sent) |  |
| **document_identification_back** |string | DOCUMENT_KEY of the back side of the photo identification document PDF (RG or CNH) (previously sent). |  |
| **document_identification_type** * | string |Qual o tipo do documento de identificação enviado. |  |
| **document_identification_number** * |string | Identification document number of the person sent in "document_identification".  | 16 |
| **email** * |string | Client's email. | 254 | 
| **phone** * | object | Client's phone number.| **[Object Phone](#object-phone)** | - |
| **address** | object | Client's address. |  **[Object Address](#object-address)**  |  
| **proof_of_residence**  |string | DOCUMENT_KEY of the address proof PDF (previously sent). | - |

### Object Spouse
| Field | Description | Example | Max. Caract. | 
|---|---|---|---| 
| **person_type** * | string | Identifier indicating that the sent object is an individual or a legal entity. | natural |
| **name** * | string | Corporate name for corporate operations or person's name for person operations. Limited to 100 characters. |  |
| **mother_name** * | string | Mother's name of the client in case of person. Limited to 100 characters |  |
| **birth_date** * | string | Date of birth of the person (format "YYYY-MM-DD") | - |
| **profession** * |string | Client's profession. Limited to 64 characters. | 64 |
| **is_pep** * |  boolean |Declaration if the person is PEP (http://www.portaldatransparencia.gov.br/download-de-dados/pep). | true/false |
| **individual_document_number** * |string | Person's CPF (numbers only). | 10 |
| **document_identification_number** * |string |  Identification document number of the person sent in "document_identification".  | 16 |
| **email** * |string | Client's email | 254 | 
| **phone** * | object | Client's phone number. | **[Object phone](#object-phone)** | - |
| **address** | object | Client's address. |  **[Object address](#object-address)**  |  

### Object Address 

| Field              | Type   | Description                                                                | Max. Caract. | 
|--------------------|--------|--------------------------------------------------------------------------|--------------| 
| **city** *         | string | City                                                       | 100          |
| **state** *        | string | Address state (with two uppercase characters)                      | 2            |
| **number** *       | string | Address Numner                                                       | 10           |
| **street** *       | string | Steet                                                          | 100          |
| **complement** *   | string | Address complement (free text)                                    | 100          |
| **postal_code** *  | string | Postal Code (http://www.buscacep.correios.com.br/sistemas/buscacep/) | 8            |
| **neighborhood** * | string | Neighborhood                                                       | 100          |

### Object Phone 

| Field              | Description | Example                                               | Max. Caract. | 
|--------------------|-----------|-------------------------------------------------------|--------------| 
| **number** *       | string    | Phone number                                    | 10           |
| **area_code** *    | string    | Phone area code (DDD) (https://ddd.guiamais.com.br/) | 2            |
| **country_code** * | string    | Phone DDI code (https://ddi.guiamais.com.br/) | 3            |

### Object Disbursement Bank Account

A debt issuance must contain the bank information for disbursement, by default, an account held by the debtor.

| Field                 | Type   | Description                                                                                          | Max. Caract. | 
|-----------------------|--------|----------------------------------------------------------------------------------------------------|--------------|
| name                  | string | Account owner's name

                                                                           | 50           |
| document_number       | string | Account owner's CPF                                                                            | 11           |
| bank_code *           | string | Financial institution's COMPE code financeira (https://www.bcb.gov.br/pom/spb/estatistica/port/ASTR003.pdf) | 3            |
| branch_number *       | string | Branch number (do not include the branch check digit!)                                  | 4            |
| account_number *      | string | Account number (without the account check digit!)                                               | 10           |
| account_digit *       | string | Account check digit (use zero in place of letters)                                     | 1            |
| account_type          | enum   | [Enumerador Account Type](#enumerador-account-type) Account type                                  | 1            |

### Object Financial 

The financial object describes the financial information of the issuance. Here, the interest rate, grace period, and debt value, among others, are defined. The Financial Object has the fields described below, but it is important to note that some fields are optional and mutually exclusive (if one is available, the other should not be sent).

| Field                      | Type   | Description                                                                                                     | Max. Caract. |
|----------------------------|--------|---------------------------------------------------------------------------------------------------------------|--------------|
| **amout**                  | float  | Issue/Nominal value of the credit operation                                                               | -            |
| **interest_type**          | object | **[Enumerador Interest Type](#enumerador-interest-type)** - Amortization method and interest calculation method | -            |
| **credit_operation_type**  | object | **[Enumerador Credit Operation Type](#enumerador-credit-operation-type)** - Credit contract type       | -            |
| **annual_interest_rate**   | float  | Pre-fixed interest rate expressed in decimal per year                                                           | -            |
| **disbursement_date**      | date   | Operation disbursement date                                                                                | -            |
| **interest_grace_period**  | int    | Interest grace period (in months)                                                                                  | -            |
| **principal_grace_period** | int    | Principal grace period                                                                                 | -            |
| **number_of_installments** | int    | Number of installments of the credit operation                                                                     | -            |
| **fine_configuration**     | object | **[Object Fine Configuration](#object-fine-configuration)** - Late interest and penalty configuration        | -            |

### Object Fine Configuration

In the Fine Configuration Object, the penalty and late interest amounts of the credit operation are provided.

| Field                  | Type  | Description                                                                            | Max. Caract. |
|------------------------|-------|--------------------------------------------------------------------------------------|--------------|
| **contract_fine_rate** | float | Penalty rate for delay                                                       | -            |
| **interest_base**      | enum  | **[Enumerador Interest Base](#enumerador-interest-base)** - Interest calculation base | -            |
| **monthly_rate**       | float | Monthly late interest rate                                                 | -            |

### Object Rebates
| Field                           | Type   | Description                                                                                                                                                                                                        | Max. Caract. | 
|---------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **fee_type** *                  | enum | Fee Type.                                                                                                                                   | -            | 
| **amount_type** * | object | Amount Type.                                                                                 | -            |
| **amount** *                 | object | Fee amount. If the fee type is percentage, the value must be between 0 and 100. | -            |

### Response Body
| Field                      | Type   | Description                                                      | Max. Caract. |
|----------------------------|--------|----------------------------------------------------------------|--------------|
| **data[n].data**           | object | **[Object Data](#object-data)**                                | -            |
| **data[n].event_datetime** | date   | Moment of credit operation generation                      | -            |
| **data[n].key**            | string | **DEBT-KEY** - Unique key of the credit operation within QI | -            |
| **data[n].status**         | string | **[Possible status of a debt](../status_de_uma_divida)**     | -            |
| **data[n].type**           | string | _debt_                                                         | -            |

# Enumerators

### Person Type_Enumerators
| Enumerator             | Description             |
|------------------------|-----------------------|
| **legal**   | Corporate        |
| **natural**    | Person    |

### Amount Type_Enumerators
| Enumerator             | Description             |
|------------------------|-----------------------|
| **tac**   | Fee charged to the borrower. |
| **spread**    | Fee charged to the fund added to the operation's transfer price.    |

### Account Type_Enumerators
| Enumerator             | Description             |
|------------------------|-----------------------|
| **checking_account**   | checking account        |
| **deposit_account**    | deposit account     |
| **guaranteed_account** | guaranteed account     |
| **investment_account** | investment account |
| **payment_account**    | payment account    |
| **saving_account**     | saving account        |
| **salary_account**     | salary account         |

### Interest Type_Enumerators
| Enumerator           | Description                                                                                                                                                                |
|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **pre_price_days**   | Price amortization method (equal installments) with calculation of pre-fixed interest per day                                                                                     |
| **pre_price**        | Price amortization method (equal installments) with pre-fixed interest calculation in fixed periods (30 days)                                                                |
| **pre_sac**          | SAC amortization method (constant amortization) with pre-fixed interest calculation per day                                                                                 |
| **post_sac**         | SAC amortization method (constant amortization) with interest calculation based on a pre-fixed rate + post-fixed indexer (CDI, IPCA, or IGPM) per day                  |
| **post_price**       | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (CDI, IPCA, or IGPM) in fixed periods (30 days) |
| **post_price_days**  | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (CDI, IPCA, or IGPM) per day                     |

### Credit Operation Type_Enumerators
| Enumerator    | Description                      |
|---------------|--------------------------------|
| **ccb**       | Cédula de Crédito Bancário     |
| **cce**       | Cédula de Crédito à Exportação |
| **cci**       | Cédula de Crédito Imobiliário  |
| **nce**       | Nota de Crédito à Exportação   |

### Interest Base_Enumerators
| Enumerator            | Description                                                                 |
|-----------------------|---------------------------------------------------------------------------|
| **workdays**          | Interest calculation base in business days considering a year of 252 days    |
| **calendar_days**     | Interest calculation base in business days considering a year of 360 days|
| **calendar_days_365** | Interest calculation base in business days considering a year of 365 days |

### Fee Type_Enumerators
Cada tipo de fee deve ser previamente habilitado e configurado pela QI Tech

| Enumerator            | Description                                                                  |
|-----------------------|----------------------------------------------------------------------------|
| **tac**               | Registration opening fee                                             |
| **spread**            | Spread charged on the acquisition value of the credit operation                  |
| **warranty_analysis** | Warranty analysis fee                                             |
| **ted_fee**           | TED Fee                                                              |
| **spread_ted_fee**    | TED fee spread charged on the acquisition value of the credit operation |
| **spread_merchant**   | Spread allocated to merchant remuneration, charged on the acquisition (assignment) value of the credit operation |
| **tac_assignment_discount** | Portion of the registration opening fee (TAC) allocated to the fund (assignee), charged from the borrower; part of the operation's issued amount |

---

# Example of disbursement payloads

URL: /en/documentation/emissao_de_divida/emissao/exemplo_payloads_desembolso

Disburse to Internal QI Tech Account

ENDPOINT /debt
METHOD POST

```json title='Request Body'
{
	"disbursement_bank_accounts": [{
		"bank_code": "329",
		"branch_number": "001",
		"account_number": "6947216",
		"account_digit": "4",
		"document_number": "94632180173",
		"name": "Pedro Felipe Henrique Alves",
		"percentage_receivable": 100
	}]
  ...
}
```

--- 

### Disburse with Manual Pix

ENDPOINT /debt
METHOD POST

```json title='Request Body'
{
	"disbursement_bank_accounts": [{
			"document_number": "31233261000185",
			"name": "Jorge Augusto Salgado Salhani",
			"pix_transfer_type": "manual",
			"bank_code": "329",
			"branch_number": "0001",
			"account_number": "62400",
			"account_digit": "6",
			"percentage_receivable": 100
		}]
		...
}
```
:::info Pix Key Types
The “pix_key” can be a CPF, CNPJ, Email, Mobile Number, or a Random Key (UUID), following these formats:

CPF: Integer with 11 digits.

CNPJ: Integer with 14 digits.

Email: Text containing at least one “@”.

Mobile Number: Text containing the following values: “+55” + “Mobile DDD” + “Mobile Number as an integer with a minimum of 8 and a maximum of 9 digits”. Example: “+5511987654321”.

Random Key: UUID.
:::

---

### Disburse with Pix Key

ENDPOINT /debt
METHOD POST

```json title='Request Body'

{
	"disbursement_bank_accounts": [{
			"document_number": "31233261000185",
			"name": "Jorge Augusto Salgado Salhani",
			"pix_key": "2f205c99-3161-4120-badd-854039d12de6",
			"pix_transfer_type": "key"
		}]
		...
}
```
---

### Disburse with Pix QR Code

ENDPOINT /debt
METHOD POST

```json title='Request Body'

{
	"disbursement_bank_accounts": [{
			"qr_code_key": "b76e436e-4767-4b16-91e6-9bfc794f2510"
		}]
		...
}
```

---

### Disburse with TED

ENDPOINT /debt
METHOD POST

```json title='Request Body'

{
	"disbursement_bank_accounts": [{
			"transfer_method": "ted",
			"bank_code": "329",
			"branch_number": "0001",
			"account_number": "62400",
			"account_digit": "6",
			"document_number": "31233261000185",
			"name": "Jorge Conta destino de desembolso",
			"percentage_receivable": 100
		}]
		...
}
```

---

###  Disburse by Paying a Boleto

ENDPOINT /debt
METHOD POST

```json title='Request Body'

{
	"disbursement_bank_accounts": [{
		"digitable_line": "836400000169072200500006763953020230059001020193",
		"amount_receivable": 1607.22
	}]
		...
}
```

---

# Alternative Signatures

URL: /en/documentation/emissao_de_divida/formalizacao/assinatura_de_contrato

For the use of alternative forms of signature, the proof file dossier must be compressed into a .zip file and sent via the QI TECH /upload endpoint. The returned document_key can then be used in this endpoint as a form of contract signature.

Examples of alternative signatures:

- Recorded call;

- Credit analysis;

## Request

ENDPOINT /debt/ DEBT-KEY /signed
METHOD POST

**Request Body**

```json
{
    "type": "data-signature",
    "signatures": [
        {
            "signed_object": {
                "raw_text": "Lorem ipsum dolor sit amet, consectetur a....",
                "document_key": "79003de0-2590-455d-9b73-426b8ca284eb",
                "document_md5": "7521bd5621d97af26b2c1721fc4023a8"
            },
            "authenticity": {
                "timestamp": "1970-01-01 00:00:01",
                "document_key": "79003de0-2590-455d-9b73-426b8ca284eb",
                "document_md5": "79003de0-2590-455d-9b73-426b8ca284eb"
            },
            "signer": {
                "name": "IVANILDO DE SENA LIMA",
                "email": "ivanlima2604@gmail.com",
                "phone": {
                    "country_code": "055",
                    "area_code": "11",
                    "number": "999999999"
                },
                "document_number": "61766976204"
            },
            "authentication_type": "zip"
        }
    ]
}
```

## Path Params

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `debt_key` * | string |  Debt key returned at the moment of credit operation creation. | - |

## Body Params

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `type` * | string |  Type of signature to be sent. | - |
| `signatures` * | array of objects | List containing signature proof objects - must be sent in case of signature "type": "data-signature". |  **[Objects signatures](#object-signatures )**|
| `path-pdf-signed` * | string | URL with the signed PDF - must be sent in case of signature "type": "pdf-signature". | - |

### Object signatures

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `signed_object` | object | Object containing the document being signed. | **[Objects signed_object](#object-signed_object )** |
| `authenticity` | object | Object with authentication data. | **[Objects authenticity](#object-authenticity )** |
| `signer` | object | Object with the signatory's data. | **[Object signer](#object-signer )** |
| `authentication_type` *| string | Type of signature. | - |

### Object signed_object

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `raw_text` | string | Plain text with the contract data to be signed (Mandatory for opt-in type authentication). | - |
| `document_key` | string | DOCUMENT_KEY of the signed file sent via API 1.1 (mandatory only if the "raw_text" field is not sent). | - |
| `document_md5` | string | DOCUMENT_MD5 of the signed file sent via API 1.1 (mandatory only if the "raw_text" field is not sent). | - |

### Object authenticity

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `timestamp` *| string | Data da assinatura. | - |
| `document_key` * | string | DOCUMET_KEY retornado pela API 1.1 após o envio do arquivo com as evidencias de assinatura. | - |
| `document_md5` * | string | DOCUMET_MD5 retornado pela API 1.1 após o envio do arquivo com as evidencias de assinatura. | - |
 
### Object signer

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `name` *| string | Name of the signatory. | - |
| `email` *| string | Signatory's email. | - |
| `phone` | string | Object containing the signatory's phone. |  **[Object phone](#object-phone)** |
| `document_number` *| string | Signatory's document number. | - |

### Object phone

| Field |  Type | Description | Characters | 
|---|---|---|---|
|`country_code` *| string | Phone DDI code (https://ddi.guiamais.com.br/) | 3 | 
| `area_code` *| string | Phone area code (DDD) (https://ddd.guiamais.com.br/) | 2 |
| `number` *| string |Phone number (numbers only) |  10 |

## Response

STATUS 200

**Response Body**

```json
{
  "data": {},
  "event_datetime": "2022-11-07 15:24:47",
  "key": "\<DEBT-KEY\>",
  "status": "signature_received",
  "webhook_type": "debt"
}

```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

---

# Contract signing with OPT-IN

URL: /en/documentation/emissao_de_divida/formalizacao/assinatura_opt_in

## Request

ENDPOINT /debt/ DEBT-KEY /signed
METHOD POST

**Request Body**

```json
{
    "type": "data_signature",
    "signatures": [
        {
            "signed_object": {
                "raw_text": "Lorem ipsum dolor sit amet, consectetur a...."
            },
            "authenticity": {
                "timestamp": "1970-01-01 00:00:01",
                "ip_address": "179.104.42.245",
                "session_id": "ddb1d063-4fdf-4330-af9c-3316e9142ff3"
            },
            "signer": {
                "name": "IVANILDO DE SENA LIMA",
                "email": "ivanlima2604@gmail.com",
                "phone": {
                    "country_code": "055",
                    "area_code": "11",
                    "number": "999999999"
                },
                "document_number": "61766976204"
            },
            "authentication_type": "opt-in"
        }
    ]
}
```

## Path Params

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `debt_key` * | string |  Debt key returned at the moment of credit operation creation. | - |

## Body Params

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `type` * | string |  Type of signature to be sent. | - |
| `signatures` * | array of objects | List containing signature proof objects - must be sent in case of signature "type": "data-signature". |  **[Objects signatures](#object-signatures )**|

### Object signatures

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `signed_object` | object | Object containing the document being signed. | **[Objects signed_object](#object-signed_object )** |
| `authenticity` | object | Object with authentication data. | **[Objects authenticity](#object-authenticity )** |
| `signer` | object | Object with the signatory's data. | **[Object signer](#object-signer )** |
| `authentication_type` *| string | Type of signature. | - |

### Object signed_object

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `raw_text` * | string | Plain text with the contract data to be signed. | - |

### Object authenticity

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `timestamp` *| string | Signature date. | - |
| `ip_address` | string | Mandatory field for the "opt-in" authentication_type indicating the IP address where the acceptance was collected. | - |
| `session_id` | string | Session identification ID of the client at the time of signing - it must be queryable and the session evidence must be stored for a minimum period of 5 years (Mandatory for the "opt-in" authentication_type). | - |
| `geolocation` | object | Optional geolocation field. | - |
 
### Object signer

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `name` *| string | Signatory's name. | - |
| `email` *| string | Signatory's email. | - |
| `phone` | string | Object containing the signatory's phone number |  **[Object phone](#object-phone)** |
| `document_number` *| string | Signatory's document number. | - |

### Object phone

| Field |  Type | Description | Characters | 
|---|---|---|---|
|`country_code` *| string | Phone DDI code (https://ddi.guiamais.com.br/) | 3 | 
| `area_code` *| string | Phone area code (DDD) (https://ddd.guiamais.com.br/) | 2 |
| `number` *| string |Phone number (numbers only) |  10 |

## Response

STATUS 200

**Response Body**

```json
{
  "data": {},
  "event_datetime": "2022-11-07 15:24:47",
  "key": "\<DEBT-KEY\>",
  "status": "signature_received",
  "webhook_type": "debt"
}

```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

---

# Sending the signed PDF

URL: /en/documentation/emissao_de_divida/formalizacao/assinatura_pdf

## Request

ENDPOINT /debt/ DEBT-KEY /signed
METHOD POST

**Request Body**

```json
{
    "type": "pdf-signature",
    "path-pdf-signed": "https://www.google.com/"
}
```

## Path Params

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `debt_key` * | string |  Debt key returned at the moment of credit operation creation. | - |

## Body Params

| Field |  Type | Description | Characters | 
|---|---|---|---|
| `type` * | string |  Type of signature to be sent. | - |
| `path-pdf-signed` * | string | URL with the signed PDF - must be sent in case of signature "type": "pdf-signature". | - |

## Response

STATUS 200

**Response Body**

```json
{
  "data": {},
  "event_datetime": "2022-11-07 15:24:47",
  "key": "\<DEBT-KEY\>",
  "status": "signature_received",
  "webhook_type": "debt"
}

```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

---

# Selfie Signatures

URL: /en/documentation/emissao_de_divida/formalizacao/assinatura_selfie

Selfie authentication is available to partners using QI Tech's credit analysis services, where selfie authentication is validated, and a proof ID is generated. 

This ID, generated through QI Tech's credit analysis endpoints, can be used as a contract signature.

## Request

ENDPOINT /debt/ DEBT-KEY /signed
METHOD POST

**Request Body**

```json
{
    "type": "data-signature",
    "signatures": [
        {
            "signed_object": {
                "raw_text": "Lorem ipsum dolor sit amet, consectetur a....",
                "document_key": "79003de0-2590-455d-9b73-426b8ca284eb",
                "document_md5": "7521bd5621d97af26b2c1721fc4023a8"
            },
            "authenticity": {
                "timestamp": "1970-01-01 00:00:01",
                "facial_recognition_key": "79003de0-2590-455d-9b73-426b8ca284eb"
            },
            "signer": {
                "name": "IVANILDO DE SENA LIMA",
                "email": "ivanlima2604@gmail.com",
                "phone": {
                    "country_code": "055",
                    "area_code": "11",
                    "number": "999999999"
                },
                "document_number": "61766976204"
            },
            "authentication_type": "opt-in"
        }
    ]
}
```

## Path Params

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
| `debt_key` * | string |  Chave da divida devolvida no momento da criação da operação de crédito. | - |

## Body Params

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
| `type` * | string |  Tipo de assinatura que será enviada. | - |
| `signatures` * | array of objects | Lista contendo objetos de comprovação de assinatura - deve ser enviado no caso de assinatura "type": "data-signature". |  **[Objects signatures](#object-signatures )**|

### Object signatures

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
| `signed_object` | object | Objeto contendo o documento que esta sendo assinado. | **[Objects signed_object](#object-signed_object )** |
| `authenticity` | object | objeto com dados de autenticação. | **[Objects authenticity](#object-authenticity )** |
| `signer` | object | Objeto com os dados do signatário. | **[Object signer](#object-signer )** |
| `authentication_type` *| string | Tipo de assinatura. | - |

### Object signed_object

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
| `raw_text` | string | Texto corrido com os dados do contrato que será assinado (Obrigatório para autenticação tipo opt-in). | - |
| `document_key` | string | DOCUMENT_KEY do arquivo assinado enviado a partir da API 1.1 (obrigatório apenas caso o campo "raw_text" não seja enviado). | - |
| `document_md5` | string | DOCUMENT_MD5 do arquivo assinado enviado a partir da API 1.1 (obrigatório apenas caso o campo "raw_text" não seja enviado). | - |

### Object authenticity

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
| `timestamp` *| string | Data da assinatura. | - |
| `facial_recognition_key` * | string | Deve conter o facial_recognition_key devolvido pela API de face recognition QI Tech - Este campo só é disponível para o authentication_type "selfie" e exclui a obrigatoriedade do envio de outras comprovações. | - |
 
### Object signer

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
| `name` *| string | Nome do signatário. | - |
| `email` *| string | E-mail do signatário. | - |
| `phone` | string | Objeto de telefone do signatário. |  **[Object phone](#object-phone)** |
| `document_number` *| string | Numero de documento do signatário. | - |

### Object phone

| Campo |  Tipo | Descrição | Caracteres | 
|---|---|---|---|
|`country_code` *| string | Código DDI do telefone (https://ddi.guiamais.com.br/) | 3 | 
| `area_code` *| string | Código DDD do telefone (https://ddd.guiamais.com.br/) | 2 |
| `number` *| string |Número de telefone (apenas números) |  10 |

## Response

STATUS 200

**Response Body**

```json
{
  "data": {},
  "event_datetime": "2022-11-07 15:24:47",
  "key": "\<DEBT-KEY\>",
  "status": "signature_received",
  "webhook_type": "debt"
}

```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

---

# Debt Formalization

URL: /en/documentation/emissao_de_divida/formalizacao/introducao_formalizacao

By default, QI Tech collects signatures via QI Sign, and the contract is sent to the signatories at the time of issuance. However, there is also the possibility for the partner to independently collect signatures and send the signed document or signature evidence to QI Tech to proceed with the operation.

:::caution **Attention**

For the partner to collect signatures and then submit the signed document via API, it is necessary to request the configuration of this flow from the QI Tech support team.
:::

The signing process can be done in two ways:

1 - Signatures are collected through the QI Tech platform;

2 - The partner independently collects signatures and then sends the signed contract to QI Tech - This option allows for either the submission of the signed PDF or the submission of a signature hash;

The flow of calls changes according to the chosen process and can follow the call paths below:

## Flow 1
After requesting the configuration of signature flow 1 from the QI Tech support team, the only call needed to issue the debt is the call from set 3, according to the credit borrower of the operation. 

QI Tech will issue the pre-configured credit contract and send it for signing - the operation can be monitored via API 5.1 or through the sent callbacks.

The document is signed through the QI Sign platform and can occur via email, WhatsApp, or SMS within 7 days after the contract issuance.

Due to the asynchronous nature of the signature, when the contract is signed by the borrower, an event is triggered via webhook to the originator.

## Flow 2
After requesting the configuration of signature flow 2 from the QI Tech support team, there is a sequence of calls that must be made.

The first call will necessarily be the set of APIs 3 (according to the credit borrower of the operation) to issue the contract PDF, and the last call will be API 4.1 to submit the already signed contract.

In the case of document signing via a certification authority, it is necessary to send the URL with the signed PDF in API 4.1.

In the case of signing via opt-in on the frontend, the information to be sent in API 4.1 will be the acceptance evidence from the client.

QI Tech will then follow the flow for disbursement - the operation can be monitored using API 5.1 or through the sent webhooks.

## Accepted Signature Types

### **pdf-signature**
This type indicates that the PDF issued through "/debt" will be signed, and the link to the signed PDF will be sent via API 4.1 as a form of authentication.

### **data-signature**
This type indicates that the PDF issued through "/debt" will be signed through a hash attached to its last page.

Data authentication can have three types:

#### **Opt-in**
Opt-in signature means that the client will consent to the contract through the frontend. 

For this signature to be valid, some data must be sent mandatorily.

#### **Zip**
Zip signature involves the submission of a proof file, such as a recorded call.

#### **Selfie**
Selfie authentication is available to partners using QI Tech's CaaS services, where selfie authentication is validated, and a proof ID is generated.

---

# Generate Bank Slip or PIX for an Installment

URL: /en/documentation/emissao_de_divida/gerar_boleto_ou_pix_para_uma_parcela

Allows you to generate a bank slip or PIX code for the payment of a specific installment of a credit operation.

## Endpoint

### Request

ENDPOINT /debt/ DEBT-KEY /installment/ INSTALLMENT-KEY / PAYMENT-TYPE
METHOD POST
Path Parameters
| Parameter | Type | Description |
|-----------|------|-----------|
| DEBT-KEY | string | Debt identifier key |
| INSTALLMENT-KEY | string | Installment identifier key |
| PAYMENT-TYPE | string | Desired payment type: bankslip (Bank Slip) or pix (PIX QR code) |
Request Body
```json
{}
```
Response
Response Body
```json
{
  "installment_key": "installment_key",
  "due_date": "2022-09-08",
  "business_due_date": "2022-09-09",
  "pre_fixed_amount": 70.0,
  "principal_amortization_amount": 1000.0,
  "total_amount": 1070.0,
  "bank_slip_key": "bank_slip_key",
  "qr_code_key": "qr_code_key",
  "qr_code_url": "qr_code_url",
  "digitable_line": "digitable_line"
}
```
Response Body Object
| Field | Type | Description |
|-------|------|-----------|
| installment_key | string | Unique identifier of the installment in UUID format |
| due_date | string | Installment due date in YYYY-MM-DD format |
| business_due_date | string | Installment due date on a business day in YYYY-MM-DD format |
| pre_fixed_amount | number | Interest amount |
| principal_amortization_amount | number | Principal amount to be amortized |
| total_amount | number | Total installment amount (interest + principal) |
| bank_slip_key | string | Bank slip identifier key |
| qr_code_key | string | PIX QR code identifier key |
| qr_code_url | string | URL for PIX QR code payment |
| digitable_line | string | Bank slip digitable line |

---

# Introduction

URL: /en/documentation/emissao_de_divida/introducao

In this section, you will learn about the necessary steps for issuing, formalizing, disbursing, and canceling a credit contract.

### 1 - Uploading Required Documents for Debt Issuance

To issue a debt, certain regulatory criteria must be met. One of these criteria is the identification of the debtor by the financial institution issuing the credit. To fulfill this criterion, at a minimum, the following documents must be submitted:

- **Person**: Official photo ID (RG or CNH);
- **Corporate**: Articles of Incorporation/Bylaws, Election Meeting Minutes (for corporations), Official photo ID of representatives, Power of Attorney (if there are proxies)

To submit these documents, you must use our document upload endpoint.

:::danger Attention!

QI Tech offers a comprehensive Onboarding solution, including OCR for document validation and Anti-fraud measures.

[Check the service API documentation here.](https://www.zaig.com.br/en/devcenter.html)

For quotations and more information, please contact our sales team:

Email: comercial@qitech.com.br
Phone: (11) 2339-4763
:::

### 2 - Debt Simulation

At QI Tech, we provide our clients the ability to simulate credit operation values before their actual issuance. The simulation follows the same pattern as the debt issuance request, but it's not necessary to provide the debtor's registration and disbursement account details. Furthermore, we offer the possibility to perform several simulations with a single request..

### 3 - Debt Issuance
With the credit operation draft defined, the QI Tech support team will parameterize the contract on the platform, and its PDF can be issued through the debt issuance endpoint, as per the cases below:
To issue a debt for an person.
- [To issue a debt for an person.](emissao/emissao_de_divida_pf)
- [To issue a debt for a corporate entity.](emissao/emissao_de_divida_pj)

### 4 - Signature Process
After completing all these steps, we move on to the debt assignment process, which is 100% managed by QI Tech.
Para entender as configurações de assinatura [clique aqui](formalizacao/introducao_formalizacao).

### 5 - Operation Disbursement
The disbursement is automatic and can be configured in two ways. To understand the disbursement configurations [here](emissao/exemplo_payloads_desembolso).

:::info Information
By default, operations are disbursed via PIX to the account provided for the operation, but there are five options that can be selected:

**1- Pix with account information;**;

**2- Pix with key;**;

**3- Ted**;

**4- QR code Pix**;

**5- Boleto**;

They have specific fields and are detailed in the "disbursement_bank_accounts" key of the contract issuance.
:::

The QI Tech disbursement routine runs every minute, checking if all the configured requirements for the product have been met for that specific contract and updating its status.

### Requirements for Disbursement:

- **Disbursement Date**

The credit contract of the operation is only disbursed on the date defined as "disbursement_date".

- **Issued and Signed Credit Contract**

The credit contract of the operation must be issued and signed.

- **Collateral Constituted**

In the case of operations that require guarantees, the collateral must be constituted for disbursement to proceed.

- **Disbursement Approval**

If the "approval for disbursement" configuration is active, the contract will only be disbursed after the approval API call.

- **Operations with Down Payment Must Be Paid**

If the created operation has a down payment parameter, the disbursement only occurs after the payment and financial settlement in the QI Tech system.

- **Limit Alignment**

If the "high frequency disbursement" configuration is active, it is required to have an available credit limit for the operation to be disbursed.

- **Contract Assignment**

If the "disbursement after assignment" configuration is active, the operation must be assigned for the operation to be disbursed.

:::danger Attention
QI Tech does not provide credit! We are a debt facilitators and not competitors to our customers.
:::

---

# Banking correspondant monitoring

URL: /en/documentation/emissao_de_divida/mcb

---

:::caution API under development 
This API is still in its development phase. With this said, this manual is subject to alterations.
:::

## 1. Registered Corban score consulting:

### Request

ENDPOINT /mcb/requester
METHOD GET

### Response

ENDPOINT /mcb/requester
METHOD GET
HTTP STATUS 200

Response Body

```json
{
    "document_number": "56201278000181",
    "requester_status": "according",
    "name": "TESTE SERVICOS LTDA",
    "trading_name": "TESTE",
    "city": "SAO PAULO",
    "state": "SP",
    "requester_history": [
        {
            "reference_date": "2025-05-19",
            "requester_status": "according",
            "demand_percentage": 28.13,
            "legal_action_percentage": 9.81,
            "do_not_disturb_percentage": 0
        }
    ]
}
```

### Response body details

| Field                       | Type   | Description                                             |
|-----------------------------|--------|---------------------------------------------------------|
| `document_number`           | string | Corban CNPJ.                                            |
| `name`                      | string | Corban company name.                                    |
| `trading_name`              | string | Corban trade name.                                      |
| `city`                      | string | Corban city.                                            |
| `state`                     | string | Corban state (follows Brazilian UF).                    |
| `requester_status`          | string | Corban status on MCB.                                   |
| `requester_history`         | list   | Corban update history.                                  |
| `reference_date`            | string | Update reference date.                                  |
| `demand_percentage`         | number | Complaint index (percentage).                           |
| `legal_action_percentage`   | number | Legal actions index (percentage).                       |
| `do_not_disturb_percentage` | number | Complaints linked to do not disturb index (percentage). |

#### Enumerator requester status

| Enumerator             | Description                       |
|------------------------|-----------------------------------|
| **according**          | Corban is in accordance           |
| **partialy_according** | Corban is partially in accordance |
| **not_according**      | Corban is not in accordance       |
| **not_rated**          | Corban is not rated               |

## 2. Consult credit agent: 

### Request

ENDPOINT /mcb/credit_agent/[CPF-DO-AGENTE]
METHOD GET

#### QUERY PARAMETERS

| Enumerator          | Description                                                 |
|---------------------|-------------------------------------------------------------|
| **include_history** | Required parameter to return the agent's score history |

### Response

ENDPOINT /mcb/credit_agent/[CPF-DO-AGENTE]
METHOD GET
HTTP STATUS 200

Response Body

```json
{
    "document_number": "02353050069",
    "credit_agent_status": "active",
    "credit_agent_external_status": "active",
    "block_reason": null,
    "credit_agent_history": [
        {
            "credit_agent_status": "active",
            "credit_agent_external_status": "active",
            "block_reason": null,
            "current_score": 0,
            "total_score": 0,
            "score_expiration_date": null,
            "suspension_start_date": null,
            "suspension_end_date": null,
            "reference_date": "2025-06-26"
        }
    ]
}
```

### Response body details

| Field                          | Type   | Description                         |
|--------------------------------|--------|-------------------------------------|
| `document_number`              | string | Credit agent CPF.                   |
| `credit_agent_status`          | string | Credit agent status.                |
| `credit_agent_external_status` | string | Credit agent status on MCB.         |
| `block_reason`                 | string | Credit agent block reason.          |
| `current_score`                | number | Credit agent current score.         |
| `total_score`                  | number | Credit agent total score.           |
| `score_expiration_date`        | string | Credit agent score expiration date. |
| `suspension_start_date`        | string | Credit agent suspension start date. |
| `suspension_end_date`          | string | Credit agent suspension end date.   |
| `credit_agent_history`         | list   | Credit agent update history.        |
| `reference_date`               | string | Update reference date.              |

#### Enumerator credit_agent_external_status

| Enumerator                | Description                                         |
|---------------------------|-----------------------------------------------------|
| **active**                | Agent is active                                     |
| **suspended**             | Agent is suspended for 12 months                    |
| **permanently_suspended** | Agent is indeterminately suspended                  |
| **suspension_warning**    | Agent is active, but has been accused of scam/fraud |

#### Enumerator credit_agent_status

| Enumerator  | Description                                         |
|-------------|-----------------------------------------------------|
| **active**  | Agent is active                                     |
| **blocked** | Agent is blocked and can not emit credit operations |

#### Enumerator block_reason

| Enumerator                   | Description                       |
|------------------------------|-----------------------------------|
| **mcb_report_file**          | Blocked by mcb report file        |
| **expired_certificate**      | Blocked by an expired certificate |

## 3. Consult credit agents' certificate in  CRCP: 

### Request

ENDPOINT /mcb/credit_agent/[CPF-DO-AGENTE]/certificate
METHOD GET

STATUS 200

Response Body

```json
{
    "document_number": "12345678911",
    "name": "NOME DO AGENTE DE CREDITO",
    "certificate_list": [
        {
            "certifier_name": "FEBRABAN",
            "certifier_code": "6345",
            "title": "LGPD para Correspondentes no Pais Res 4 935",
            "certificate_number": "1234567891234567",
            "exam_date": "11/01/2022",
            "expiration_date": "11/01/2024",
            "certificate_status": "excluded"
        },
        {
            "certifier_name": "FEBRABAN",
            "certifier_code": "6339",
            "title": "PLDFT em Conta Corrente Poupanca para Correspondente",
            "certificate_number": "1234567891234567",
            "exam_date": "28/12/2023",
            "expiration_date": "28/12/2025",
            "certificate_status": "active"
        },
    ]
}
```

STATUS 404

Response Body

```json
{
	"title": "Not Found",
	"description": "Credit agent not found.",
	"translation": "Agente de crédito não encontrado.",
	"code": "MCB000004"
}
```

### Response body details

| Field                | Type   | Description                  |
|----------------------|--------|------------------------------|
| `document_number`    | string | Credit agents CPF.           |
| `name`               | string | Credit agent name.           |
| `certificate_list`   | list   | Credit agents certificates.  |
| `certifier_name`     | string | Certifier company name.      |
| `certifier_code`     | string | Certificate type code .      |
| `title`              | string | Certification title.         |
| `certificate_number` | string | Certificate number.          |
| `exam_date`          | string | Certificate exam date.       |
| `expiration_date`    | string | Certificate expiration date. |
| `certificate_status` | string | Certificate status.          |

#### Enumerator certificate_status

| Enumerator   | Description                                   |
|--------------|-----------------------------------------------|
| **active**   | Certificate is active                         |
| **excluded** | Certificate has been excluded by certificator |

---

# Metadata

URL: /en/documentation/emissao_de_divida/metadata

Object that allows querying credit operations through custom keys and values.

## 1. Create Metadata

### Request Body Object
| Field                           | Type   | Description                                                                                                                                                                                                        | Max. Chars. | 
|---------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **metadata_key** * | string | Metadata key                                                                                                                                                          | 100            |
| **metadata_value** * | string | Metadata value    | 100            |

### Request

ENDPOINT /credit_operation/[CREDIT-OPERATION-KEY]/metadata
METHOD POST

Request Body

```json
{
    "metadata_key": "key",
    "metadata_value": "value"
}
```

## 2. Remove Metadata

### Request

ENDPOINT /credit_operation/[CREDIT-OPERATION-KEY]/metadata
METHOD DELETE

Request Body

```json
{
    "metadata_key": "key",
    "metadata_value": "value"
  }
```

## 3. Credit operation query using Metadata

:::caution 
When querying by metadata, both fields 'metadata_key' and 'metadata_value' must be provided.
:::

### Request

ENDPOINT /credit_operations
METHOD GET
<div className='badge
badge--primary'>PARAMETERS page, page_size, metadata_key, metadata_value, credit_operation_status

### Response

Response Body
```json
{
    "data": [
        {
            "credit_operation_key": "cc217253-e89f-4d14-bf89-fb29afaa2895",
            "contract_number": "0000000007/WO",
            "credit_operation_status": "waiting_signature",
            "additional_iof": 3.817322,
            "total_iof": 7.19,
            "original_total_iof": 7.2,
            "attached_documents": [
                {
                    "document_key": "2f7bfc50-d7c0-4d4e-a5ce-d8bba2aeb348",
                    "document_url": "https://storage.googleapis.com/dev-doc-api/documents/2f7bfc50-d7c0-4d4e-a5ce-d8bba2aeb348/sample.pdf",
                    "signature_url": null,
                    "document_type": "document_identification",
                    "signature_required": false,
                    "signed": false
                },
                {
                    "document_key": "568ca6b7-45a8-42e5-a383-e93641625040",
                    "document_url": "b",
                    "signature_url": null,
                    "document_type": "ccb_pre_price",
                    "signature_required": true,
                    "signed": false
                }
            ],
            "annual_cet": 316.4973,
            "assigned": false,
            "assigned_at": null,
            "assignment_amount": 1007.19,
            "issue_amount": 1007.19,
            "disbursed_issue_amount": 1000,
            "final_disbursement_amount": 1000,
            "base_iof": 3.37226774,
            "calculus_correction": null,
            "central_depository": null,
            "cet": 12.62,
            "collateral_constituted": true,
            "collateral_type": null,
            "contract_fee_amount": 0,
            "external_contract_fee_amount": 0,
            "credit_operation_type": "ccb",
            "operation_type": "structured_operation",
            "creditor_bank_account_key": null,
            "custodian": "qi_scd",
            "disbursement_date": "2022-08-08",
            "disbursement_start_date": "2022-08-08",
            "disbursement_end_date": "2022-08-08",
            "first_due_date": "2022-08-18",
            "disbursement_accounts": [
                {
                    "account_branch": "0001",
                    "account_digit": "3",
                    "account_number": "94134",
                    "account_type": null,
                    "disbursement_type": "pix",
                    "amount_receivable": null,
                    "digitable_line": null,
                    "financial_institutions_code_number": 329,
                    "ispb": "32402502",
                    "name": "Teste",
                    "percentage_receivable": 100,
                    "pix_key": "qitech@qitech.com.br",
                    "pix_transfer_key": "0956cf37-5ef6-4a63-9c01-f29b259e1993",
                    "pix_type": "key",
                    "qr_code_key": null
                }
            ],
            "document_certifier": "clicksign",
            "number_of_installments": 3,
            "installments": [
                {
                    "accrual_reference_date": null,
                    "advanced_paid_amount": 0,
                    "bank_slip_key": null,
                    "business_due_date": "2022-08-19",
                    "due_date": "2022-08-18",
                    "calendar_days": 10,
                    "digitable_line": null,
                    "due_interest": 0,
                    "due_principal": 1007.19,
                    "fine_amount": null,
                    "has_interest": true,
                    "installment_key": "5f45b7b4-f7f0-464b-94a7-cdea47f3811b",
                    "installment_status": "created",
                    "installment_type": "principal",
                    "original_due_principal": 1007.19,
                    "original_pre_fixed_amount": 38.24205854,
                    "original_principal_amortization_amount": 351.17794146,
                    "paid_amount": 0,
                    "post_fixed_amount": 0,
                    "original_total_amount": 389.42,
                    "pre_fixed_amount": 38.24205854,
                    "principal_amortization_amount": 351.17794146,
                    "qr_code_key": null,
                    "qr_code_url": null,
                    "renegotiation_proposal_key": null,
                    "tax_amount": 0.28796591,
                    "total_accrual_amount": null,
                    "total_amount": 389.42,
                    "total_paid_amount": 0,
                    "workdays": 8
                },
                {
                    "accrual_reference_date": null,
                    "advanced_paid_amount": 0,
                    "bank_slip_key": null,
                    "business_due_date": "2022-09-20",
                    "due_date": "2022-09-19",
                    "calendar_days": 32,
                    "digitable_line": null,
                    "due_interest": 0,
                    "due_principal": 656.01205854,
                    "fine_amount": null,
                    "has_interest": true,
                    "installment_key": "f844a3ea-bde3-4f94-ada1-607e799b9095",
                    "installment_status": "created",
                    "installment_type": "principal",
                    "original_due_principal": 656.01205854,
                    "original_pre_fixed_amount": 80.33658151,
                    "original_principal_amortization_amount": 309.08341849,
                    "paid_amount": 0,
                    "post_fixed_amount": 0,
                    "original_total_amount": 389.42,
                    "pre_fixed_amount": 80.33658151,
                    "principal_amortization_amount": 309.08341849,
                    "qr_code_key": null,
                    "qr_code_url": null,
                    "renegotiation_proposal_key": null,
                    "tax_amount": 1.06448329,
                    "total_accrual_amount": null,
                    "total_amount": 389.42,
                    "total_paid_amount": 0,
                    "workdays": 21
                },
                {
                    "accrual_reference_date": null,
                    "advanced_paid_amount": 0,
                    "bank_slip_key": null,
                    "business_due_date": "2022-10-19",
                    "due_date": "2022-10-18",
                    "calendar_days": 29,
                    "digitable_line": null,
                    "due_interest": 0,
                    "due_principal": 346.92864005,
                    "fine_amount": null,
                    "has_interest": true,
                    "installment_key": "e6d67f54-8827-40c4-ade0-1b9b8fd03689",
                    "installment_status": "created",
                    "installment_type": "principal",
                    "original_due_principal": 346.92864005,
                    "original_pre_fixed_amount": 42.49135995,
                    "original_principal_amortization_amount": 346.92864005,
                    "paid_amount": 0,
                    "post_fixed_amount": 0,
                    "original_total_amount": 389.42,
                    "pre_fixed_amount": 42.49135995,
                    "principal_amortization_amount": 346.92864005,
                    "qr_code_key": null,
                    "qr_code_url": null,
                    "renegotiation_proposal_key": null,
                    "tax_amount": 2.01981854,
                    "total_accrual_amount": null,
                    "total_amount": 389.42,
                    "total_paid_amount": 0,
                    "workdays": 20
                }
            ],
            "interest_grace_period": 0,
            "interest_payment_month_period": 1,
            "interest_subsidy_amount": 0,
            "interest_subsidy_percentage": 0,
            "interest_type": "pre_price",
            "iof_charge_method": "financed",
            "ipoc_code": "3240250202021371976458320000000007/WO",
            "issue_date": "2022-08-08",
            "issuer_document_number": "37197645832",
            "issuer_name": "Wilker Oliveira\u00e7o",
            "modality": "0202",
            "origin_key": "52539e23-5c01-4b9c-8a68-6ed750ec7bc5",
            "payment_and_settlement_agent": "qi_scd",
            "post_fixed_interest_rate": null,
            "prefixed_interest_rate": {
                "annual_rate": 3,
                "daily_rate": 0.00385824,
                "monthly_rate": 0.12246205,
                "interest_base": "calendar_days"
            },
            "fine_configuration": {
                "contract_fine_rate": 0.02,
                "fine_delay_rate": {
                    "annual_rate": 0.12682503,
                    "daily_rate": 0.00033173,
                    "interest_base": "calendar_days",
                    "monthly_rate": 0.01
                }
            },
            "principal_amortization_month_period": 1,
            "principal_grace_period": 0,
            "purchaser_document_number": "04113929151550",
            "requester_key": "52f36417-368e-4f5b-8841-71e3b9caa72f",
            "requester_identifier_key": null,
            "settlement_bank_account_key": "e7e60779-6605-4af5-bd00-1f465f2c5da5",
            "share_quantity": 2,
            "tax_configuration": {
                "iof_additional_rate": 0.000082,
                "iof_rate": 0.0038
            },
            "third_party_account_key": "96015228-4905-42fc-bda6-e70e0e552b6b",
            "disbursement_options": [
                {
                    "additional_iof": 3.817322,
                    "annual_cet": 316.4973,
                    "assignment_amount": 1007.19,
                    "base_iof": 3.37226774,
                    "calculus_correction": null,
                    "cet": 12.62,
                    "contract_fee_amount": 0,
                    "disbursed_issue_amount": 1000,
                    "disbursement_date": "2022-08-08",
                    "external_contract_fee_amount": 0,
                    "first_due_date": "2022-08-18",
                    "installments": [
                        {
                            "business_due_date": "2022-08-19",
                            "due_date": "2022-08-18",
                            "calendar_days": 10,
                            "due_interest": 0,
                            "due_principal": 1007.19,
                            "fine_amount": null,
                            "has_interest": true,
                            "post_fixed_amount": 0,
                            "pre_fixed_amount": 38.24205854,
                            "principal_amortization_amount": 351.17794146,
                            "tax_amount": 0.28796591,
                            "total_amount": 389.42,
                            "workdays": 8
                        },
                        {
                            "business_due_date": "2022-09-20",
                            "due_date": "2022-09-19",
                            "calendar_days": 32,
                            "due_interest": 0,
                            "due_principal": 656.01205854,
                            "fine_amount": null,
                            "has_interest": true,
                            "post_fixed_amount": 0,
                            "pre_fixed_amount": 80.33658151,
                            "principal_amortization_amount": 309.08341849,
                            "tax_amount": 1.06448329,
                            "total_amount": 389.42,
                            "workdays": 21
                        },
                        {
                            "business_due_date": "2022-10-19",
                            "due_date": "2022-10-18",
                            "calendar_days": 29,
                            "due_interest": 0,
                            "due_principal": 346.92864005,
                            "fine_amount": null,
                            "has_interest": true,
                            "post_fixed_amount": 0,
                            "pre_fixed_amount": 42.49135995,
                            "principal_amortization_amount": 346.92864005,
                            "tax_amount": 2.01981854,
                            "total_amount": 389.42,
                            "workdays": 20
                        }
                    ],
                    "interest_subsidy_amount": 0,
                    "issue_amount": 1007.19,
                    "net_external_contract_fee_amount": 0,
                    "share_quantity": 2,
                    "total_iof": 2,
                    "prefixed_interest_rate": {
                        "annual_rate": 3,
                        "daily_rate": 0.00385824,
                        "monthly_rate": 0.12246205,
                        "interest_base": "calendar_days"
                    }
                }
            ],
            "related_parties": [
                {
                    "company_document_number": null,
                    "email": "teste.teste@yopmail.com",
                    "foundation_date": null,
                    "gender": "male",
                    "individual_document_number": "61592798071",
                    "is_pep": null,
                    "marital_status": null,
                    "mother_name": null,
                    "nationality": null,
                    "person_type": "natural",
                    "related_party_key": "16e3b6a8-bec0-4bd2-8b23-caaad54afd8c",
                    "role_type": "issuer",
                    "trading_name": null,
                    "simples_nacional_participant": null,
                    "spouse_document_number": null,
                    "profession": null,
                    "address": {
                        "city": "Bauru",
                        "complement": null,
                        "neighborhood": "Centro",
                        "number": "343",
                        "postal_code": "17057770",
                        "state": "SP",
                        "street": "Av Um"
                    },
                    "phone": {
                        "area_code": "14",
                        "country_code": "055",
                        "number": "936180266"
                    },
                    "attached_documents": [
                        {
                            "document_key": "2f7bfc50-d7c0-4d4e-a5ce-d8bba2aeb348",
                            "document_url": "https://storage.googleapis.com/dev-doc-api/documents/2f7bfc50-d7c0-4d4e-a5ce-d8bba2aeb348/sample.pdf",
                            "signature_url": null,
                            "document_type": "document_identification",
                            "signature_required": false,
                            "signed": false
                        }
                    ]
                }
            ]
        }
    ],
    "pagination": {
        "current_page": 1,
        "next_page": 2,
        "rows_per_page": 10,
        "total_pages": 1,
        "total_rows": 1,
        "contain_last_page": true
    }
}

```

---

# Do not disturb

URL: /en/documentation/emissao_de_divida/nao_me_perturbe

"Do not disturb" is a platform that was created by telecommunications operators that allows consumers to register their phone number to not actively receive telemarketing content. In the consigned credit context, its utilization was incorporated as a measure of the 'Autoregulação do Crédito Consignado' (Consigned Credit Autoregulation) promoted by entities such as the Febraban, ABBC and CNF, with its goal to protect consumers against abusive practices in credit offers.

As a financial institution that is adherant to the "Do not disturb", we have implemented a verification mechanism that guarantees that there are no unwanted calls to blacklisted telephone numbers. Through this API, it is possible to verify whether a specific number has requested to be inserted into the "Do not disturb" database prior to any active credit offers. 

This verification is essential to ensure compliance with good faith business practices respecting customers privacy. 

:::caution Caution
Consulting the database prior to prospecting crucial.
:::

## Using guide

To consult the database, one must send a phone number through the following endpoint.

ENDPOINT /do_not_disturb?phone_number=11999999999
METHOD GET

:::caution Caution
The number must be formatted as DDD + Number, for example: 11999999999.
:::

### Response

STATUS 200 - Number found on "Do not disturb" list
STATUS 404 - Number not found on "Do not disturb" list

:::caution Caution
If the number is found on the "Do not disturb" list, a call is not to be followed through.
:::

---

# Introduction

URL: /en/documentation/emissao_de_divida/reapresentacao_de_conta_bancaria

This page will aid you to disburse after receiving a disbursement error

### 1 - Updating disbursement account

First, you must update the disbursement bank account

#### Request

ENDPOINT /debt/DEBT/disbursement_bank_accounts
MÉTODO PUT

Request Body

**Using bank account data**

```json
{
	"disbursement_bank_accounts": [{
			"document_number": "31233261000185",
			"name": "Jorge Augusto Salgado Salhani",
			"pix_transfer_type": "manual",
			"bank_code": "329",
			"branch_number": "0001",
			"account_number": "62400",
			"account_digit": "6",
			"percentage_receivable": 100
		}]
}
```

**Using Pix Key**

```json
{
	"disbursement_bank_accounts": [{
			"document_number": "31233261000185",
			"name": "Jorge Augusto Salgado Salhani",
			"pix_key": "2f205c99-3161-4120-badd-854039d12de6",
			"pix_transfer_type": "key"
		}]
}
```

### 2 - Updating disbursement date

Next, you must update the disbursement date

#### Request

ENDPOINT /debt/DEBT/disbursement_option
MÉTODO PATCH

Request Body

**Atualização de data de desembolso**

```json
{
    "disbursement_date": "2025-11-28",
    "status": "active"
}
```

---

# Resend related party documents for the credit contract

URL: /en/documentation/emissao_de_divida/reenviar_documentos_das_partes_relacionadas

## Request

ENDPOINT /debt/ DEBT-KEY /related_party/ RELATED-PARTY-KEY /attached_document
METHOD POST

**Request Body**

```json
{
    "document_identification": "2893fc74-88fd-4cc9-a5c6-8a63d9d00f41",
    "document_identification_back": "e881ddf4-bc9a-48e0-9555-cac979f65431",
    "wedding_certificate": "955a0e36-1abd-4efd-868a-f0b3d53bc585",
    "proof_of_residence": "ea5f7b08-77fd-4adb-8bf5-f86379c28ee3",
    "company_statute": "150292ad-be66-4ba0-a306-0ceda20616f0",
    "directors_election_minute": "ca37979e-6f11-4465-bf3b-69cd8307549c"
}

```

### PATH PARAMS

| Field | Type | Description |
|---|---|---|
| `debt_key` * | string | Operatio debt_key |
| `related_party_key` * | string |  Key of the related party to whom the documents will be sent. |

### BODY PARAMS

| Field | Type | Description | Characters | 
|---|---| ---| ---|
| `document_identification` | string | Front side of RG or CNH for person_type "natural" | chave uuid | 
| `document_identification_back` | string | Back side of RG or CNH for person_type "natural". | chave uuid | 
| `wedding_certificate` | string |Marriage certificate for person_type "natural". | chave uuid | 
| `proof_of_residence` | string | Proof of residence for person_type "natural". | chave uuid | 
| `company_statute` | string | Articles of association for person_type "legal". | chave uuid | 
| `directors_election_minute` | string | Board of directors election minutes for person_type "legal".. |  uuid key | 

## Response

STATUS 201

**Response Body**

```json
"
{}
"
```

STATUS 400

**Response Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Reprocess post-disbursement action

URL: /en/documentation/emissao_de_divida/reprocessar_acao_pos_desembolso

This endpoint can be used to retry payment of a post-disbursement action.

## Reprocess post-disbursement action by modifying action data

### Request

ENDPOINT /baas/action/ ACTION-KEY
METHOD PATCH

Request Body

```json
{
	"destination": {
		"name": "Nome do titular da conta destino",
		"account_digit": "1",
		"account_branch": "1012",
		"account_number": "12345",
		"document_number": "12345678911",
		"financial_institution_code_number": "341"
	},
	"transaction_amount": 2200
}
```

## Reprocessar ação pós desembolso

### Request

ENDPOINT /baas/action/action_retry/ ACTION-KEY
METHOD PATCH

:::info Informação
As respostas dos dois endpoints são as mesmas
:::

## Response

STATUS 200

Response Body

```json
{
	"action_data": {
		"origin_key": "8b8742f0-0b7c-4939-bfcf-9bae8c60c088",
		"pdf_encoded_string": "\<BASE 64 DO PDF DO COMPROVANTE\>",
		"source_account": {
			"account_branch": "0001",
			"account_digit": "1",
			"account_number": "2788652",
			"financial_institution_compe_number": 329,
			"financial_institution_name": "QI SCD S.A.",
			"owner_document_number": "12345678911",
			"owner_document_number_formatted": "123.456.789-11",
			"owner_name": "Nome do titular da conta"
		},
		"source_subtype": "withdrawal",
		"source_subtype_translation_ptbr": "Transferência",
		"target_account": {
			"account_branch": "1012",
			"account_digit": "1",
			"account_number": "12345",
			"account_type": "checking_account",
			"account_type_str": "Conta Corrente",
			"financial_institution_compe_number": "341",
			"financial_institution_name": "ITAÚ UNIBANCO S.A.",
			"owner_document_number": "12345678911",
			"owner_document_number_formatted": "125.220.107-94",
			"owner_name": "Nome do titular da conta destino"
		},
		"transacted_at": "2023-03-14 17:57:20",
		"transacted_at_br": "2023-03-14 14:57:20",
		"transacted_at_br_formatted": "14/03/2023, 14:57:20",
		"transacted_at_formatted": "14/03/2023, 17:57:20",
		"transaction_amount": 2000,
		"transaction_amount_formatted": "R$ 2.000,00",
		"transaction_key": "ae139d20-396e-4c7e-a675-a8cb01160f5d"
	},
	"action_key": "fe3f251d-6b85-4d35-96dd-08fc37d09a82"
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

STATUS 402

Response Body

```json
{
  "data": "{\"title\": \"Block Balance Error\", \"description\": \"Impossible to block an amount greater than account balance\", \"translation\": \"Não é possível blockear uma quantidade maior do que o saldo na conta\", \"extra_fields\": {}, \"code\": \"ACC000018\"}"
}

```

## PATH PARAMS

| Field | Type | Description |
|---|---| ---|
| `action_key` * | string | Action key returned at the moment of credit operation creation. |

---

# Editing disbursement bank account

URL: /en/documentation/emissao_de_divida/reprocessar_multiplas_datas/trocar_conta

## Request

ENDPOINT /debt/ DEBT-KEY /disbursement_bank_accounts
METHOD PUT

### PATH PARAMS

| Field                   | Type | Description |
|-------------------------|--------|-------------|
| `debt_key` *(required)* | string | Debt Id.    |

**Request Body**

```json
{
	"disbursement_bank_accounts": [{
		"bank_code": "329",
		"branch_number": "001",
		"account_number": "6947216",
		"account_digit": "4",
		"account_type": "checking_account",
		"document_number": "946321801",
		"name": "Pedro Felipe Henrique Alves",
		"percentage_receivable": 100
	}]
}
```

### BODY PARAMS

A debt issuance must contain the disbursement bank information, which should be an account belonging to the debtor.

| Field             | Type   | Description                                                                                     | Max. Caract. | 
|-------------------|--------|-------------------------------------------------------------------------------------------------|--------------|
| name *            | string | Account owner's name                                                                            | 50           |
| document_number * | string | Account owner's CPF                                                                             | 11           |
| bank_code *       | string | Financial institution COMPE code  (https://www.bcb.gov.br/pom/spb/estatistica/port/ASTR003.pdf) | 3            |
| branch_number *   | string | Bank agency Number (do not inform agency verifying digit!)                                      | 4            |
| account_number *  | string | Account aumber (do not inform account verifying digit!)                                         | 10           |
| account_digit *   | string | Account verifying digit (inform zero rather than letters)                                       | 1            |
| account_type      | enum   | [Enumerador Account Type](#enumerador-account-type) Account type                                | 1            |

## Response

STATUS 200

**Request Body**

```json
{}
```

STATUS 400

**Request Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Editing disbursement date

URL: /en/documentation/emissao_de_divida/reprocessar_multiplas_datas/trocar_data

## Request

ENDPOINT /debt/ DEBT-KEY /disbursement_option
METHOD PATCH

### PATH PARAMS

| Field                   | Type   | Description |
|-------------------------|--------|-------------|
| `debt_key` *(required)* | string | Debt Id.    |

**Request Body**

```json
{
    "disbursement_date": "2023-06-30",
    "status": "active"
}
```

### BODY PARAMS

| Field | Type | Description                                                                                          |
|---|---|------------------------------------------------------------------------------------------------------|
| `disbursement_date` | string | Operation disbursement date                                                                          |
| `status` | string | Indicates if date should be configured or removed |

## Response

STATUS 200

**Request Body**

```json
{
	"data": {
		"additional_iof": 17.770586,
		"annual_cet": 31.682,
		"assignment_amount": 4676.97,
		"base_iof": 127.71954759,
		"borrower": {
			"document_number": "88229032939",
			"name": "Teste",
			"related_party_key": "13d210c8-d39a-40f9-bd16-b6ab81d35fa8"
		},
		"cet": 2.32,
		"collaterals": [],
		"contract": {
			"number": "0000051370/TG",
			"urls": [
				"https://storage.googleapis.com/dev-doc-api/documents/a715175f-8d29-4929-9576-4b692d1e9610/BEATRIZCOUTODECARVALHO-TESTE-CCB-0000051370-20230707151409.pdf"
			]
		},
		"contract_fee_amount": 0.5,
		"contract_fees": [{
			"fee_amount": 0.5,
			"fee_type": "spread"
		}],
		"disbursed_issue_amount": 4530.98,
		"entry": null,
		"external_contract_fee_amount": 0.0,
		"external_contract_fees": [{
			"description": null,
			"fee_amount": 0.0,
			"fee_type": "spread",
			"net_fee_amount": 0.0,
			"rebate_bank_account": null,
			"tax_amount": 0.0
		}],
		"installments": [{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2023-08-29",
				"calendar_days": 50,
				"digitable_line": null,
				"due_date": "2023-08-28",
				"due_interest": 0.0,
				"due_principal": 4676.47,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "29c6e226-b710-4e3b-a5d6-62119b9d9547",
				"installment_number": 1,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4676.47,
				"original_pre_fixed_amount": 164.86042852,
				"original_principal_amortization_amount": 25.13957148,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 164.86042852,
				"principal_amortization_amount": 25.13957148,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 0.10307224,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 36
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2023-09-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2023-09-28",
				"due_interest": 0.0,
				"due_principal": 4651.33042852,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "322d7973-4d2a-41a6-ad1b-2fef59c551b7",
				"installment_number": 2,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4651.33042852,
				"original_pre_fixed_amount": 100.99385125,
				"original_principal_amortization_amount": 89.00614875,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 100.99385125,
				"principal_amortization_amount": 89.00614875,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 0.59117884,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2023-10-31",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2023-10-28",
				"due_interest": 0.0,
				"due_principal": 4562.32427977,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "a2d43778-0342-48f7-a0d2-c385773fa545",
				"installment_number": 3,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4562.32427977,
				"original_pre_fixed_amount": 95.83242026,
				"original_principal_amortization_amount": 94.16757974,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 95.83242026,
				"principal_amortization_amount": 94.16757974,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 0.85711331,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2023-11-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2023-11-28",
				"due_interest": 0.0,
				"due_principal": 4468.15670003,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "9126aa9a-6bb0-44c6-8ea4-61fd68fcd936",
				"installment_number": 4,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4468.15670003,
				"original_pre_fixed_amount": 97.01661904,
				"original_principal_amortization_amount": 92.98338096,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 97.01661904,
				"principal_amortization_amount": 92.98338096,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 1.08269849,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2023-12-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2023-12-28",
				"due_interest": 0.0,
				"due_principal": 4375.17331907,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "f0b363f9-0aca-4154-b14a-2c7933374abc",
				"installment_number": 5,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4375.17331907,
				"original_pre_fixed_amount": 91.90128137,
				"original_principal_amortization_amount": 98.09871863,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 91.90128137,
				"principal_amortization_amount": 98.09871863,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 1.38358433,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-01-30",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-01-28",
				"due_interest": 0.0,
				"due_principal": 4277.07460043,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "c7c41dee-28a3-4b37-b2de-256fa0c9a0a9",
				"installment_number": 6,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4277.07460043,
				"original_pre_fixed_amount": 92.86767319,
				"original_principal_amortization_amount": 97.13232681,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 92.86767319,
				"principal_amortization_amount": 97.13232681,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 1.61686471,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-02-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-02-28",
				"due_interest": 0.0,
				"due_principal": 4179.94227362,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "ee5d7b27-5160-49d3-9eb0-ec5a2f20e50d",
				"installment_number": 7,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4179.94227362,
				"original_pre_fixed_amount": 90.75864903,
				"original_principal_amortization_amount": 99.24135097,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 90.75864903,
				"principal_amortization_amount": 99.24135097,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 1.90424304,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-04-01",
				"calendar_days": 29,
				"digitable_line": null,
				"due_date": "2024-03-28",
				"due_interest": 0.0,
				"due_principal": 4080.70092265,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "a9ec8c98-0061-4956-8af8-93d5742f6c1f",
				"installment_number": 8,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 4080.70092265,
				"original_pre_fixed_amount": 82.82984224,
				"original_principal_amortization_amount": 107.17015776,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 82.82984224,
				"principal_amortization_amount": 107.17015776,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 2.31123162,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-04-30",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-04-28",
				"due_interest": 0.0,
				"due_principal": 3973.53076489,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "bfd2ceab-74d4-4ff4-b099-c6ab986b7acb",
				"installment_number": 9,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3973.53076489,
				"original_pre_fixed_amount": 86.2768573,
				"original_principal_amortization_amount": 103.7231427,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 86.2768573,
				"principal_amortization_amount": 103.7231427,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 2.50055752,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-05-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2024-05-28",
				"due_interest": 0.0,
				"due_principal": 3869.80762219,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "eb41f47f-ffcd-4d4d-8834-600cfe95b2a4",
				"installment_number": 10,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3869.80762219,
				"original_pre_fixed_amount": 81.2859859,
				"original_principal_amortization_amount": 108.7140141,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 81.2859859,
				"principal_amortization_amount": 108.7140141,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 2.88831393,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-07-01",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-06-28",
				"due_interest": 0.0,
				"due_principal": 3761.09360809,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "13183e83-70cf-4990-a3cc-c979e43015b9",
				"installment_number": 11,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3761.09360809,
				"original_pre_fixed_amount": 81.6642313,
				"original_principal_amortization_amount": 108.3357687,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 81.6642313,
				"principal_amortization_amount": 108.3357687,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.15365423,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-07-30",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2024-07-28",
				"due_interest": 0.0,
				"due_principal": 3652.75783939,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "a2ed3748-8567-4cab-a1ff-0cf6b2698d15",
				"installment_number": 12,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3652.75783939,
				"original_pre_fixed_amount": 76.72681698,
				"original_principal_amortization_amount": 113.27318302,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 76.72681698,
				"principal_amortization_amount": 113.27318302,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.39026637,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-08-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-08-28",
				"due_interest": 0.0,
				"due_principal": 3539.48465638,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "1e009f23-2044-40ba-8249-a9077a2391b9",
				"installment_number": 13,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3539.48465638,
				"original_pre_fixed_amount": 76.85245907,
				"original_principal_amortization_amount": 113.14754093,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 76.85245907,
				"principal_amortization_amount": 113.14754093,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.3865059,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 23
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-10-01",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-09-28",
				"due_interest": 0.0,
				"due_principal": 3426.33711545,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "e475d886-a596-4541-bcae-4986bf7c3609",
				"installment_number": 14,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3426.33711545,
				"original_pre_fixed_amount": 74.39569823,
				"original_principal_amortization_amount": 115.60430177,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 74.39569823,
				"principal_amortization_amount": 115.60430177,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.46003675,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-10-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2024-10-28",
				"due_interest": 0.0,
				"due_principal": 3310.73281367,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "5584643d-4e65-4e99-9483-b3c1b051fd63",
				"installment_number": 15,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3310.73281367,
				"original_pre_fixed_amount": 69.54252108,
				"original_principal_amortization_amount": 120.45747892,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 69.54252108,
				"principal_amortization_amount": 120.45747892,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.60529234,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-11-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2024-11-28",
				"due_interest": 0.0,
				"due_principal": 3190.27533475,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "23a0002c-49bf-4c22-a506-d89ae4372249",
				"installment_number": 16,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3190.27533475,
				"original_pre_fixed_amount": 69.27011321,
				"original_principal_amortization_amount": 120.72988679,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 69.27011321,
				"principal_amortization_amount": 120.72988679,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.61344551,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2024-12-31",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2024-12-28",
				"due_interest": 0.0,
				"due_principal": 3069.54544796,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "5efbf6d0-84bc-4041-8a33-e9ab1bf82969",
				"installment_number": 17,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 3069.54544796,
				"original_pre_fixed_amount": 64.47633798,
				"original_principal_amortization_amount": 125.52366202,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 64.47633798,
				"principal_amortization_amount": 125.52366202,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.7569232,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-01-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-01-28",
				"due_interest": 0.0,
				"due_principal": 2944.02178595,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "e9bb5d68-8c93-43a4-b240-d68b0d1d6d08",
				"installment_number": 18,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2944.02178595,
				"original_pre_fixed_amount": 63.9232354,
				"original_principal_amortization_amount": 126.0767646,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 63.9232354,
				"principal_amortization_amount": 126.0767646,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.77347756,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-03-05",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-02-28",
				"due_interest": 0.0,
				"due_principal": 2817.94502134,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "d6c34059-ba9b-4345-b937-35293f34a3dd",
				"installment_number": 19,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2817.94502134,
				"original_pre_fixed_amount": 61.18574366,
				"original_principal_amortization_amount": 128.81425634,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 61.18574366,
				"principal_amortization_amount": 128.81425634,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 3.85541069,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 23
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-03-31",
				"calendar_days": 28,
				"digitable_line": null,
				"due_date": "2025-03-28",
				"due_interest": 0.0,
				"due_principal": 2689.130765,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "63fa4169-f1a9-43f0-a059-70e2df35ac7e",
				"installment_number": 20,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2689.130765,
				"original_pre_fixed_amount": 52.68330953,
				"original_principal_amortization_amount": 137.31669047,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 52.68330953,
				"principal_amortization_amount": 137.31669047,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.10988855,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 18
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-04-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-04-28",
				"due_interest": 0.0,
				"due_principal": 2551.81407453,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "859ee4fa-f781-419b-8888-731b0f8fc01b",
				"installment_number": 21,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2551.81407453,
				"original_pre_fixed_amount": 55.40726995,
				"original_principal_amortization_amount": 134.59273005,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 55.40726995,
				"principal_amortization_amount": 134.59273005,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.02836041,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 19
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-05-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2025-05-28",
				"due_interest": 0.0,
				"due_principal": 2417.22134448,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "d6e25388-d54d-42ca-8b46-ac70fa7aeb23",
				"installment_number": 22,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2417.22134448,
				"original_pre_fixed_amount": 50.7741553,
				"original_principal_amortization_amount": 139.2258447,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 50.7741553,
				"principal_amortization_amount": 139.2258447,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.16702953,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-07-01",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-06-28",
				"due_interest": 0.0,
				"due_principal": 2277.99549978,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "d92f0e38-fa48-48c2-a79e-e8316fe5c870",
				"installment_number": 23,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2277.99549978,
				"original_pre_fixed_amount": 49.46187558,
				"original_principal_amortization_amount": 140.53812442,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 49.46187558,
				"principal_amortization_amount": 140.53812442,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.20630606,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-07-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2025-07-28",
				"due_interest": 0.0,
				"due_principal": 2137.45737535,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "04aa2658-8fbe-4147-8a14-03c7bba13577",
				"installment_number": 24,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 2137.45737535,
				"original_pre_fixed_amount": 44.89766385,
				"original_principal_amortization_amount": 145.10233615,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 44.89766385,
				"principal_amortization_amount": 145.10233615,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.34291292,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-08-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-08-28",
				"due_interest": 0.0,
				"due_principal": 1992.35503921,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "af5b3343-7d91-46cf-a908-bf24e4e79907",
				"installment_number": 25,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1992.35503921,
				"original_pre_fixed_amount": 43.25979382,
				"original_principal_amortization_amount": 146.74020618,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 43.25979382,
				"principal_amortization_amount": 146.74020618,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.39193437,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 23
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-09-30",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-09-28",
				"due_interest": 0.0,
				"due_principal": 1845.61483303,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "1e7981d6-4274-49f1-ab6e-a98d97485e78",
				"installment_number": 26,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1845.61483303,
				"original_pre_fixed_amount": 40.07363891,
				"original_principal_amortization_amount": 149.92636109,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 40.07363891,
				"principal_amortization_amount": 149.92636109,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.48729599,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-10-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2025-10-28",
				"due_interest": 0.0,
				"due_principal": 1695.68847194,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "a07e171b-e2a6-49b4-9d6d-8124fff9d736",
				"installment_number": 27,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1695.68847194,
				"original_pre_fixed_amount": 35.61823023,
				"original_principal_amortization_amount": 154.38176977,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 35.61823023,
				"principal_amortization_amount": 154.38176977,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.62064637,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-12-01",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2025-11-28",
				"due_interest": 0.0,
				"due_principal": 1541.30670217,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "0cd84cc5-0dd0-4318-99f9-178843d3d5b5",
				"installment_number": 28,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1541.30670217,
				"original_pre_fixed_amount": 33.46622796,
				"original_principal_amortization_amount": 156.53377204,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 33.46622796,
				"principal_amortization_amount": 156.53377204,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.6850558,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 23
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2025-12-30",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2025-12-28",
				"due_interest": 0.0,
				"due_principal": 1384.77293013,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "24dc3c8b-ac3a-496e-8646-a1e66051090b",
				"installment_number": 29,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1384.77293013,
				"original_pre_fixed_amount": 29.08739451,
				"original_principal_amortization_amount": 160.91260549,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 29.08739451,
				"principal_amortization_amount": 160.91260549,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.81611428,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 19
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-01-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2026-01-28",
				"due_interest": 0.0,
				"due_principal": 1223.86032464,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "bba128ee-b195-4a65-9caf-3ebe452d9d10",
				"installment_number": 30,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1223.86032464,
				"original_pre_fixed_amount": 26.57354762,
				"original_principal_amortization_amount": 163.42645238,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 26.57354762,
				"principal_amortization_amount": 163.42645238,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.89135372,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-03-03",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2026-02-28",
				"due_interest": 0.0,
				"due_principal": 1060.43387227,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "35a03898-607a-4194-804c-bfd375c3ea45",
				"installment_number": 31,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 1060.43387227,
				"original_pre_fixed_amount": 23.02508598,
				"original_principal_amortization_amount": 166.97491402,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 23.02508598,
				"principal_amortization_amount": 166.97491402,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 4.99755918,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-03-31",
				"calendar_days": 28,
				"digitable_line": null,
				"due_date": "2026-03-28",
				"due_interest": 0.0,
				"due_principal": 893.45895824,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "0a8a83db-835d-46bc-8e24-c542c44d6e68",
				"installment_number": 32,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 893.45895824,
				"original_pre_fixed_amount": 17.50393379,
				"original_principal_amortization_amount": 172.49606621,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 17.50393379,
				"principal_amortization_amount": 172.49606621,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 5.16280726,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-04-29",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2026-04-28",
				"due_interest": 0.0,
				"due_principal": 720.96289203,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "07e3155c-30b5-4d13-8a31-0af4c7d5c9c5",
				"installment_number": 33,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 720.96289203,
				"original_pre_fixed_amount": 15.65418772,
				"original_principal_amortization_amount": 174.34581228,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 15.65418772,
				"principal_amortization_amount": 174.34581228,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 5.21817016,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-05-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2026-05-28",
				"due_interest": 0.0,
				"due_principal": 546.61707975,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "d1badc80-d7a2-4428-abf6-4877ac9f4497",
				"installment_number": 34,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 546.61707975,
				"original_pre_fixed_amount": 11.48178326,
				"original_principal_amortization_amount": 178.51821674,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 11.48178326,
				"principal_amortization_amount": 178.51821674,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 5.34305023,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 21
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-06-30",
				"calendar_days": 31,
				"digitable_line": null,
				"due_date": "2026-06-28",
				"due_interest": 0.0,
				"due_principal": 368.098863,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "4b466830-c432-4478-a1b9-bff6562834ee",
				"installment_number": 35,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 368.098863,
				"original_pre_fixed_amount": 7.99248758,
				"original_principal_amortization_amount": 182.00751242,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 7.99248758,
				"principal_amortization_amount": 182.00751242,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 5.44748485,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 20
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0.0,
				"bank_slip_key": null,
				"business_due_date": "2026-07-29",
				"calendar_days": 30,
				"digitable_line": null,
				"due_date": "2026-07-28",
				"due_interest": 0.0,
				"due_principal": 186.09135058,
				"fine_amount": null,
				"has_interest": true,
				"installment_history": [],
				"installment_key": "0e8843ff-1339-40ab-a0b5-c450eca68e44",
				"installment_number": 36,
				"installment_payment": [],
				"installment_status": "created",
				"installment_type": "principal",
				"original_due_principal": 186.09135058,
				"original_pre_fixed_amount": 3.90887682,
				"original_principal_amortization_amount": 186.09112318,
				"original_total_amount": 190.0,
				"paid_amount": 0.0,
				"paid_at": null,
				"post_fixed_amount": null,
				"pre_fixed_amount": 3.90887682,
				"principal_amortization_amount": 186.09112318,
				"qr_code_key": null,
				"qr_code_url": null,
				"renegotiation_proposal_key": null,
				"tax_amount": 5.56970732,
				"total_accrual_amount": null,
				"total_amount": 190.0,
				"total_paid_amount": 0.0,
				"workdays": 22
			}
		],
		"iof_charge_method": "financed",
		"issue_amount": 4676.47,
		"net_external_contract_fee_amount": 0.0,
		"number_of_installments": 36,
		"prefixed_interest_rate": {
			"annual_rate": 0.28777498,
			"created_at": "2023-07-07T18:13:42",
			"daily_rate": 0.00069316,
			"interest_base": "calendar_days_365",
			"monthly_rate": 0.0213
		},
		"requester_identifier_key": "7d174b91-e411-4375-b788-9ced9b941cd0",
		"total_iof": 145.49,
		"total_pre_fixed_amount": 2163.53022742
	},
	"event_datetime": "2023-07-07 19:04:20",
	"key": "7d174b91-e411-4375-b788-9ced9b941cd0",
	"status": "waiting_signature",
	"webhook_type": "debt"
}
```

STATUS 400

**Request Body**

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Seguro

URL: /en/documentation/emissao_de_divida/seguro

Na QI Tech disponibilizamos aos nossos clientes a possibilidade de oferecer seguro junto com a operação de crédito,
aqui você entenderá como usá-lo em nossas API's e entender melhor sobre esse novo produto.

:::caution Atenção
Esse produto está disponível apenas para parceiros cadastrados, por favor consulte um de nossos comerciais para mais detalhes.
:::

## Como usar

Para contratar ou simular uma dívida com a contratação de seguro, deverá ser adicionado a lista de rebates um rebate do tipo
"insurance_premium_qi", sem nenhum valor declarado, pois ele será calculado de acordo com o valor de emissão da proposta e
com o produto de seguro a ser contratado.

:::caution Atenção
Não é possível usar rebates do tipo tac ou **insurance_premium** junto com o **insurance_premium_qi**.
:::

Objeto Rebate

```json
{
  "rebates": [
    {
      "fee_type": "insurance_premium_qi",
      "description": "insurance_premium_plus"
    }
  ]
}
```

## Simulação de dívida

### Request

No exemplo abaixo, está descrita uma simulação de dívida, onde é pedido uma cotação de seguro.

ENDPOINT /fgts_simulation
MÉTODO POST

Request Body

```json
{
  "borrower": {
    "person_type": "natural",
    "individual_document_number": "46338864879",
    "birth_date": "1996-03-20"
  },
  "financial": {
    "desired_installments": [
      {
        "total_amount": 200,
        "due_date": "2023-10-01"
      }
    ],
    "interest_type": "pre_price_days",
    "disbursement_date": "2023-03-03",
    "fine_configuration": {
      "monthly_rate": 0,
      "interest_base": "calendar_days",
      "contract_fine_rate": 0
    },
    "monthly_interest_rate": 0.018,
    "credit_operation_type": "ccb",
    "interest_grace_period": 0,
    "number_of_installments": 1,
    "principal_grace_period": 0,
    "rebates": [
      {
        "fee_type": "insurance_premium_qi",
        "description": "insurance_premium_plus"
      }
    ]
  }
}
```

### Response

STATUS 200

Response Body

```json
{
    "type": "debt",
    "key": "a445c71c-d752-4159-82bf-097d8125b66c",
    "status": "finished",
    "event_datetime": "2024-10-03 00:26:26",
    "data": {
        "interest_type": "pre_price_days",
        "credit_operation_type": "ccb",
        "interest_grace_period": 0,
        "interest_payment_month_period": 1,
        "principal_grace_period": 0,
        "principal_amortization_month_period": 1,
        "operation_type": "structured_operation",
        "post_fixed_interest_base": "workdays",
        "post_fixed_interest_rate": null,
        "prefixed_interest_rate": {
            "interest_base": "calendar_days_365",
            "annual_rate": 0.23872053,
            "monthly_rate": 0.018,
            "daily_rate": 0.00058669
        },
        "issue_date": "2023-03-03",
        "number_of_installments": 1,
        "requester_key": "9cdbe6f9-0e94-45a7-af5f-2cec36356493",
        "final_disbursement_amount": 119.01,
        "total_pre_fixed_amount": 23.3844066642,
        "iof_amount": 3.74,
        "cet": 0.0773,
        "annual_cet": 1.44428,
        "disbursement_date": "2023-03-03",
        "installments": [
            {
                "calendar_days": 212,
                "workdays": 145.0,
                "business_due_date": "2023-10-02",
                "due_date": "2023-10-01",
                "due_principal": 176.62,
                "has_interest": true,
                "post_fixed_amount": null,
                "pre_fixed_amount": 23.3844066642,
                "tax_amount": 3.0702854745495474,
                "total_amount": 200,
                "principal_amortization_amount": 176.6155933358,
                "installment_number": 1
            }
        ],
        "external_contract_fees": [
            {
                "fee_type": "spread",
                "amount_type": "absolute",
                "amount": 0.0,
                "fee_amount": 0.0,
                "tax_amount": 0.0,
                "net_fee_amount": 0.0,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 0,
                "description": null
            },
            {
                "fee_type": "tac",
                "amount_type": "absolute",
                "amount": 0.0,
                "fee_amount": 0.0,
                "tax_amount": 0.0,
                "net_fee_amount": 0.0,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 0,
                "description": null
            },
            {
                "fee_type": "insurance_premium_qi",
                "description": "insurance_premium_plus",
                "amount_type": "percentage",
                "amount": 30.0,
                "fee_amount": 52.99,
                "tax_amount": 0.0,
                "net_fee_amount": 52.99,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 52.99,
                "description": null
            }
        ],
        "contract_fee_amount": 0.88,
        "external_contract_fee_amount": 52.99,
        "net_external_contract_fee_amount": 52.99,
        "contract_fees": [
            {
                "fee_type": "tac",
                "amount_type": "percentage",
                "amount": 0.5,
                "fee_amount": 0.88
            }
        ],
        "issue_amount": 176.62,
        "disbursed_issue_amount": 119.01,
        "assignment_amount": 176.62,
        "disbursement_options": [
            {
                "iof_amount": 3.74,
                "total_pre_fixed_amount": 23.3844066642,
                "cet": 0.0773,
                "annual_cet": 1.44428,
                "contract_fees": [
                    {
                        "fee_type": "tac",
                        "amount_type": "percentage",
                        "amount": 0.5,
                        "fee_amount": 0.88
                    }
                ],
                "external_contract_fees": [
                    {
                        "fee_type": "spread",
                        "amount_type": "absolute",
                        "amount": 0.0,
                        "fee_amount": 0.0,
                        "tax_amount": 0.0,
                        "net_fee_amount": 0.0,
                        "csll_amount": 0,
                        "irrf_amount": 0,
                        "pis_amount": 0,
                        "cofins_amount": 0,
                        "amount_released": 0,
                        "description": null
                    },
                    {
                        "fee_type": "tac",
                        "amount_type": "absolute",
                        "amount": 0.0,
                        "fee_amount": 0.0,
                        "tax_amount": 0.0,
                        "net_fee_amount": 0.0,
                        "csll_amount": 0,
                        "irrf_amount": 0,
                        "pis_amount": 0,
                        "cofins_amount": 0,
                        "amount_released": 0,
                        "description": null
                    },
                    {
                        "fee_type": "insurance_premium_qi",
                        "description": "insurance_premium_plus",
                        "amount_type": "percentage",
                        "amount": 30.0,
                        "fee_amount": 52.99,
                        "tax_amount": 0.0,
                        "net_fee_amount": 52.99,
                        "csll_amount": 0,
                        "irrf_amount": 0,
                        "pis_amount": 0,
                        "cofins_amount": 0,
                        "amount_released": 52.99,
                        "description": null
                    }
                ],
                "contract_fee_amount": 0.88,
                "external_contract_fee_amount": 52.99,
                "net_external_contract_fee_amount": 52.99,
                "disbursement_date": "2023-03-03",
                "first_due_date": "2023-10-01",
                "installments": [
                    {
                        "calendar_days": 212,
                        "workdays": 145.0,
                        "business_due_date": "2023-10-02",
                        "due_date": "2023-10-01",
                        "due_principal": 176.62,
                        "has_interest": true,
                        "post_fixed_amount": null,
                        "pre_fixed_amount": 23.3844066642,
                        "tax_amount": 3.0702854745495474,
                        "total_amount": 200,
                        "principal_amortization_amount": 176.6155933358,
                        "installment_number": 1
                    }
                ],
                "issue_amount": 176.62,
                "disbursed_issue_amount": 119.01,
                "assignment_amount": 176.62,
                "final_disbursement_amount": 119.01,
                "prefixed_interest_rate": {
                    "interest_base": "calendar_days_365",
                    "annual_rate": 0.23872053,
                    "monthly_rate": 0.018,
                    "daily_rate": 0.00058669
                }
            }
        ]
    }
}
```

:::danger AVISO
É possível validar a elegibilidade da cobrança de seguro, já na simulação.\
Para isso, é obrigatório o envio da data de nascimento (**birth_date**), CPF do devedor (**document_number**) e o rebate "**insurance_premium_qi**".\
Se o CPF for elegível, teremos um retorno de sucesso, se não for elegível, a requisição de simulação retornará um erro.
:::

:::danger AVISO
O envio da data de nascimento (**birth_date**) **não é obrigatório na simulação com seguro**. Porém, na emissão de dívida temos a obrigatoriedade do envio desse campo, caso haja a contração do produto.
:::

## Consulta de elegibilidade de CPF para o seguro

Em posse dos dados de **CPF**, é possível a consulta da elegibilidade do CPF.

### Request

ENDPOINT /debts/borrower/[document_number]/insurance_premium_eligibility?birth_date=1994-06-11&issue_amount=150
METHOD GET

### Params

| Campo             | Descrição                               |
|-------------------|-----------------------------------------|
| `document_number` | Número de CPF do devedor                |
| `birth_date`      | Data de nascimento                      |
| `issue_amount`    | Valor de emissão da operação de crédito |

### Response

STATUS 200

Response Body

```json
{
    "eligible": true
}
```

### Descrição
| Campo                        | Tipo   |
|------------------------------|--------|
| `elegible`            | boleean |

:::caution Atenção
Para um CPF com o retorno **"elegible": false**, tanto a simulação, quanto a emissão da dívida não serão possíveis com o envio de insurance_premium_qi na lista **rebates**.
:::

## Criação de dívida

Para criação de dívida com seguro é necessário alguns dados obrigatórios do tomador do crédito, como **endereço, telefone, email e
data de nascimento**. Se alguns desses dados for omtido a dívida não será emitida.

### Request

ENDPOINT /debt
MÉTODO POST

Request Body

```json
{
  "borrower": {
    "person_type": "natural",
    "individual_document_number": "46338864879",
    "name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
    "is_pep": false,
    "mother_name": "HELENA DO NASCIMENTO PEREIRA DA SILVA",
    "email": "email@email.com",
    "birth_date": "1994-06-11",
    "phone": {
      "number": "900000000",
      "area_code": "11",
      "country_code": "055"
    },
    "address": {
      "city": "São Paulo",
      "state": "SP",
      "number": "215",
      "street": "Gilberto Sabino",
      "complement": "s/c",
      "postal_code": "12345012",
      "neighborhood": "Pinheiros"
    }
  },
  "financial": {
    "desired_installments": [
      {
        "total_amount": 200,
        "due_date": "2023-10-01"
      }
    ],
    "interest_type": "pre_price_days",
    "disbursement_date": "2023-03-03",
    "fine_configuration": {
      "monthly_rate": 0,
      "interest_base": "calendar_days",
      "contract_fine_rate": 0
    },
    "monthly_interest_rate": 0.018,
    "credit_operation_type": "ccb",
    "interest_grace_period": 0,
    "number_of_installments": 1,
    "principal_grace_period": 0,
    "rebates": [
      {
        "fee_type": "insurance_premium_qi",
        "description": "insurance_premium_plus"
      }
    ]
  },
  "disbursement_bank_account": {
    "ispb_number": "18236120",
    "branch_number": "1",
    "account_number": "87823171",
    "account_digit": "0",
    "document_number": "46338864879",
    "name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
    "percentage_receivable": 1
  },
  "purchaser_document_number": "32402502000135"
}
```

### Response

STATUS 201

Response Body

```json
{
  "webhook_type": "debt",
  "key": "7a9bb512-7b38-4dbc-a109-1bc122b67a4a",
  "status": "waiting_signature",
  "event_datetime": "2023-03-03 18:06:18",
  "data": {
    "borrower": {
      "name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
      "document_number": "46338864879",
      "related_party_key": "1b98cff5-b1eb-4f3d-b337-716d76137770"
    },
    "contract": {
      "number": "0000062201/PAD",
      "urls": [
        "https://storage.googleapis.com/live-doc-api/documents/45e5b9c0-0f56-40a8-aace-d206f72c164d/QISCD-NOME_DO_DEVEDOR-CCB-0000000002-20230317183044.pdf"
      ],
      "external_contract_key": "35b882b1-9937-41d3-bf43-e0d30062dc1b",
      "signature_information": [
        {
          "signer_name": "PATRICIA APARECIDA DO NASCIMENTO PEREIRA DA SILVA",
          "signer_document_number": "46338864879",
          "signer_role": "issuer",
          "signer_email": "email@email.com",
          "signer_external_key": "3a50f3cd-8178-49c8-9fc2-984b4caa4a5b",
          "signature_url": "https://sandbox.sign.qitech.com.br/s/ml9Myfp"
        }
      ]
    },
    "requester_identifier_key": "7a9bb512-7b38-4dbc-a109-1bc122b67a4a",
    "iof_charge_method": "financed",
    "collaterals": [],
    "contract_fees": [],
    "external_contract_fees": [
      {
        "fee_type": "insurance_premium_qi",
        "description": "insurance_premium_plus",
        "fee_amount": 52.99,
        "tax_amount": 0,
        "net_fee_amount": 52.99
      }
    ],
    "external_contract_fee_amount": 52.99,
    "net_external_contract_fee_amount": 52.99,
    "contract_fee_amount": 0,
    "issue_amount": 176.62,
    "assignment_amount": 176.62,
    "cet": "7,6200%",
    "annual_cet": "141,3472%",
    "number_of_installments": 1,
    "base_iof": 3.0702854745495474,
    "additional_iof": 0.671156,
    "total_iof": 3.74,
    "prefixed_interest_rate": {
      "annual_rate": 0.23872053,
      "created_at": "2024-09-11T18:06:07",
      "daily_rate": 0.00058669,
      "interest_base": "calendar_days_365",
      "monthly_rate": 0.018
    },
    "installments": [
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2023-10-02",
        "calendar_days": 212,
        "digitable_line": null,
        "due_date": "2023-10-01",
        "due_interest": 0,
        "due_principal": 176.62,
        "fine_amount": null,
        "has_interest": true,
        "installment_history": [],
        "installment_key": "6087c6c1-d665-4ba8-bfb2-b447cd57d3e3",
        "installment_number": 1,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 176.62,
        "original_pre_fixed_amount": 23.3844066642,
        "original_principal_amortization_amount": 176.6155933358,
        "original_total_amount": 200,
        "paid_amount": 0,
        "paid_at": null,
        "post_fixed_amount": null,
        "pre_fixed_amount": 23.3844066642,
        "principal_amortization_amount": 176.6155933358,
        "qr_code_key": null,
        "qr_code_url": null,
        "renegotiation_proposal_key": null,
        "tax_amount": 3.0702854745495474,
        "total_accrual_amount": null,
        "total_amount": 200,
        "total_paid_amount": 0,
        "workdays": 145
      }
    ],
    "total_pre_fixed_amount": 23.3844066642
  }
}
```

## Webhooks

### Seguro emitido

 A emissão do seguro será feito após o desembolso da operação, o seguinte webhook será enviado quando o
 seguro terminar de ser emitido com os dados do seguro.

:::caution Atenção
Ao receber o webhook de bilhete emitido é obrigatório a transmissão do documento do bilhete gerado para o tomador de crédito.
:::

Webhook Body

```json
{
  "data": {
    "credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
    "insurance_policy_document_key": "9990ce22-aeac-4728-82da-d1f22c33873f",
    "insurance_date": "2024-09-11",
    "term_start_date": "2024-09-11",
    "term_end_date": "2025-09-11",
    "insurance_amount": 1600,
    "operation_amount": 6400,
    "covers": [
      {
        "cover_amount": 200,
        "cover_type": "permanent_disability",
        "cover_prize_amount": 572.82
      },
      {
        "cover_amount": 100,
        "cover_type": "accidental_death",
        "cover_prize_amount": 572.82
      },
      {
        "capitalcover_amount_segurado": 300,
        "cover_type": "unemployment",
        "cover_prize_amount": 572.82
      }
    ],
    "policy_number": "1098200000008",
    "prize_number": "3907",
    "insurance_premium_net_amount": 1145.63,
    "iof_amount": 4.37
  },
  "event_datetime": "2023-03-03 22:39:39",
  "key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
  "status": "active",
  "webhook_type": "insurance_premium.status_change"
}
```

### Seguro cancelado

O seguro pode ser cancelado quando o tomador do crédito queira desistir de operação de créditoe a operação for revertida, se algum limite de cobertura for ultrapassado (tornando inelegível a contratação do seguro)
ou quando tomador acaba desistindo somente do seguro.

:::caution Atenção
O bilhete de seguro só pode ser cancelado totalmente dentro de 7 dias corridos do desembolso da operação de crédito,
caso queira cancelar após isso o valor devolvido vai ser proporcional a duração do seguro.
:::

Webhook Body

```json
{
    "key": "dc575950-dcce-48e1-99a6-5fb0ada63d86",
    "data": {
        "cancel_reason": "reversed_operation",
        "credit_operation_key": "2fbd6613-3228-5gdg-9377-93db394bf2d4"
    },
    "status": "canceled",
    "webhook_type": "insurance_premium.status_change",
    "event_datetime": "2023-03-03 22:39:39"
}
```

### Motivos de cancelamento

| cancel_reason                 | Descrição                              |
|-------------------------------|----------------------------------------|
| `reversed_operation`          | Operação revertida e seguro cancelados |
| `cover_limit_amount_exceeded` | Somente o seguro foi cancelado. Algum limite de cobertura foi ultrapassado e não foi possível a emissão do seguro  |
| `insurance_premium_cancel`    | Somente o seguro foi cancelado. Cancelamento do tomador direto com a seguradora  |

## Consulta do seguro

### Request

ENDPOINT /debt/[debt_key]/insurance_premiums
METHOD GET

### Response

STATUS 200

Response Body

```json
{
  "data": [
    {
      "insurance_premium_key": "e4fe84e3-cc71-481b-87ea-8a07f7d69079",
      "status": "active",
      "credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
      "disbursement_key": "bd0ea133-ff47-4a21-a3e6-24186e5e2fc1",
      "contract_number": "4069550961/QIT",
      "requester_key": "1040ce22-aeac-4728-82da-d1f22c33873f",
      "insurance_policy_document_key": "9990ce22-aeac-4728-82da-d1f22c33873f",
      "insurance_date": "2024-09-11",
      "term_start_date": "2024-09-11",
      "term_end_date": "2025-09-11",
      "insurance_amount": 1600,
      "operation_amount": 6400,
      "customer": {
        "customer_key": "cd587fa8-3abd-4023-99ab-957df60933a5",
        "document_number": "08556878350",
        "name": "Wilker Oliveiraço",
        "birth_date": "1998-03-21",
        "email": "urich.oliveira@yopmail.com",
        "phone": {
          "country_code": "55",
          "area_code": "11",
          "number": "966931427"
        },
        "address": {
          "postal_code": "56821686",
          "state": "CE",
          "city": "Ceará",
          "neighborhood": "Marmiteiros",
          "street": "Conjunto João Gabriel da Mata",
          "number": "95",
          "complement": ""
        }
      },
      "covers": [
        {
          "cover_amount": 200,
          "cover_type": "permanent_disability",
          "cover_prize_amount": 572.82
        },
        {
          "cover_amount": 100,
          "cover_type": "accidental_death",
          "cover_prize_amount": 572.82
        },
        {
          "cover_amount": 300,
          "cover_type": "unemployment",
          "cover_prize_amount": 572.82
        }
      ],
      "policy_number": "1098200000008",
      "prize_number": "3907",
      "insurance_premium_net_amount": 1145.63,
      "iof_amount": 4.37
    }
  ],
  "pagination": {
    "current_page": 0,
    "next_page": 0,
    "rows_per_page": 1
  }
}
```

### Request

ENDPOINT /debt/[DEBT-KEY]/insurance_premium/[INSURANCE-PREMIUM-KEY]
METHOD GET

### Response

STATUS 200

Response Body

```json
{
  "insurance_premium_key": "e4fe84e3-cc71-481b-87ea-8a07f7d69079",
  "status": "active",
  "credit_operation_key": "5ae2c008-44c1-4435-bbfa-094a4b11d962",
  "disbursement_key": "bd0ea133-ff47-4a21-a3e6-24186e5e2fc1",
  "contract_number": "4069550961/QIT",
  "requester_key": "1040ce22-aeac-4728-82da-d1f22c33873f",
  "insurance_policy_document_key": "9990ce22-aeac-4728-82da-d1f22c33873f",
  "insurance_date": "2024-09-11",
  "term_start_date": "2024-09-11",
  "term_end_date": "2025-09-11",
  "insurance_amount": 1600,
  "operation_amount": 6400,
  "customer": {
    "customer_key": "cd587fa8-3abd-4023-99ab-957df60933a5",
    "document_number": "08556878350",
    "name": "Wilker Oliveiraço",
    "birth_date": "1998-03-21",
    "gender": "male",
    "email": "urich.oliveira@yopmail.com",
    "phone": {
      "country_code": "55",
      "area_code": "11",
      "number": "966931427"
    },
    "address": {
      "postal_code": "56821686",
      "state": "CE",
      "city": "Ceará",
      "neighborhood": "Marmiteiros",
      "street": "Conjunto João Gabriel da Mata",
      "number": "95",
      "complement": ""
    }
  },
  "covers": [
    {
      "cover_amount": 300,
      "cover_type": "permanent_disability",
      "cover_prize_amount": 572.82
    },
    {
      "cover_amount": 300,
      "cover_type": "accidental_death",
      "cover_prize_amount": 572.82
    },
    {
      "cover_amount": 300,
      "cover_type": "unemployment",
      "cover_prize_amount": 572.82
    }
  ],
  "policy_number": "1098200000008",
  "prize_number": "3907",
  "insurance_premium_net_amount": 1145.63,
  "iof_amount": 4.37
}
```

## Consulta do documento bilhete

:::caution Atenção
O link do documento é expirável e tem uma duração de 15 minutos.
:::

### Request

ENDPOINT /document/[DOCUMENT-KEY]/url
METHOD GET

### Response

STATUS 200

Response Body

```json
{
    "document_key": "a11dc0fe-51ed-41aa-bb40-bca80d6e515b",
    "signed_document_url": null,
    "document_url": "https://storage.googleapis.com/dev-doc-api-private/documents/a11dc0fe-51ed-41aa-bb40-bca80d6e515b/TESTEELECTRONIC2.pdf?Expires=1726081733&GoogleAccessId=doc-api-signed-url-service-acc%40qicredit-dev.iam.gserviceaccount.com&Signature=CNY8ch%2BQ2FuLXrbRZGLhH41A7SkNJRUUq%2FJoegTIMeXEiNImD%2FkPoEHyNtOXWUUR8JtEL6ppT0s1tXA9oFfLjzOtvzMOfpal0TwJDLSsX9r4HxcxvzFZUJELAn9yIAcRhqR%2BnzUn0WYyQA%2B0hAalz%2Bj274pXhIExqJJR4LiDUAkzRE3WD0GOvsV7afAoqQ8P3Xxj4mvOM3P%2BuFhgP6hcJmq0K%2B5qHssF3DtvpQFLcLaQ7T45YoQDCnDFGztD0Un0%2BNBwv4n2142rV3rMu9h3DzLmQbEjaeYgHb4wq2kOfyfEUSbaU683d6hA7CNyrPWMeoi%2F%2BgTfFFadbcGCMGX2%2BQ%3D%3D",
    "expiration_datetime": "2023-03-03T19:08:53.000Z"
}
```

---

# Legacy debt simulation

URL: /en/documentation/emissao_de_divida/simulacao_de_divida_antigo

At QI Tech, we provide our clients with the ability to simulate the values of a credit operation before its actual issuance. The simulation follows the same pattern as the debt issuance request, but it is not necessary to provide the borrower's registration data and disbursement account.

## Request

In the example below, a debt simulation request is described.

ENDPOINT /debt_simulation
METHOD POST

Request Body

**Due date and installment amount**

```json
{
    "borrower": {
        "person_type": "natural"
    },
    "financial": {
        "desired_installments": [
            {
                "total_amount": 578.69,
                "due_date": "2027-04-01"
            },
            {
                "total_amount": 304.25,
                "due_date": "2028-04-01"
            }
        ],
        "interest_type": "pre_price_days",
        "disbursement_date": "2026-09-06",
        "fine_configuration": {
            "monthly_rate": 0.0,
            "interest_base": "calendar_days",
            "contract_fine_rate": 0.0
        },
        "annual_interest_rate": 0.2387205,
        "credit_operation_type": "ccb",
        "interest_grace_period": 0,
        "number_of_installments": 2,
        "principal_grace_period": 0,
        "rebates": [
            {
                "amount": 10,
                "fee_type": "tac",
                "amount_type": "absolute",
                "rebate_bank_account": {
                    "name": "CONTA BANCARIA",
                    "bank_code": "329",
                    "account_digit": "1",
                    "branch_number": "0001",
                    "account_number": "00003",
                    "document_number": "32402502000135"
                }
            }
        ]
    }
}
```

**Rate and installment date**
```json
{
  "borrower": {
    "person_type": "natural"
  },
  "financial": {
    "interest_type": "pre_price_days",
    "disbursement_start_date": "2025-09-03",
    "disbursement_end_date": "2025-09-03",
    "issue_date": "2025-09-03",
    "fine_configuration": {
        "monthly_rate": 0,
        "contract_fine_rate": 0,
        "interest_base": "calendar_days"
      },
    "monthly_interest_rate": 0.1929244498,
    "disbursed_amount": 10000.00,
    "credit_operation_type": "ccb",
    "interest_grace_period": 0,
    "number_of_installments": 18,
    "principal_grace_period": 0,
    "due_dates": [
      "2025-09-28",
      "2025-10-28",
      "2025-11-28",
      "2025-12-28",
      "2026-01-28",
      "2026-02-28",
      "2026-03-28",
      "2026-04-28",
      "2026-05-28",
      "2026-06-28",
      "2026-07-28",
      "2026-08-28",
      "2026-09-28",
      "2026-10-28",
      "2026-11-28",
      "2026-12-28",
      "2027-01-28",
      "2027-02-28"
    ]
  }
}
```

## Response

STATUS 200

Response Body

```json
{
    "type": "debt",
    "key": "bf84379c-d4cf-4f16-a63c-865c129e6fce",
    "status": "finished",
    "event_datetime": "2025-03-27 22:28:37",
    "data": {
        "interest_type": "pre_price_days",
        "credit_operation_type": "ccb",
        "interest_grace_period": 0,
        "interest_payment_month_period": 1,
        "principal_grace_period": 0,
        "principal_amortization_month_period": 1,
        "operation_type": "structured_operation",
        "post_fixed_interest_base": "workdays",
        "post_fixed_interest_rate": null,
        "prefixed_interest_rate": {
            "interest_base": "calendar_days_365",
            "annual_rate": 0.23872053,
            "monthly_rate": 0.0179999999,
            "daily_rate": 0.0005866899
        },
        "issue_date": "2026-09-06",
        "number_of_installments": 2,
        "requester_key": "f2b3b903-aa41-4a79-8b2f-abc3cc5a6590",
        "final_disbursement_amount": 701.6,
        "total_pre_fixed_amount": 153.0,
        "iof_amount": 18.34,
        "cet": 0.0219,
        "annual_cet": 0.297,
        "disbursement_date": "2026-09-06",
        "installments": [
            {
                "calendar_days": 207,
                "workdays": 140,
                "business_due_date": "2027-04-01",
                "due_date": "2027-04-01",
                "due_principal": 729.94,
                "has_interest": true,
                "post_fixed_amount": 0,
                "pre_fixed_amount": 94.22564648,
                "tax_amount": 8.22329794,
                "total_amount": 578.69,
                "principal_amortization_amount": 484.46435352,
                "installment_number": 1
            },
            {
                "calendar_days": 366,
                "workdays": 253,
                "business_due_date": "2028-04-03",
                "due_date": "2028-04-01",
                "due_principal": 245.47564648,
                "has_interest": true,
                "post_fixed_amount": 0,
                "pre_fixed_amount": 58.77435352,
                "tax_amount": 7.3470861,
                "total_amount": 304.25,
                "principal_amortization_amount": 245.47564648,
                "installment_number": 2
            }
        ],
        "external_contract_fees": [
            {
                "fee_type": "tac",
                "amount_type": "absolute",
                "amount": 10.0,
                "fee_amount": 10.0,
                "tax_amount": 1.42,
                "net_fee_amount": 8.58,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 8.58,
                "description": null
            },
            {
                "fee_type": "spread_tax_free",
                "amount_type": "absolute",
                "amount": 0.0,
                "fee_amount": 0.0,
                "tax_amount": 0.0,
                "net_fee_amount": 0.0,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 0,
                "description": null
            },
            {
                "fee_type": "tac_tax_free",
                "amount_type": "absolute",
                "amount": 0.0,
                "fee_amount": 0.0,
                "tax_amount": 0.0,
                "net_fee_amount": 0.0,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 0,
                "description": null
            },
            {
                "fee_type": "insurance_premium",
                "amount_type": "absolute",
                "amount": 0.0,
                "fee_amount": 0.0,
                "tax_amount": 0.0,
                "net_fee_amount": 0.0,
                "csll_amount": 0,
                "irrf_amount": 0,
                "pis_amount": 0,
                "cofins_amount": 0,
                "amount_released": 0,
                "description": null
            }
        ],
        "contract_fee_amount": 3.65,
        "external_contract_fee_amount": 10.0,
        "net_external_contract_fee_amount": 8.58,
        "contract_fees": [
            {
                "fee_type": "spread",
                "amount_type": "percentage",
                "amount": 0.5,
                "fee_amount": 3.65
            },
            {
                "fee_type": "spread_ted_fee",
                "amount_type": "absolute",
                "amount": 3.0,
                "fee_amount": 3.0
            }
        ],
        "issue_amount": 729.94,
        "disbursed_issue_amount": 701.6,
        "assignment_amount": 736.59,
        "disbursement_options": [
            {
                "iof_amount": 18.34,
                "total_pre_fixed_amount": 153.0,
                "cet": 0.0219,
                "annual_cet": 0.297,
                "contract_fees": [
                    {
                        "fee_type": "spread",
                        "amount_type": "percentage",
                        "amount": 0.5,
                        "fee_amount": 3.65
                    },
                    {
                        "fee_type": "spread_ted_fee",
                        "amount_type": "absolute",
                        "amount": 3.0,
                        "fee_amount": 3.0
                    }
                ],
                "external_contract_fees": [
                    {
                        "fee_type": "tac",
                        "amount_type": "absolute",
                        "amount": 10.0,
                        "fee_amount": 10.0,
                        "tax_amount": 1.42,
                        "net_fee_amount": 8.58,
                        "csll_amount": 0.0,
                        "irrf_amount": 0.0,
                        "pis_amount": 0.0,
                        "cofins_amount": 0.0,
                        "amount_released": 8.58,
                        "description": null
                    },
                    {
                        "fee_type": "spread_tax_free",
                        "amount_type": "absolute",
                        "amount": 0.0,
                        "fee_amount": 0.0,
                        "tax_amount": 0.0,
                        "net_fee_amount": 0.0,
                        "csll_amount": 0,
                        "irrf_amount": 0,
                        "pis_amount": 0,
                        "cofins_amount": 0,
                        "amount_released": 0.0,
                        "description": null
                    },
                    {
                        "fee_type": "tac_tax_free",
                        "amount_type": "absolute",
                        "amount": 0.0,
                        "fee_amount": 0.0,
                        "tax_amount": 0.0,
                        "net_fee_amount": 0.0,
                        "csll_amount": 0,
                        "irrf_amount": 0,
                        "pis_amount": 0,
                        "cofins_amount": 0,
                        "amount_released": 0.0,
                        "description": null
                    },
                    {
                        "fee_type": "insurance_premium",
                        "amount_type": "absolute",
                        "amount": 0.0,
                        "fee_amount": 0.0,
                        "tax_amount": 0.0,
                        "net_fee_amount": 0.0,
                        "csll_amount": 0,
                        "irrf_amount": 0,
                        "pis_amount": 0,
                        "cofins_amount": 0,
                        "amount_released": 0.0,
                        "description": null
                    }
                ],
                "contract_fee_amount": 3.65,
                "external_contract_fee_amount": 10.0,
                "net_external_contract_fee_amount": 8.58,
                "disbursement_date": "2026-09-06",
                "first_due_date": "2027-04-01",
                "installments": [
                    {
                        "calendar_days": 207,
                        "workdays": 140,
                        "business_due_date": "2027-04-01",
                        "due_date": "2027-04-01",
                        "due_principal": 729.94,
                        "has_interest": true,
                        "post_fixed_amount": 0,
                        "pre_fixed_amount": 94.22564648,
                        "tax_amount": 8.22329794,
                        "total_amount": 578.69,
                        "principal_amortization_amount": 484.46435352,
                        "installment_number": 1
                    },
                    {
                        "calendar_days": 366,
                        "workdays": 253,
                        "business_due_date": "2028-04-03",
                        "due_date": "2028-04-01",
                        "due_principal": 245.47564648,
                        "has_interest": true,
                        "post_fixed_amount": 0,
                        "pre_fixed_amount": 58.77435352,
                        "tax_amount": 7.3470861,
                        "total_amount": 304.25,
                        "principal_amortization_amount": 245.47564648,
                        "installment_number": 2
                    }
                ],
                "issue_amount": 729.94,
                "disbursed_issue_amount": 701.6,
                "assignment_amount": 736.59,
                "final_disbursement_amount": 701.6,
                "prefixed_interest_rate": {
                    "interest_base": "calendar_days_365",
                    "annual_rate": 0.23872053,
                    "monthly_rate": 0.0179999999,
                    "daily_rate": 0.0005866899
                }
            }
        ]
    }
}

```

## Definitions

### Request Body

### Borrower Object
| Field | Type  | Description  | Enum |
|---|---|---|---|
| **person_type** | object | Legal nature of the operation borrower   |  natural or legal |

### Financial Object
| Field  | Type   | Description | Max. Char. |
|---|--- |---|---|
| **amout**                  | float  | Issue/nominal value of the credit operation                                                             | -            |
| **interest_type**          | object | **[Interest Type Enumerator](#enumerator-interest-type)** - Amortization method and interest calculation form | -            |
| **credit_operation_type**  | object | **[Credit Operation Type Enumerator](#enumerator-credit-operation-type)** - Type of credit contract     | -            |
| **annual_interest_rate**   | float  | Pre-fixed interest rate expressed as decimal per year                                                         | -            |
| **disbursement_date**      | date   | Operation disbursement date                                                                              | -            |
| **interest_grace_period**  | int    | Interest grace period (in months)                                                                                | -            |
| **principal_grace_period** | int    | Principal grace period                                                                               | -            |
| **number_of_installments** | int    | Number of installments of the credit operation                                                                   | -            |
| **fine_configuration**     | object | **[fine_configuration Object](#fine-configuration-object)** - Interest and late fee configuration      | -            |

### Fine Configuration Object
| Field                  | Type  | Description                                                                            | Max. Char. |
|---|---|---|---|
| **contract_fine_rate** | float | Late fee percentage expressed as decimal                                   | -            |
| **interest_base**      | enum  | **[Interest Base Enumerator](#enumerator-interest-base)** - Interest calculation base | -            |
| **monthly_rate**       | float | Late interest percentage per month expressed as decimal                             | -            |

### Response Body
| Field                      | Type   | Description                       | Max. Char. |
|----------------------------|--------|---------------------------------|--------------|
| **data.data**           | object | **[Data Object](#data-object)** | -            |
| **data.event_datetime** | date   | Simulation generation timestamp | -            |
| **data.key**            | string | Unique simulation key        | -            |
| **data.status**         | string | _finished_                      | -            |
| **data.type**           | string | _debt_                          | -            |

### Data Object
| Field                                   | Type   | Description                                                                                                                     | Max. Char. |
|-----------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------|--------------|
| **annual_cet**                          | float  | Total effective cost expressed as decimal per year                                                                                | -            |
| **assignment_amount**                   | float  | Credit operation acquisition value                                                                                     | -            |
| **cet**                                 | float  | Total effective cost expressed as decimal per month                                                                                | -            |
| **contract_fee_amount**                 | float  | QI Tech fee charged on the operation                                                                                            | -            |
| **contract_fees**                       | object | **[Contract Fees Object](#contract-fees-object)** - List of QI Tech fees charged on the operation                            | -            |
| **credit_operation_type**               | enum   | **[Credit Operation Type Enumerator](#enumerator-credit-operation-type)** - Type of credit contract                       | -            |
| **disbursed_issue_amount**              | float  | Disbursed value in the credit operation                                                                                     | -            |
| **disbursement_date**                   | date   | Operation disbursement date                                                                                                | -            |
| **disbursement_options**                | list   | List of operation disbursement options (financial values of the operation may vary according to disbursement day) | -            |
| **external_contract_fee_amount**        | float  | Fee value charged on the operation rebated by QI to partner                                                                 | -            |
| **external_contract_fees**              | list   | **[Contract Fees Object](#contract-fees-object)** - List of fees charged on the operation rebated by QI to partner         | -            |
| **final_disbursement_amount**           | float  | Value effectively disbursed to the borrower                                                                                | -            |
| **installments**                        | list   | **[Installments Object](#installments-object)** - Operation installments                                                        | -            |
| **interest_grace_period**               | int    | Interest grace period (in months)                                                                                                  | -            |
| **interest_payment_month_period**       | int    | Interest charge frequency in installments (in months)                                                                       | -            |
| **interest_type**                       | enum   | **[Interest Type Enumerator](#enumerator-interest-type)** - Amortization method and interest calculation form                 | -            |
| **iof_amount**                          | float  | Total IOF value (composed of the sum of Base IOF and Total IOF)                                                               | -            |
| **issue_amount**                        | float  | Issue/nominal value of the credit operation                                                                               | -            |
| **issue_date**                          | date   | Operation contract issue date                                                                                        | -            |
| **net_external_contract_fee_amount**    | float  | Net fee value charged on the operation rebated by QI to partner                                                         | -            |
| **operation_type**                      | enum   | **[Operation Type Enumerator](#enumerator-operation-type)**                                                                   | -            |
| **post_fixed_interest_base**            | enum   | **[Interest Base Enumerator](#enumerator-interest-base)** - Interest calculation base                                          | -            |
| **post_fixed_interest_rate**            | object | **[Interest Rate Object](#interest-rate-object)** - Post-fixed interest indexer of the contract                                | -            |
| **prefixed_interest_rate**              | object | **[Interest Rate Object](#interest-rate-object)** - Pre-fixed nominal interest rate of the contract                              | -            |
| **principal_amortization_month_period** | int    | Principal charge frequency in installments (in months)                                                                   | -            |
| **principal_grace_period**              | int    | Principal grace period (in months)                                                                                      | -            |
| **requester_key**                       | string | Unique identifying key of the partner within QI.                                                                          | -            |
| **total_pre_fixed_amount**              | float  | Total interest paid by the borrower in the credit operation                                                                       | -            |

### Contract Fees Object
| Field           | Type  | Description                                                                                           | Max. Char. |
|-----------------|-------|-----------------------------------------------------------------------------------------------------|--------------|
| **amount**      | float | Fee value (in percentage or absolute value, depending on the value informed in the _amount_type_ field | -            |
| **amount_type** | enum  | **[amount_type Enumerators](#enumerator-amount-type)** - Fee value unit                   | -            |
| **fee_amount**  | float | Absolute fee value charged on the operation                                                           | -            |
| **fee_type**    | enum  | **[Fee Type Enumerator](#enumerator-fee-type)** - Type of fee charged on the operation                   | -            |

### Installments Object
| Field                             | Type    | Description                                                                      | Max. Char. |
|-----------------------------------|---------|--------------------------------------------------------------------------------|--------------|
| **business_due_date**             | date    | Installment due date on business day                                      | -            |
| **calendar_days**                 | int     | How many calendar days between one installment and another                                | -            |
| **due_date**                      | date    | Installment due date on calendar day                                   | -            |
| **due_principal**                 | float   | Remaining principal on installment due date before its payment | -            |
| **has_interest**                  | boolean | _true_ - Interest incidence indicator on installment                           | -            |
| **installment_number**            | int     | Installment number                                                              | -            |
| **post_fixed_amount**             | float   | Post-fixed interest value paid on installment                                      | -            |
| **pre_fixed_amount**              | float   | Pre-fixed interest value paid on installment                                      | -            |
| **principal_amortization_amount** | float   | Amortization value paid on installment                                           | -            |
| **tax_amount**                    | float   | Installment Base IOF                                                            | -            |
| **total_amount**                  | float   | Total installment value                                                         | -            |
| **workdays**                      | int     | How many business days between one installment and another                                   | -            |

### Interest Rate Object
| Field             | Description                                                                             | Max. Char. |
|-------------------|---------------------------------------------------------------------------------------|--------------|
| **annual_rate**   | Pre/post interest rate expressed as decimal per year                                      | -            |
| **daily_rate**    | Pre/post interest rate expressed as decimal per day                                      | -            |
| **interest_base** | **[Interest Base Enumerator](#enumerator-interest-base)** - Interest calculation base | -            |
| **monthly_rate**  | Pre/post interest rate expressed as decimal per month                                      | -            |

# Enumerators

### _Person Type_ Enumerator
| Enumerator             | Description             |
|------------------------|-----------------------|
| **legal**   | Legal entity        |
| **natural**    | Natural person    |

### _Account Type_ Enumerator
| Enumerator             | Description             |
|------------------------|-----------------------|
| **checking_account**   | Checking account        |
| **deposit_account**    | Deposit account     |
| **guaranteed_account** | Guaranteed account     |
| **investment_account** | Investment account |
| **payment_account**    | Payment account    |
| **saving_account**     | Savings account        |
| **salary_account**     | Salary account         |

### _Amount Type_ Enumerator
| Enumerator             | Description             |
|------------------------|-----------------------|
| **absolute**           | Absolute value        |
| **percentage**         | Percentage value      |

### _Interest Type_ Enumerator
| Enumerator           | Description                                                                                                                                                                |
|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **pre_price_days**   | Price amortization method (equal installments) with pre-fixed interest calculation per day                                                                                     |
| **pre_price**        | Price amortization method (equal installments) with pre-fixed interest calculation in fixed periods (30 days)                                                                |
| **pre_sac**          | SAC amortization method (constant amortization) with pre-fixed interest calculation per day                                                                                 |
| **post_sac**         | SAC amortization method (constant amortization) with interest calculation based on a pre-fixed rate + post-fixed indexer (cdi, ipca or igpm) per day                  |
| **post_price**       | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (cdi, ipca or igpm) in fixed periods (30 days) |
| **post_price_days**  | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (cdi, ipca or igpm) per day                      |

### _Credit Operation Type_ Enumerator
| Enumerator    | Description                      |
|---------------|--------------------------------|
| **ccb**       | Bank Credit Note     |
| **cce**       | Export Credit Note |
| **cci**       | Real Estate Credit Note  |
| **nce**       | Export Credit Note   |

### _Interest Base_ Enumerator
| Enumerator            | Description                                                                 |
|-----------------------|---------------------------------------------------------------------------|
| **workdays**          | Interest calculation base in business days considering a year of 252 days    |
| **calendar_days**     | Interest calculation base in calendar days considering a year of 360 days |
| **calendar_days_365** | Interest calculation base in calendar days considering a year of 365 days |

### _Fee Type_ Enumerator
Each fee type must be previously enabled and configured by QI Tech

| Enumerator            | Description                                                                  |
|-----------------------|----------------------------------------------------------------------------|
| **tac**               | Account opening fee                                             |
| **spread**            | Premium charged on the credit operation acquisition value                  |
| **warranty_analysis** | Warranty analysis fee                                             |
| **ted_fee**           | TED fee                                                              |
| **spread_ted_fee**    | TED fee premium charged on the credit operation acquisition value |

---

# New debt simulation

URL: /en/documentation/emissao_de_divida/simulacao_de_divida_novo

At QI Tech we provide our clients with the possibility to simulate the values of a credit operation before its actual issuance. The simulation follows the same pattern as the debt issuance request, but it is not necessary to provide the cadastral data and disbursement account of the debtor.

## Request

In the example below, a debt simulation request is described.

ENDPOINT /v2/credit_operation/simulation
METHOD POST

Request Body

**Due date and installment amount**

```json
{
    "credit_operation_type": "ccb",
    "disbursed_issue_amount": 2800,
    "disbursement_date": "2025-09-24",
    "first_due_date": "2025-10-24",
    "force_installments_on_workdays": true,
    "interest_type": "pre_price_days",
    "issuer_person_type": "natural",
    "monthly_interest_rate": 0.04488,
    "number_of_installments": 12,
    "principal_amortization_month_period": 1
}
```

**Disbursed amount and installments**

 ```json
{
    "credit_operation_type": "ccb",
    "disbursed_issue_amount": 460,
    "disbursement_date": "2025-09-24",
    "first_due_date": "2025-10-24",
    "force_installments_on_workdays": true,
    "interest_type": "pre_price_days",
    "issuer_person_type": "natural",
    "number_of_installments": 3,
    "principal_amortization_month_period": 1,
    "interest_base": "calendar_days_365",
    "installments": [
      {
        "due_date": "2026-02-26",
        "amount": 137.48
      },
      {
        "due_date": "2026-03-26",
        "amount": 180.56
      },
      {
        "due_date": "2026-04-27",
        "amount": 180.56
      }
    ]
  }
 ```

## Response

STATUS 200

Response Body

```json
{
  "additional_iof": 0.14,
  "annual_cet": 145.08,
  "assignment_amount": 36.21,
  "base_iof": 0.1,
  "cet": 7.76,
  "disbursed_amount": 35.9,
  "disbursement_date": "2024-09-06",
  "fees": [
    {
      "amount": 0.0,
      "fee_amount": 0.0,
      "amount_type": "absolute",
      "fee_type": "tac",
      "type": "external"
    },
    {
      "amount": 0.0,
      "fee_amount": 0.0,
      "amount_type": "absolute",
      "fee_type": "spread",
      "type": "external"
    },
    {
      "amount": 0.2,
      "fee_amount": 0.07,
      "amount_type": "percentage",
      "fee_type": "spread",
      "type": "internal"
    }
  ],
  "first_due_date": "2024-09-25",
  "installments": [
    {
      "due_date": "2024-09-25",
      "amount": 19.5,
      "due_principal": 36.14,
      "due_interest": 0.0,
      "has_interest": true,
      "period": 0.6129032258064516,
      "period_workdays": 0.6190476190476191,
      "calendar_days": 19,
      "workdays": 13,
      "installment_number": 1,
      "period_to_disbursement": 0.6129032258064516,
      "prefixed_amount": 1.58227236,
      "period_workdays_to_disbursement": 1.0,
      "calendar_days_to_disbursement": 19,
      "workdays_to_disbursement": 13,
      "tax_amount": 0.02791582,
      "principal_amortization_amount": 17.91772764
    },
    {
      "due_date": "2024-10-25",
      "amount": 19.5,
      "due_principal": 18.22227236,
      "due_interest": 0.0,
      "has_interest": true,
      "period": 1.0,
      "period_workdays": 1.0,
      "calendar_days": 30,
      "workdays": 22,
      "installment_number": 2,
      "period_to_disbursement": 1.6129032258064515,
      "prefixed_amount": 1.27772764,
      "period_workdays_to_disbursement": 2.0,
      "calendar_days_to_disbursement": 49,
      "workdays_to_disbursement": 35,
      "tax_amount": 0.07321709,
      "principal_amortization_amount": 18.22227236
    }
  ],
  "interest_type": "pre_price_days",
  "issue_amount": 36.14,
  "prefixed_interest_rate": {
    "interest_base": "calendar_days",
    "annual_rate": 1.25219159,
    "daily_rate": 0.00225783,
    "monthly_rate": 0.07
  },
  "tax_configuration": {
    "additional_rate": 0.0038,
    "base_rate": 0.000082
  },
  "total_iof": 0.24
}

```

## Definitions

### Request Body

### Payload
| Field  | Type   | Description | Max. Chars. |
|---|--- |---|---|
| **credit_operation_type**                 | enum    | **[Credit Operation Type Enumerator](#credit-operation-type-enumerator)** - Credit contract type      | -            |
| **disbursed_issue_amount**                | float   | Issue/nominal amount of the credit operation      | -            |
| **disbursement_date**                     | date    | Disbursement date of the operation      | -            |
| **first_due_date**                        | date    | Due date of the first installment      | -            |
| **force_installments_on_workdays**        | boolean | _true_ - Indicator for installments scheduled on workdays     | -            |
| **interest_type**                         | enum    | **[Interest Type Enumerator](#interest-type-enumerator)** - Amortization method and interest calculation form      | -            |
| **issuer_person_type**                    | enum    | **[Person Type Enumerator](#person-type-enumerator)**      | -            |
| **monthly_interest_rate**                 | float   | Pre-fixed monthly interest rate of the contract      | -            |
| **number_of_installments**                | int     | Number of installments of the credit operation      | -            |
| **principal_amortization_month_period**   | int     | Number of months for principal amortization      | -            |
| **installments**                          | list    | **[Installments Object](#installments-object)** - Operation installments      | -            |

### Response Body

### Payload
| Field                                   | Type   | Description                                                                                                                     | Max. Chars. |
|-----------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------|--------------|
| **annual_cet**                          | float  | Total effective cost expressed in decimal per year                                                                                | -            |
| **assignment_amount**                   | float  | Acquisition amount of the credit operation                                                                                     | -            |
| **cet**                                 | float  | Total effective cost expressed in decimal per month                                                                                | -            |
| **fees**                                | object | **[Fees Object](#fees-object)** - List of QI Tech fees charged on the operation                            | -            |
| **disbursed_amount**                    | float  | Amount disbursed in the credit operation                                                                                     | -            |
| **disbursement_date**                   | date   | Disbursement date of the operation                                                                                                | -            |
| **installments**                        | list   | **[Installments Response Object](#installments-response-object)** - Operation installments                                                        | -            |
| **interest_type**                       | enum   | **[Interest Type Enumerator](#interest-type-enumerator)** - Amortization method and interest calculation form                 | -            |
| **additional_iof**                      | float  | Additional IOF amount                                                                                                        | -            |
| **base_iof**                            | float  | Base IOF amount                                                                                                             | -            |
| **total_iof**                           | float  | Total IOF amount                                                                                                            | -            |
| **issue_amount**                        | float  | Issue/nominal amount of the credit operation                                                                               | -            |
| **tax_configuration**                   | object | **[Tax Configuration Object](#tax-configuration-object)** - Tax rate values                                             | -            |
| **first_due_date**                      | date   | Due date of the first installment                                                                                        | -            |
| **prefixed_interest_rate**              | object | **[Interest Rate Object](#interest-rate-object)** - Pre-fixed nominal interest rate of the contract                              | -            |

### Fees Object
| Field           | Type  | Description                                                                                           | Max. Chars. |
|-----------------|-------|-----------------------------------------------------------------------------------------------------|--------------|
| **amount**      | float | Fee amount (in percentage or absolute value, depending on the value provided in the _amount_type_ field)| -            |
| **amount_type** | enum  | **[amount_type Enumerator](#amount-type-enumerator)** - Fee amount unit                   | -            |
| **fee_amount**  | float | Absolute fee amount charged on the operation                                                           | -            |
| **fee_type**    | enum  | **[Fee Type Enumerator](#fee-type-enumerator)** - Type of fee charged on the operation                   | -            |
| **type**        | enum  | **[Origin Type Enumerator](#origin-type-enumerator)** - Origin of the fee charged on the operation                         | -            |

### Installments Request Object
| Field                             | Type    | Description                                                                      | Max. Chars. |
|-----------------------------------|---------|--------------------------------------------------------------------------------|--------------|
| **due_date**                      | date    | Due date in calendar days of the installment                                   | -            |
| **total_amount**                  | float   | Total installment amount                                                         | -            |

### Installments Response Object
| Field                             | Type    | Description                                                                      | Max. Chars. |
|-----------------------------------|---------|--------------------------------------------------------------------------------|--------------|
| **calendar_days**                 | int     | How many calendar days between one installment and another                                | -            |
| **due_date**                      | date    | Due date in calendar days of the installment                                   | -            |
| **due_principal**                 | float   | Remaining principal on the installment due date before its payment | -            |
| **has_interest**                  | boolean | _true_ - Indicator of interest incidence on the installment                           | -            |
| **installment_number**            | int     | Installment number                                                              | -            |
| **prefixed_amount**               | float   | Pre-fixed interest amount paid in the installment                                      | -            |
| **principal_amortization_amount** | float   | Amortization amount paid in the installment                                           | -            |
| **tax_amount**                    | float   | Base IOF of the installment                                                            | -            |
| **amount**                        | float   | Total installment amount                                                         | -            |
| **due_interest**                  | float     | Remaining interest after the installment due date before its payment                                   | -            |
| **period**                        | float     | Installment period | -            |
| **period_workdays**               | float     | Installment period in workdays | -            |
| **period_to_disbursement**        | float     | Period until disbursement | -            |
| **period_workdays_to_disbursement**| float     | Period in workdays until disbursement | -            |
| **calendar_days_to_disbursement** | int     | How many calendar days until disbursement | -            |
| **workdays**                      | int     | How many workdays between one installment and another | -            |
| **workdays_to_disbursement**      | int     | How many workdays until disbursement | -            |

### Interest Rate Object
| Field             | Description                                                                             | Max. Chars. |
|-------------------|---------------------------------------------------------------------------------------|--------------|
| **annual_rate**   | Pre/post-fixed interest rate expressed in decimal per year                                      | -            |
| **daily_rate**    | Pre/post-fixed interest rate expressed in decimal per day                                      | -            |
| **interest_base** | **[Interest Base Enumerator](#interest-base-enumerator)** - Interest calculation base  | -            |
| **monthly_rate**  | Pre/post-fixed interest rate expressed in decimal per month                                      | -            |

### Tax Configuration Object
| Field                 | Description                                                                             | Max. Chars. |
|-----------------------|---------------------------------------------------------------------------------------|--------------|
| **base_rate**         | Base rate value                                                                | -            |
| **additional_rate**   | Additional rate value                                                           | -            |

# Enumerators

### _Person Type_ Enumerator
| Enumerator             | Description             |
|------------------------|-----------------------|
| **legal**              | Legal entity       |
| **natural**            | Natural person          |

### _Account Type_ Enumerator
| Enumerator             | Description             |
|------------------------|-----------------------|
| **checking_account**   | Checking account        |
| **deposit_account**    | Deposit account     |
| **guaranteed_account** | Guarantee account     |
| **investment_account** | Investment account |
| **payment_account**    | Payment account    |
| **saving_account**     | Savings account        |
| **salary_account**     | Salary account         |

### _Amount Type_ Enumerator
| Enumerator             | Description             |
|------------------------|-----------------------|
| **absolute**           | Absolute value        |
| **percentage**         | Percentage value      |

### _Interest Type_ Enumerator
| Enumerator           | Description                                                                                                                                                                |
|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **pre_price_days**   | Price amortization method (equal installments) with pre-fixed interest calculation per day                                                                                     |
| **pre_price**        | Price amortization method (equal installments) with pre-fixed interest calculation in fixed periods (30 days)                                                                |
| **pre_sac**          | SAC amortization method (constant amortization) with pre-fixed interest calculation per day                                                                                 |
| **post_sac**         | SAC amortization method (constant amortization) with interest calculation based on a pre-fixed rate + post-fixed indexer (cdi, ipca or igpm) per day                  |
| **post_price**       | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (cdi, ipca or igpm) in fixed periods (30 days) |
| **post_price_days**  | Price amortization method (equal installments) with interest calculation based on a pre-fixed rate + post-fixed indexer (cdi, ipca or igpm) per day                      |

### _Credit Operation Type_ Enumerator
| Enumerator    | Description                      |
|---------------|--------------------------------|
| **ccb**       | Banking Credit Note     |
| **cce**       | Export Credit Note |
| **cci**       | Real Estate Credit Note  |
| **nce**       | Export Credit Note   |

### _Interest Base_ Enumerator
| Enumerator            | Description                                                                 |
|-----------------------|---------------------------------------------------------------------------|
| **workdays**          | Interest calculation base on workdays considering a year of 252 days    |
| **calendar_days**     | Interest calculation base on calendar days considering a year of 360 days |
| **calendar_days_365** | Interest calculation base on calendar days considering a year of 365 days |

### _Fee Type_ Enumerator
Each fee type must be previously enabled and configured by QI Tech

| Enumerator            | Description                                                                  |
|-----------------------|----------------------------------------------------------------------------|
| **tac**               | Account opening fee                                             |
| **spread**            | Premium charged on the acquisition amount of the credit operation                  |
| **warranty_analysis** | Warranty analysis fee                                             |
| **ted_fee**           | TED fee                                                              |
| **spread_ted_fee**    | TED fee premium charged on the acquisition amount of the credit operation |

### _Origin Type_ Enumerator
Each fee type must be previously enabled and configured by QI Tech

| Enumerator            | Description                                                                  |
|-----------------------|----------------------------------------------------------------------------|
| **internal**          | Internal origin fee                                                   |
| **external**          | External origin fee                                                   |

---

# Error simulation in Sandbox

URL: /en/documentation/emissao_de_divida/simulando_erros

This page aims to help you simulate errors in a Sandbox environment.

# Simulating a disbursement error 

Using the following account disbursement bank acccount information, you will be able to simulate a disbursement error.

```json
account_digit: 0
account_number: 11581339
bank_code: 001
branch_number: 2874
document_number: Ajustar conforme documento de tomador
Nome: Ajustar conforme nome de tomador
```

# Simulating a QI Sign error

Using the following digits at the start of a document number, you will be able to generate a signature error.

Início de documento:
```json
0: Fraud detected in signature
8: Failed in the proof of life step
9: Facial validation did not reach the necessary score
```

---

# Possible debt statuses

URL: /en/documentation/emissao_de_divida/status_de_uma_divida

## Possible Debt Statuses

After issuing the credit contract, it can be tracked through the QI Tech platform's Webhooks. 

The states that the contract goes through are described below:

**waiting_signature**

After issuance, the first state of a contract is "waiting for signature". This status remains until the signature process is completed.

**signature_finished**

This is a transitional state. After receiving the last signature, the contract momentarily goes to the "signature_finished" status, when the webhook is triggered and transitions to the next state immediately.

**signed** 

After being signed, the contract remains in the "signed" status.

**issued**

This is a transitional state. On the disbursement date of a contract, it moves to the "issued" status, awaiting disbursement to transition to the next state.

**disbursed**

This is a transitional state. After the disbursement is made, the contract momentarily moves to the "disbursed" status, when the webhook is triggered and transitions to the next state immediately.

**opened**

After disbursement, the contract remains in the "opened" status - this is the final state if QI is not the collection agent for the operation.

**settled**

When QI Tech is the collection agent for the credit operation, the contract is monitored until it is settled. After the last installment payment, its status changes to "settled" and a webhook is triggered.

**canceled**

This state indicates that there was an error in the operation flow, such as failure to disburse credit to the debtor or the contract not being signed in a timely manner.

**canceled_permanently**

When there is any guarantee/collateral tied to the contract, this will be the final state, indicating that the guarantee/collateral has been released and the contract has been permanently canceled.

---

# Consulta de instituições financeiras

URL: /en/documentation/lista_de_instituicoes_financeiras/consulta_de_instituicoes_financeiras

## Request

ENDPOINT /financial_institution
MÉTODO GET

### QUERY PARAMS

| Campo | Descrição |
|---|---|
| `ispb_number` | Número ISPB da instituição financeira. |
| `name` | Nome da instituição financeira |
| `compe_number` | Número Compe da instituição financeira. |
| `min_str_start_date` | Data mínima de início da operação. |
| `max_str_start_date` | Data máxima de início da operação. |
| `page_number` | Página atual que está sendo consultada |
| `page_size` | Quantidade de resultados por página |

## Response

status: 200

Response Body: Consulta com paginação

```json
{
  "data": [
    {
      "compe_number": "001",
      "created_at": "2019-06-19T17:31:51",
      "is_active": true,
      "is_compe_participant": true,
      "ispb_number": "00000000",
      "name": "Banco do Brasil S.A.",
      "str_start_date": "2002-04-22"
    },
    {
      "compe_number": "070",
      "created_at": "2019-06-19T17:31:51",
      "is_active": true,
      "is_compe_participant": true,
      "ispb_number": "00000208",
      "name": "Banco de Brasília S.A.",
      "str_start_date": "2002-04-22"
    }
  ],
  "pagination": {
    "current_page": 1,
    "next_page": 2,
    "rows_per_page": 2,
    "total_pages": 115,
    "total_rows": 230
  }
}

```

Response Body: Consulta sem paginação

```json
{
  "94968518": {
    "compe_number": "289",
    "is_active": true,
    "is_compe_participant": false,
    "ispb_number": "94968518",
    "name": "Decyseo Corretora de Câmbio Ltda.",
    "str_start_date": "2019-03-14"
  },
  "00000000": {
    "compe_number": "001",
    "is_active": true,
    "is_compe_participant": true,
    "ispb_number": "00000000",
    "name": "Banco do Brasil S.A.",
    "str_start_date": "2002-04-22"
  }
}

```

:::info

Os parâmetros da requisição são opcionais, caso nenhum seja especificado, todas as instituições serão retornadas na resposta da requisição (sem paginação).

:::

---

# Notification Configuration

URL: /en/documentation/notificacoes/configuracao_de_notificacao

Here we will demonstrate how you can choose which types of events will be notified and by which means the notification will occur.

:::warning Warning
If there is no notification configuration for an event, you will not receive notifications for it.
:::

## Creating a Notification Configuration

## Request

ENDPOINT /notification/notification_configuration
METHOD POST

Request Body

```json
{
    "callback": true,
    "email": true,
    "event_type": "account_transaction",
    "sms": true
}
```

## Response

STATUS 201

Response Body

```json
{"notification_configuration_key":  "69850ae3-28bc-4779-a871-e73e1e883413"}
```

## Listing Notifications Configurations

## Request

ENDPOINT /notification/notification_configurations
METHOD GET

## Response

STATUS 200

Response Body

```json
{
  "data": [{
    "event_type": "account_request",
    "sms_template": "b35ed5fc-fdda-4618-84e6-b49876dabf23",
    "template_configuration_key": "480521cc-b0c9-4938-bd11-0000be11c66b"
  }],
  "pagination": {
        "current_page": 1,
        "next_page": null,
        "rows_per_page": 1
    }
}
```

## Update Notifications configuration

## Request

ENDPOINT /notification/notification_configuration/ NOTIFICATION_CONFIGURATION_KEY
METHOD PUT

Request Body

```json
{
    "callback": true,
    "email": true,
    "event_type": "account_transaction",
    "sms": false
}
```

## Response

STATUS 200

Response Body

```json
{}
```

STATUS 4XX

Response Body: Error

```json
{
  "title": "titulo",
  "description": "description in English",
  "translation": "descrição em portugues",
  "code": "codigo",
  "extra_fields": {}
}
```

| HTTP Code | QI Code<br/>`code` | Title<br/>`title`                    | Description (eng)<br/>`Description`               | Description (ptbr)<br/>`translation`                                   |
|-------------|----------------------|---------------------------------------|-------------------------------------------------|----------------------------------------------------------------------|
| 400         | PMB000026            | Invalid notification for event type   | Invalid notification method for event type      | Método de notificação inválido para tipo de evento                   |

---

# Template Configuration

URL: /en/documentation/notificacoes/configuracao_template

This configuration allows you to set SMS and email templates for an event.

## Creating template configuration

## Request

ENDPOINT /notification/template_configuration
METHOD POST

Request Body

```json
{
    "event_type": "bank_slip",
    "email_template_key": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
}
``` 

## Response

STATUS 201

Response Body

```json
{"template_configuration_key": "e5c337db-dacc-4f1d-8a3e-919628640d51"}
```

Response Body: Error

```json
{
  "title": "titulo",
  "description": "description in English",
  "translation": "description in portuguese",
  "code": "codigo",
  "extra_fields": {}
}
```

| HTTP Code | QI Code<br/>`code` | Title<br/>`title` | Description (eng)<br/>`Description`                                       | Description (ptbr)<br/>`translation`                                 |
|-------------|----------------------|--------------------|-------------------------------------------------------------------------|--------------------------------------------------------------------|
| 400         | PMB000023            | Bad Request        | Already exists an template configuration to this person and event type  | Já existe um template configuration para essa pessoa e event type  |

## Listing template configuration

## Request

ENDPOINT /notification/template_configurations
METHOD GET

## Response

STATUS 200

Response Body

```json
{
    "data": [
        {
            "event_type": "bank_slip",
            "sms_template": null,
            "template_configuration_key": "e5c337db-dacc-4f1d-8a3e-919628640d51",
            "email_template": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
        },
        {
            "event_type": "account_transaction",
            "sms_template": null,
            "template_configuration_key": "e5c337db-dacc-4f1d-8a3e-919628640ds1",
            "email_template": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
        }
    ],
    "pagination": {
        "current_page": 0,
        "next_page": null,
        "rows_per_page": 10
    }
}
```

## Updating template configuration

## Request

ENDPOINT /notification/template_configuration/ TEMPLATE_CONFIGURATION_KEY
METHOD PUT

Request Body

```json
{
    "event_type": "bank_slip",
    "email_template_key": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
}
``` 

## Response

STATUS 201

Response Body

```json
{}
```

STATUS 4XX

Response Body: Error

```json
{
  "title": "titulo",
  "description": "description in English",
  "translation": "description in portuguese",
  "code": "codigo",
  "extra_fields": {}
}
```

| HTTP Code | QI Code<br/>`code` | Title<br/>`title` | Description (eng)<br/>`Description`        | Description (ptbr)<br/>`translation`                     |
|-------------|----------------------|--------------------|------------------------------------------|--------------------------------------------------------|
| 400         | PMB000022            | Bad Request        | The event type (event type) is not valid | O tipo de evento (tipo de evento) enviado não é válido |
| 404         | PMB000024            | Not Found          | Template configuration not found         | Configuração de template não encontrada                |

---

# Custom Notification Management

URL: /en/documentation/notificacoes/introducao

Our platform offers a comprehensive range of notification options, including emails, SMS messages, and webhooks, allowing users to select the channel that best suits their needs and preferences. Additionally, we provide customization capabilities through templates for emails and SMS, ensuring that notifications align with the user's identity and communication style.

One of the most notable aspects of our system is the ability for users to define when they wish to receive notifications for specific events. This flexibility allows for more efficient management of the information flow, ensuring that users receive only the most relevant notifications at the most opportune time.

In this section of the documentation, we will detail the various aspects of Custom Notification Management, from initial setup to advanced customization, providing users with a comprehensive understanding of how to make the most of this essential feature on our platform.

---

# Resending notifications

URL: /en/documentation/notificacoes/reenvio_de_notificacoes

This guide is aimed at presenting how to resend a webhook through our systems' endpoints. Resending webhooks may be done to any existing callback, regardless of its current status.

## Notification flow
1. It is necessary to first consult pre-existing events in order to gather data to resend notifications, listed in **[Request](#request)**
2. Once gathering the desired webhooks' information using the GET method, you will need to pass the event_key and callback_key inside your PATCH request, presented in **[Resending a callback](#resending-a-callback)**

## Listing eligible events

## Request

ENDPOINT /notification/events
METHOD GET

### Query Parameters

| Parameter       | Type   | Description                                                       |
|-----------------|--------|-------------------------------------------------------------------|
| event_type      | string | Event Type (ex: "debt_disbursed")                                 |
| callback_status | string | Callback Status (ex: "failed", "sent", etc.)                      |
| origin_key      | uuid   | Unique event key                                                  |
| start_datetime  | string | Starting date/time of event "YYYY-MM-DDTHH:mm:ssZ" (UTC timezone) |
| end_datetime    | string | End date/time of event "YYYY-MM-DDTHH:mm:ssZ" (UTC timezone)      |

> **Observation:**
> The time window between `start_datetime` and `end_datetime` must be at most 14 days, or else an error will be returned.

## Response

STATUS 200

Response Body

```json
{
  "data": [
    {
      "event_key": "<UUID>",
      "event_type": "debt_disbursed",
      "status": "processed",
      "origin_enumerator": "account",
      "origin_key": "<UUID>",
      "callbacks": [
        {
          "callback_key": "<UUID>",
          "callback_status": "failed"
        }
      ],
    }
  ],
  "pagination": {
    "current_page": 1,
    "rows_per_page": 25,
  }
}
```

### Response Parameters

| Parameters        | Type   | Description                         |
|-------------------|--------|-------------------------------------|
| event_key         | uuid   | Event unique key                    |
| event_type        | string | Event type (ex: "debt_disbursed")   |
| status            | string | Event Status (ex: "processed")      |
| origin_enumerator | string | API origin enumeratior (ex: "lego") |
| origin_key        | uuid   | Origin unique key                   |
| callbacks         | list   | Callback object list                |
| pagination        | object | Object Pagination                   |

### Callback Object

| Parameters      | Type   | Description                                  |
|-----------------|--------|----------------------------------------------|
| callback_key    | uuid   | Calback unique key                           |
| callback_status | string | Callback Status (ex: "failed", "sent", etc.) |

### Pagination Object

| Parameter     | Type    | Description             |
|---------------|---------|-------------------------|
| current_page  | integer | Current page number     |
| rows_per_page | integer | Number of rows per page |

STATUS 400

Response Body: Error

```json
{
  "code": "PMB000032",
  "title": "Bad Request",
  "description": "Selected timeframe should have a maximum of 14 days",
  "translation": "O intervalo de tempo selecionado deve ter no máximo 14 dias",
}
```

## Resending a callback

## Request

:::important Time limit
The window for searches is limited to 14 days.
:::

:::warning Observations
Please check you are utilizing the event_key and callback_key fields gathered in the previous request.
:::

ENDPOINT `/notification/event/{event_key}/callback/{callback_key}/retry`
METHOD PATCH

### Path Parameters

| Parameter    | Type | Description                               |
|--------------|------|-------------------------------------------|
| event_key    | uuid | Event unique key (obtained in GET method) |
| callback_key | uuid | Callback unique key (obtained in GET method)  |

**Example usage**

```bash
curl -X PATCH "https://api-auth.sandbox.qitech.app/notification/event/123e4567-e89b-12d3-a456-426614174000/callback/987fcdeb-51a2-43d7-9012-345678901234/retry"
```

## Response

STATUS 204

Response Body

```json
{}
```

## Troubleshooting

When facing errors:
1. Verify the `event_key` and `callback_key` are correct.
2. Confirm the callback exists.
3. Verify the time window is within 14 days.
4. In case you are experiencing continuous errors, please contact the support team.

---

# Templates

URL: /en/documentation/notificacoes/template

Here we will see how to create email and SMS templates. These templates will allow you to customize the text and email messages sent for each type of event.

If not configured and the configuration is enabled, the default template from our platform will be sent.

Note: To insert a custom variable in the text, simply add '[variable_name]'.

## Creation of SMS template

## Request

ENDPOINT /notification/template
METHOD POST

Request Body

```json
{
    "template_type": "sms",
    "template": "Olá seu token e [name]"
}
```

## BODY PARAMS

| Field          | Type   | Description                  | Characters |
|----------------|--------|------------------------------|------------|
| `template_type` * | string | Type of template -> Default value `sms` | -        |
| `template` *   | string | SMS text                      | 160        |

## Response

STATUS 201

Response Body

```json
{
    "template_key": "17f49953-29a1-439c-a6be-db37a32e2746"
}
```

## Creation of e-mail template

:::warning Warning
The email template is an HTML document compatible with email HTML formatting.
It must be encoded in base64.
:::

## Request

ENDPOINT /notification/template
METHOD POST

Request Body

```json
{
    "template_type": "email",
    "subject": "Título do email",
    "template": "PCFET0NUWVBFIGh0bWw+CjxodG1sIHhtbG5zOnY9InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206dm1sIiB4bWxuczpvPSJ1cm46c2NoZW1hcy1taWNyb3NvZnQtY29tOm9mZmljZTpvZmZpY2UiIGxhbmc9ImVuIj4KICA8aGVhZD4KICAgIDx0aXRsZT48L3RpdGxlPgogICAgPG1ldGEgY2hhcnNldD0iVVRGLTgiPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xLjAiPgogICAgPCEtLVtpZiBtc29dPgoJCQkJPHhtbD4KCQkJCQk8bzpPZmZpY2VEb2N1bWVudFNldHRpbmdzPgoJCQkJCQk8bzpQaXhlbHNQZXJJbmNoPjk2PC9vOlBpeGVsc1BlckluY2g+CgkJCQkJCTxvOkFsbG93UE5HLz4KCQkJCQk8L286T2ZmaWNlRG9jdW1lbnRTZXR0aW5ncz4KCQkJCTwveG1sPgoJCQkJPCFbZW5kaWZdLS0+CiAgICA8IS0tW2lmICFtc29dPgoJCQkJPCEtLT4KICAgIDxsaW5rIGhyZWY9Imh0dHBzOi8vZm9udHMuZ29vZ2xlYXBpcy5jb20vY3NzP2ZhbWlseT1Nb250c2VycmF0IiByZWw9InN0eWxlc2hlZXQiIHR5cGU9InRleHQvY3NzIj4KICAgIDwhLS0KCQkJCQk8IVtlbmRpZl0tLT4KICAgIDxzdHlsZT4KICAgICAgKiB7CiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgfQoKICAgICAgYm9keSB7CiAgICAgICAgbWFyZ2luOiAwOwogICAgICAgIHBhZGRpbmc6IDA7CiAgICAgIH0KCiAgICAgIGFbeC1hcHBsZS1kYXRhLWRldGVjdG9yc10gewogICAgICAgIGNvbG9yOiBpbmhlcml0ICFpbXBvcnRhbnQ7CiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBpbmhlcml0ICFpbXBvcnRhbnQ7CiAgICAgIH0KCiAgICAgICNNZXNzYWdlVmlld0JvZHkgYSB7CiAgICAgICAgY29sb3I6IGluaGVyaXQ7CiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lOwogICAgICB9CgogICAgICBwIHsKICAgICAgICBsaW5lLWhlaWdodDogaW5oZXJpdAogICAgICB9CgogICAgICBAbWVkaWEgKG1heC13aWR0aDo2MjBweCkgewogICAgICAgIC5yb3ctY29udGVudCB7CiAgICAgICAgICB3aWR0aDogMTAwJSAhaW1wb3J0YW50OwogICAgICAgIH0KCiAgICAgICAgLnN0YWNrIC5jb2x1bW4gewogICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICBkaXNwbGF5OiB3aXRoOwogICAgICAgIH0KICAgICAgfQogICAgPC9zdHlsZT4KICA8L2hlYWQ+CiAgPGJvZHkgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IG1hcmdpbjogMDsgcGFkZGluZzogMDsgLXdlYmtpdC10ZXh0LXNpemUtYWRqdXN0OiBub25lOyB0ZXh0LXNpemUtYWRqdXN0OiBub25lOyI+CiAgICA8dGFibGUgY2xhc3M9Im5sLWNvbnRhaW5lciIgd2lkdGg9IjEwMCUiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsiPgogICAgICA8dGJvZHk+CiAgICAgICAgPHRyPgogICAgICAgICAgPHRkPgogICAgICAgICAgICA8dGFibGUgY2xhc3M9InJvdyByb3ctMSIgYWxpZ249ImNlbnRlciIgd2lkdGg9IjEwMCUiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsiPgogICAgICAgICAgICAgIDx0Ym9keT4KICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICAgIDx0YWJsZSBjbGFzcz0icm93LWNvbnRlbnQgc3RhY2siIGFsaWduPSJjZW50ZXIiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsgY29sb3I6ICMwMDAwMDA7IHdpZHRoOiA2MDBweDsiIHdpZHRoPSI2MDAiPgogICAgICAgICAgICAgICAgICAgICAgPHRib2R5PgogICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGNsYXNzPSJjb2x1bW4iIHdpZHRoPSIxMDAlIiBzdHlsZT0ibXNvLXRhYmxlLWxzcGFjZTogMHB0OyBtc28tdGFibGUtcnNwYWNlOiAwcHQ7IGZvbnQtd2VpZ2h0OiA0MDA7IHRleHQtYWxpZ246IGxlZnQ7IHZlcnRpY2FsLWFsaWduOiB0b3A7IHBhZGRpbmctdG9wOiA1cHg7IHBhZGRpbmctYm90dG9tOiA1cHg7IGJvcmRlci10b3A6IDBweDsgYm9yZGVyLXJpZ2h0OiAwcHg7IGJvcmRlci1ib3R0b206IDBweDsgYm9yZGVyLWxlZnQ6IDBweDsiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPSJpbWFnZV9ibG9jayIgd2lkdGg9IjEwMCUiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjIwIiBjZWxsc3BhY2luZz0iMCIgcm9sZT0icHJlc2VudGF0aW9uIiBzdHlsZT0ibXNvLXRhYmxlLWxzcGFjZTogMHB0OyBtc28tdGFibGUtcnNwYWNlOiAwcHQ7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgYWxpZ249ImNlbnRlciIgc3R5bGU9ImxpbmUtaGVpZ2h0OjEwcHgiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW1nIHNyYz0iaHR0cHM6Ly85bzM3Lm1qdC5sdS90cGxpbWcvOW8zNy9iLzF5ejdpL2hrM3NwLnBuZyIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyBoZWlnaHQ6IGF1dG87IGJvcmRlcjogMDsgd2lkdGg6IDEyMHB4OyBtYXgtd2lkdGg6IDEwMCU7IiB3aWR0aD0iMTIwIiBhbHQ9InBsYWNlaG9sZGVyIGxvZ28iIHRpdGxlPSJwbGFjZWhvbGRlciBsb2dvIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICA8L3Rib2R5PgogICAgICAgICAgICAgICAgICAgIDwvdGFibGU+CiAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgIDwvdGJvZHk+CiAgICAgICAgICAgIDwvdGFibGU+CiAgICAgICAgICAgIDx0YWJsZSBjbGFzcz0icm93IHJvdy0yIiBhbGlnbj0iY2VudGVyIiB3aWR0aD0iMTAwJSIgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHJvbGU9InByZXNlbnRhdGlvbiIgc3R5bGU9Im1zby10YWJsZS1sc3BhY2U6IDBwdDsgbXNvLXRhYmxlLXJzcGFjZTogMHB0OyI+CiAgICAgICAgICAgICAgPHRib2R5PgogICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPSJyb3ctY29udGVudCBzdGFjayIgYWxpZ249ImNlbnRlciIgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHJvbGU9InByZXNlbnRhdGlvbiIgc3R5bGU9Im1zby10YWJsZS1sc3BhY2U6IDBwdDsgbXNvLXRhYmxlLXJzcGFjZTogMHB0OyBjb2xvcjogIzAwMDAwMDsgd2lkdGg6IDYwMHB4OyIgd2lkdGg9IjYwMCI+CiAgICAgICAgICAgICAgICAgICAgICA8dGJvZHk+CiAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImNvbHVtbiIgd2lkdGg9IjEwMCUiIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsgZm9udC13ZWlnaHQ6IDQwMDsgdGV4dC1hbGlnbjogbGVmdDsgdmVydGljYWwtYWxpZ246IHRvcDsgcGFkZGluZy10b3A6IDVweDsgcGFkZGluZy1ib3R0b206IDVweDsgYm9yZGVyLXRvcDogMHB4OyBib3JkZXItcmlnaHQ6IDBweDsgYm9yZGVyLWJvdHRvbTogMHB4OyBib3JkZXItbGVmdDogMHB4OyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGFibGUgY2xhc3M9ImhlYWRpbmdfYmxvY2siIHdpZHRoPSIxMDAlIiBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMCIgcm9sZT0icHJlc2VudGF0aW9uIiBzdHlsZT0ibXNvLXRhYmxlLWxzcGFjZTogMHB0OyBtc28tdGFibGUtcnNwYWNlOiAwcHQ7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT0icGFkZGluZy1ib3R0b206MjBweDtwYWRkaW5nLWxlZnQ6MjBweDtwYWRkaW5nLXJpZ2h0OjIwcHg7cGFkZGluZy10b3A6NjBweDt0ZXh0LWFsaWduOmNlbnRlcjt3aWR0aDoxMDAlOyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aDEgc3R5bGU9Im1hcmdpbjogMDsgY29sb3I6ICMwMDAwMDA7IGRpcmVjdGlvbjogbHRyOyBmb250LWZhbWlseTogTW9udHNlcnJhdCwgVHJlYnVjaGV0IE1TLCBMdWNpZGEgR3JhbmRlLCBMdWNpZGEgU2FucyBVbmljb2RlLCBMdWNpZGEgU2FucywgVGFob21hLCBzYW5zLXNlcmlmOyBmb250LXNpemU6IDI1cHg7IGZvbnQtd2VpZ2h0OiBub3JtYWw7IGxldHRlci1zcGFjaW5nOiBub3JtYWw7IGxpbmUtaGVpZ2h0OiAxMjAlOyB0ZXh0LWFsaWduOiBjZW50ZXI7IG1hcmdpbi10b3A6IDA7IG1hcmdpbi1ib3R0b206IDA7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHN0cm9uZz5NQU5VVEVOw4fDg08gUFJPR1JBTUFEQTwvc3Ryb25nPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2gxPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPSJ0ZXh0X2Jsb2NrIiB3aWR0aD0iMTAwJSIgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHJvbGU9InByZXNlbnRhdGlvbiIgc3R5bGU9Im1zby10YWJsZS1sc3BhY2U6IDBwdDsgbXNvLXRhYmxlLXJzcGFjZTogMHB0OyB3b3JkLWJyZWFrOiBicmVhay13b3JkOyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9InBhZGRpbmctYm90dG9tOjgwcHg7cGFkZGluZy1sZWZ0OjIwcHg7cGFkZGluZy1yaWdodDoyMHB4O3BhZGRpbmctdG9wOjYwcHg7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgc3R5bGU9ImZvbnQtZmFtaWx5OiBzYW5zLXNlcmlmIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBzdHlsZT0iZm9udC1zaXplOiAxNnB4OyBtc28tbGluZS1oZWlnaHQtYWx0OiAxNi44cHg7IGNvbG9yOiAjMDAwMDAwOyBsaW5lLWhlaWdodDogMS4yOyBmb250LWZhbWlseTogTW9udHNlcnJhdCwgVHJlYnVjaGV0IE1TLCBMdWNpZGEgR3JhbmRlLCBMdWNpZGEgU2FucyBVbmljb2RlLCBMdWNpZGEgU2FucywgVGFob21hLCBzYW5zLXNlcmlmOyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgc3R5bGU9Im1hcmdpbjogMDsgZm9udC1zaXplOiAxOHB4OyB0ZXh0LWFsaWduOiBsZWZ0OyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnI+SW5mb3JtYW1vcyBxdWUgbm8gZGlhIDxiPjE4IGRlIGZldmVyZWlybyAoZG9taW5nbyk8L2I+LCBhIFFJIFRlY2ggcmVhbGl6YXLDoSB1bWEgbWFudXRlbsOnw6NvIGdlcmFsIGVtIHRvZG9zIG9zIHNldXMgc2lzdGVtYXMgZSBzZXJ2acOnb3MuIEVzdGEgbWFudXRlbsOnw6NvIHRlcsOhIHVtYSBkdXJhw6fDo28gZGUgdHLDqnMgaG9yYXMsIHRlbmRvIHNldSA8c3Ryb25nPmluw61jaW8gw6BzIDAyOjAwICgyQU0pPC9zdHJvbmc+IGUgc2V1IDxzdHJvbmc+dMOpcm1pbm8gw6BzIDA1OjAwICg1QU0pPC9zdHJvbmc+LgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvcD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cCBzdHlsZT0ibWFyZ2luOiAwOyBmb250LXNpemU6IDE4cHg7IHRleHQtYWxpZ246IGxlZnQ7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxicj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3A+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHA+IFNlcnZpw6dvcyA8c3Ryb25nPmluZGlzcG9uw612ZWlzPC9zdHJvbmc+IGR1cmFudGUgYSBtYW5udXRlbsOnw6NvOiA8L3A+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9wPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx1bD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxpPlRvZG9zIHNlcnZpw6dvcyByZWxhY2lvbmFkb3MgYW8gUGl4W25hbWVdPC9saT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaT5QbGF0YWZvcm1hIDxzdHJvbmc+cWl0ZWNoLmFwcDwvc3Ryb25nPjwvbGk+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGk+VG9kYXMgYXMgQVBJczwvbGk+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGk+QVBQIFFpIENvbnRhPC9saT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3VsPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwIHN0eWxlPSJtYXJnaW46IDA7IGZvbnQtc2l6ZTogMTZweDsgdGV4dC1hbGlnbjogbGVmdDsgbXNvLWxpbmUtaGVpZ2h0LWFsdDogMTYuOHB4OyI+Jm5ic3A7PC9wPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwIHN0eWxlPSJtYXJnaW46IDA7IGZvbnQtc2l6ZTogMTZweDsgdGV4dC1hbGlnbjogbGVmdDsiPkF0ZW5jaW9zYW1lbnRlLDwvcD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90YWJsZT4KICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgICAgICAgICAgPC90Ym9keT4KICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICA8L3Rib2R5PgogICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICA8dGFibGUgY2xhc3M9InJvdyByb3ctMyIgYWxpZ249ImNlbnRlciIgd2lkdGg9IjEwMCUiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsiPgogICAgICAgICAgICAgIDx0Ym9keT4KICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgPHRkPgogICAgICAgICAgICAgICAgICAgIDx0YWJsZSBjbGFzcz0icm93LWNvbnRlbnQgc3RhY2siIGFsaWduPSJjZW50ZXIiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsgY29sb3I6ICNmZmY7IHdpZHRoOiA2MDBweDsiIHdpZHRoPSI2MDAiPgogICAgICAgICAgICAgICAgICAgICAgPHRib2R5PgogICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGNsYXNzPSJjb2x1bW4iIHdpZHRoPSIxMDAlIiBzdHlsZT0ibXNvLXRhYmxlLWxzcGFjZTogMHB0OyBtc28tdGFibGUtcnNwYWNlOiAwcHQ7IGZvbnQtd2VpZ2h0OiA0MDA7IHRleHQtYWxpZ246IGxlZnQ7IHZlcnRpY2FsLWFsaWduOiB0b3A7IHBhZGRpbmctbGVmdDogMjBweDsgcGFkZGluZy1yaWdodDogMjBweDsgcGFkZGluZy10b3A6IDBweDsgcGFkZGluZy1ib3R0b206IDEwcHg7IGJvcmRlci10b3A6IDBweDsgYm9yZGVyLXJpZ2h0OiAwcHg7IGJvcmRlci1ib3R0b206IDBweDsgYm9yZGVyLWxlZnQ6IDBweDsiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPSJpbWFnZV9ibG9jayIgd2lkdGg9IjEwMCUiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPSJ3aWR0aDoxMDAlO3BhZGRpbmctcmlnaHQ6MHB4O3BhZGRpbmctbGVmdDowcHg7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgYWxpZ249ImNlbnRlciIgc3R5bGU9ImxpbmUtaGVpZ2h0OjEwcHgiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW1nIHNyYz0iaHR0cHM6Ly85bzM3Lm1qdC5sdS90cGxpbWcvOW8zNy9iLzF5ejdpL2hrM3NwLnBuZyIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyBoZWlnaHQ6IGF1dG87IGJvcmRlcjogMDsgd2lkdGg6IDEyNnB4OyBtYXgtd2lkdGg6IDEwMCU7IiB3aWR0aD0iMTI2Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICA8L3Rib2R5PgogICAgICAgICAgICAgICAgICAgIDwvdGFibGU+CiAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgIDwvdGJvZHk+CiAgICAgICAgICAgIDwvdGFibGU+CiAgICAgICAgICAgIDx0YWJsZSBjbGFzcz0icm93IHJvdy00IiBhbGlnbj0iY2VudGVyIiB3aWR0aD0iMTAwJSIgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHJvbGU9InByZXNlbnRhdGlvbiIgc3R5bGU9Im1zby10YWJsZS1sc3BhY2U6IDBwdDsgbXNvLXRhYmxlLXJzcGFjZTogMHB0OyI+CiAgICAgICAgICAgICAgPHRib2R5PgogICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICA8dGQ+CiAgICAgICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPSJyb3ctY29udGVudCBzdGFjayIgYWxpZ249ImNlbnRlciIgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHJvbGU9InByZXNlbnRhdGlvbiIgc3R5bGU9Im1zby10YWJsZS1sc3BhY2U6IDBwdDsgbXNvLXRhYmxlLXJzcGFjZTogMHB0OyBjb2xvcjogI2ZmZjsgd2lkdGg6IDYwMHB4OyIgd2lkdGg9IjYwMCI+CiAgICAgICAgICAgICAgICAgICAgICA8dGJvZHk+CiAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImNvbHVtbiIgd2lkdGg9IjEwMCUiIHN0eWxlPSJtc28tdGFibGUtbHNwYWNlOiAwcHQ7IG1zby10YWJsZS1yc3BhY2U6IDBwdDsgZm9udC13ZWlnaHQ6IDQwMDsgdGV4dC1hbGlnbjogbGVmdDsgdmVydGljYWwtYWxpZ246IHRvcDsgcGFkZGluZy10b3A6IDVweDsgcGFkZGluZy1ib3R0b206IDVweDsgYm9yZGVyLXRvcDogMHB4OyBib3JkZXItcmlnaHQ6IDBweDsgYm9yZGVyLWJvdHRvbTogMHB4OyBib3JkZXItbGVmdDogMHB4OyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGFibGUgY2xhc3M9Imh0bWxfYmxvY2siIHdpZHRoPSIxMDAlIiBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMCIgcm9sZT0icHJlc2VudGF0aW9uIiBzdHlsZT0ibXNvLXRhYmxlLWxzcGFjZTogMHB0OyBtc28tdGFibGUtcnNwYWNlOiAwcHQ7Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgc3R5bGU9ImZvbnQtZmFtaWx5Ok1vbnRzZXJyYXQsIFRyZWJ1Y2hldCBNUywgTHVjaWRhIEdyYW5kZSwgTHVjaWRhIFNhbnMgVW5pY29kZSwgTHVjaWRhIFNhbnMsIFRhaG9tYSwgc2Fucy1zZXJpZjt0ZXh0LWFsaWduOmNlbnRlcjsiIGFsaWduPSJjZW50ZXIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHN0eWxlPSJoZWlnaHQ6MzBweDsiPiZuYnNwOzwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGFibGU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgICAgICAgIDwvdGJvZHk+CiAgICAgICAgICAgICAgICAgICAgPC90YWJsZT4KICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgPC90Ym9keT4KICAgICAgICAgICAgPC90YWJsZT4KICAgICAgICAgIDwvdGQ+CiAgICAgICAgPC90cj4KICAgICAgPC90Ym9keT4KICAgIDwvdGFibGU+CiAgICA8IS0tIEVuZCAtLT4KICAgIDxkaXYgc3R5bGU9ImJhY2tncm91bmQ6I2ZmZmZmZjtiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmY7bWFyZ2luOjBweCBhdXRvO21heC13aWR0aDo2MDBweDsiPgogICAgICA8dGFibGUgYWxpZ249ImNlbnRlciIgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHJvbGU9InByZXNlbnRhdGlvbiIgc3R5bGU9ImJhY2tncm91bmQ6I2ZmZmZmZjtiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmY7d2lkdGg6MTAwJTsiPgogICAgICAgIDx0Ym9keT4KICAgICAgICAgIDx0cj4KICAgICAgICAgICAgPHRkIHN0eWxlPSJib3JkZXI6MHB4IHNvbGlkICNmZmZmZmY7ZGlyZWN0aW9uOmx0cjtmb250LXNpemU6MHB4O3BhZGRpbmc6MHB4IDMwcHggMjVweCAzMHB4O3BhZGRpbmctYm90dG9tOjI1cHg7cGFkZGluZy1sZWZ0OjMwcHg7cGFkZGluZy1yaWdodDozMHB4O3BhZGRpbmctdG9wOjBweDt0ZXh0LWFsaWduOmNlbnRlcjsiPgogICAgICAgICAgICAgIDwhLS1baWYgbXNvIHwgSUVdPgoJCQkJCQkJCQkJCQkJCQk8dGFibGUgcm9sZT0icHJlc2VudGF0aW9uIiBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMCI+CgkJCQkJCQkJCQkJCQkJCQk8dHI+CgkJCQkJCQkJCQkJCQkJCQkJPHRkIGNsYXNzPSIiIHN0eWxlPSJ2ZXJ0aWNhbC1hbGlnbjp0b3A7d2lkdGg6NTQwcHg7IiA+CgkJCQkJCQkJCQkJCQkJCQkJCTwhW2VuZGlmXS0tPgogICAgICAgICAgICAgIDxkaXYgY2xhc3M9Im1qLWNvbHVtbi1wZXItMTAwIG1qLW91dGxvb2stZ3JvdXAtZml4IiBzdHlsZT0iZm9udC1zaXplOjBweDt0ZXh0LWFsaWduOmxlZnQ7ZGlyZWN0aW9uOmx0cjtkaXNwbGF5OmlubGluZS1ibG9jazt2ZXJ0aWNhbC1hbGlnbjp0b3A7d2lkdGg6MTAwJTsiPgogICAgICAgICAgICAgICAgPHRhYmxlIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiByb2xlPSJwcmVzZW50YXRpb24iIHN0eWxlPSJ2ZXJ0aWNhbC1hbGlnbjp0b3A7IiB3aWR0aD0iMTAwJSI+CiAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICA8dGQgYWxpZ249ImxlZnQiIHN0eWxlPSJmb250LXNpemU6MHB4O3BhZGRpbmc6MTBweCAyNXB4O3BhZGRpbmctdG9wOjBweDtwYWRkaW5nLWJvdHRvbTowcHg7d29yZC1icmVhazpicmVhay13b3JkOyI+CiAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHN0eWxlPSJmb250LWZhbWlseTpBcmlhbCwgc2Fucy1zZXJpZjtmb250LXNpemU6MTRweDtsZXR0ZXItc3BhY2luZzpub3JtYWw7bGluZS1oZWlnaHQ6MTt0ZXh0LWFsaWduOmxlZnQ7Y29sb3I6IzAwMDAwMDsiPgogICAgICAgICAgICAgICAgICAgICAgICA8cCBjbGFzcz0idGV4dC1idWlsZC1jb250ZW50IiBzdHlsZT0idGV4dC1hbGlnbjogY2VudGVyOyBtYXJnaW46IDEwcHggMDsgbWFyZ2luLXRvcDogMTBweDsiIGRhdGEtdGVzdGlkPSIyNFlfYk1SSW9JIj4KICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBzdHlsZT0iY29sb3I6IzE5MjQ3RTtmb250LWZhbWlseTpSb2JvdG87Zm9udC1zaXplOjE0cHg7Ij48L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvcD4KICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9InRleHQtYnVpbGQtY29udGVudCIgc3R5bGU9InRleHQtYWxpZ246IGNlbnRlcjsgbWFyZ2luOiAxMHB4IDA7IG1hcmdpbi1ib3R0b206IDEwcHg7IiBkYXRhLXRlc3RpZD0iMjRZX2JNUklvSSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gc3R5bGU9ImNvbG9yOiMxOTI0N0U7Zm9udC1mYW1pbHk6Um9ib3RvO2ZvbnQtc2l6ZToxNHB4OyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPSJbW1VOU1VCX0xJTktfRU5dXSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxiciAvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnIgLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT4KICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvcD4KICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICA8L3RhYmxlPgogICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgIDwhLS1baWYgbXNvIHwgSUVdPgoJCQkJCQkJCQkJCQkJCQkJCTwvdGQ+CgkJCQkJCQkJCQkJCQkJCQk8L3RyPgoJCQkJCQkJCQkJCQkJCQk8L3RhYmxlPgoJCQkJCQkJCQkJCQkJCQk8IVtlbmRpZl0tLT4KICAgICAgICAgICAgPC90ZD4KICAgICAgICAgIDwvdHI+CiAgICAgICAgPC90Ym9keT4KICAgICAgPC90YWJsZT4KICAgIDwvZGl2PgogICAgPCEtLVtpZiBtc28gfCBJRV0+CgkJCQkJCQkJCTwvdGQ+CgkJCQkJCQkJPC90cj4KCQkJCQkJCTwvdGFibGU+CgkJCQkJCQk8IVtlbmRpZl0tLT4KICA8L2JvZHk+CjwvaHRtbD4="
}
```

## BODY PARAMS

| Field          | Type   | Description                         | Characters |
|----------------|--------|-------------------------------------|------------|
| `template_type` * | string | Type of template -> Default value `email` | -          |
| `template` *   | string | Base64 encoded template             | -          |
| `subject` *    | string | Email subject                       | 80         |

## Response

STATUS 201

Response Body

```json
{
    "template_key": "17f49953-29a1-439c-a6be-db37a32e2746"
}
```

## Templates listing

## Request

ENDPOINT /notification/templates
METHOD GET

## Response

STATUS 200

Response Body

```json
{
  "data": [{
    "template_key": "b35ed5fc-fdda-4618-84e6-b49876dabf24",
    "template_type": "sms",
    "template_status": "480521cc-b0c9-4938-bd11-0000be11c66b",
    "template": "Seu código é [code]"
  }],
  "pagination": {
        "current_page": 1,
        "next_page": null,
        "rows_per_page": 1
    }
}
```

---

# Events

URL: /en/documentation/notificacoes/tipos_de_evento

Events trigger notifications. By reviewing the event list, you can gain understanding of the types of notifications you can receive and the means through which they are delivered (webhook, email, and SMS).

Events have the attributes `allowed_sms`, `allowed_email`, and `allowed_callback` that indicate the possibility of sending SMS, emails, or callbacks respectively. Additionally, in cases where email and SMS sending is possible, they may contain `allowed_custom_vars` that indicate the variables that can be replaced in the template using the format `[allowed_custom_var]`, which will be replaced by its corresponding value during delivery.
## Events consult

## Request

ENDPOINT /notification/event_types
METHOD GET

### Query Params

| Field      | Type   | Description                              |
|------------|--------|------------------------------------------|
| `page`     | number | Page to be retrieved, default value is 0  |
| `page_size`| number | Number of items to be retrieved, default is 10 |

## Response

STATUS 200

Response Body: Event types list

```json
{
    "data": [
        {
            "event_type": "incoming_ted",
            "allow_sms": false,
            "allow_email": true,
            "allow_callback": true,
            "allowed_custom_vars": ["total_amount", "target_account_number", "target_document_number"]
        },
        {
            "event_type": "outgoing_ted",
            "allow_sms": true,
            "allow_email": true,
            "allow_callback": false,
            "allowed_custom_vars": null
        }
    ],
    "pagination": {
        "current_page": 1,
        "next_page": 2,
        "rows_per_page": 2
    }
}

```

---

# Setting Up the Webhook Receiving URL

URL: /en/documentation/primeiros_passos/configurando_webhooks

To set up the receiving URL for notifications, log in to the QI Tech platform. Click on **My Profile** located in the left sidebar menu, then go to the Integration tab. After that, enter your URL in the **Webhook Settings** section of the page and click the **SAVE** button. If it is necessary to configure headers for the notifications sent, you can use the next field as shown in the image below.

:::danger Attention!
QI Tech webhooks should not be strictly mapped. 
Additional fields may be included in the payloads of the webhooks returned by our APIs.
:::

:::info Information
The timeout for our webhook response is 10 seconds.
:::

---

# Configuring Integration IP Allowlist

URL: /en/documentation/primeiros_passos/configurar_ip_de_integracao

:::info See also
- [Setting Up the Webhook Receiving URL](/documentation/primeiros_passos/configurando_webhooks)
- [Webhook Validation](/documentation/primeiros_passos/teste_de_autenticacao/webhook_v2)
:::

QI Tech lets you restrict calls to your integration to a list of pre-authorized **public IP addresses** (or CIDR ranges). This filter is applied before signature validation: requests originating from IPs outside your active list are rejected with `403 Forbidden` (`GDF000029`).

## How to configure

Log in to the QI Tech platform, click **My Profile** in the left sidebar, and open the **Integration** tab. Scroll to the "**Whitelist de IPs da API**" section and add one IP at a time in the "**IP / CIDR**" field, clicking "**ADICIONAR IP**" for each entry.

Accepted formats:

- Public IPv4 address (e.g.: `189.10.20.30`)
- IPv4 CIDR range with prefix `/24` or larger (e.g.: `200.100.50.0/24`)
- Public IPv6 address
- IPv6 CIDR range with prefix `/48` or larger

Private/reserved ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `127.0.0.0/8`, `169.254.0.0/16`) are not accepted.

## Activation window (48 hours)

:::warning Attention!
For security reasons, **every IP registered through the dashboard stays in `Pending` status for 48 hours** before being activated automatically. During this period the IP is registered but **does not authorize requests** — whatever is currently in your active allowlist keeps working.

You will receive an email confirming the registration and another when the IP transitions to `Active`.
:::

After 48 hours, the IP automatically moves to `Active` and starts being authorized to call the API.

## Emergency activation

:::info Immediate release
If you need to release an IP **before the 48-hour window** (e.g.: unplanned server migration, production incident), contact our support through the official channels and request manual activation with the following information:

- The registered `IP / CIDR`
- Your integration's `client_integration_key`
- The reason for urgency

Our operations team will perform the manual promotion and the IP will take effect immediately.
:::

## Common errors

| Code | Cause | Solution |
|---|---|---|
| `403` / `GDF000029` | The request came from an IP that is not in `Active` status in your allowlist | Check on the Integration screen which IPs are active. If the IP you just registered is still `Pending`, wait for the 48 hours or request manual activation. |
| IP registration rejected | Invalid IP/CIDR, private range, or range too broad (prefix smaller than `/24` for IPv4 or `/48` for IPv6) | Use public addresses only and respect the minimum prefix sizes. |

---

# Introduction

URL: /en/documentation/primeiros_passos/inicio

We are the first financial institution to create an exclusive Bank-as-a-Service (BaaS) model in Brazil. Our goal is to help any Fintech/Credit Manager or company to have access to fast, agile and secure financial services, the way they want. Learn more at https://qitech.com.br.

This documentation aims to describe the various endpoints of our APIs.

Note: In case of doubts at any stage of the process, please contact [api@qitech.com.br](mailto:api@qitech.com.br) detailing your problem/doubt and we will assist you.

## First steps

Before starting operations by sending API requests to consume QI Tech services, it is important that an operator representing the originator company performs the following steps **in sandbox environment**.

## Access Profile Creation

1. Send an access creation request to the email api@qitech.com.br providing the following information:
   1. Company CNPJ
   2. Full name of the Master user
   3. CPF of the Master user
   4. Email of the Master user
   5. Cell phone number of the Master user
2. After access creation by the QI Tech team, the Master user will receive an email with a link to access the QI Tech platform in sandbox and a temporary password.
3. When performing the first access to the platform, the Master user must reset the access password.

## Starting the integration journey

There are several combinations of endpoints that can be used according to the partner's needs, but the first three steps are universal regardless of the services used:

Step 1: Perform Token validation through the QI Tech portal
Step 2: [Perform key exchange and generate integration credentials](/documentation/primeiros_passos/troca_de_chaves)
Step 3: [Perform authentication test](/documentation/primeiros_passos/teste_de_autenticacao/teste_de_autenticacao_v2)
Step 4: [Configure webhook receiving URL](/documentation/primeiros_passos/configurando_webhooks)

## Important information

To use our API in production it is necessary to contact [comercial@qitech.com.br](mailto:comercial@qitech.com.br) for commercial contact and integration setup.

---

# Test Endpoints

URL: /en/documentation/primeiros_passos/teste_de_autenticacao/endpoints_de_teste

:::info See also
- [Authentication test](./teste_de_autenticacao_v2)
- [Complete authentication example](./teste_de_autenticacao_completo)
- [Possible errors](./possiveis_erros)
:::

## GET Method

### Request

ENDPOINT /test/ API_KEY
METHOD GET

### Path Params

| Field | Type | Description |
|-|-|-|
| `api_key` * | string | Partner's API_KEY. |

<CodeSample endpoint="GET /test/{api_key}" samples={{
  curl: `curl -X GET \\
  'https://api-auth.sandbox.qitech.app/test/{api_key}' \\
  -H 'AUTHORIZATION: {encoded_header_token}' \\
  -H 'API-CLIENT-KEY: {api_key}'`,
  python: `import requests

url = f"{base_url}/test/{api_key}"
response = requests.get(url=url, headers=signed_header)
print(response.json())`,
  javascript: `const url = \`\${base_url}/test/\${api_key}\`;
const response = await fetch(url, {
  method: 'GET',
  headers: {
    'AUTHORIZATION': encoded_header_token,
    'API-CLIENT-KEY': api_key,
  },
});
const data = await response.json();
console.log(data);`,
  java: `OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
    .url(requestUrl + "/" + api_key)
    .headers(Headers.of(headers))
    .get()
    .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());`,
}} />

### Response

STATUS 200

Response Body

```json
{
  "test_key": "97ad0301-869c-4481-98b6-294b139e09ae",
  "success": "Congrats!"
}
```

## POST Method

### Request

ENDPOINT test/ API_KEY
METHOD POST

<CodeSample endpoint="POST /test/{api_key}" samples={{
  curl: `curl -X POST \\
  'https://api-auth.sandbox.qitech.app/test/{api_key}' \\
  -H 'AUTHORIZATION: {encoded_header_token}' \\
  -H 'API-CLIENT-KEY: {api_key}' \\
  -H 'Content-Type: application/json' \\
  -d '{"name": "QI Tech"}'`,
  python: `import requests

url = f"{base_url}/test/{api_key}"
body = {"name": "QI Tech"}
response = requests.post(url=url, headers=signed_header, json=body)
print(response.json())`,
  javascript: `const url = \`\${base_url}/test/\${api_key}\`;
const response = await fetch(url, {
  method: 'POST',
  headers: {
    'AUTHORIZATION': encoded_header_token,
    'API-CLIENT-KEY': api_key,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'QI Tech' }),
});
const data = await response.json();
console.log(data);`,
  java: `OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
    mediaType, "{\\"name\\": \\"QI Tech\\"}");
Request request = new Request.Builder()
    .url(requestUrl + "/" + api_key)
    .headers(Headers.of(headers))
    .post(body)
    .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());`,
}} />

Request Body

```json
{
  "name": "QI Tech"
}
```

### Path Params

| Field | Type | Description |
|-|-|-|
| `api_key` * | string | Partner's API_KEY. |

### Response

STATUS 201

Response Body

```json
{
  "name": "QI Tech",
  "success": "Congrats!"
}
```

---

# Possible errors:

URL: /en/documentation/primeiros_passos/teste_de_autenticacao/possiveis_erros

# Possible errors:

## Error in token

If the signature of the string_to_sign is incorrect, an error will be shown related to the encoded_header_token :

STATUS 401

Response Body

```json
{
	"title": "QI Unauthenticated",
	"description": "Please provide valid credentials as part of the request. (Documentation: https://qitech.com.br/documentation) Details: Failed while decoding the authentication token",
	"translation": "Por favor forneça credenciais válidas como parte da request. (Documentação: https://qitech.com.br/documentation) Detalhes: Falha ao decodificar o token de autenticação",
	"code": "GDF000014"
}
```

## Error in <strong>API_KEY</strong>

If the API_KEY is not sent in the header, the following error will be shown:

STATUS 400

Response Body

```json
{
	"title": "Bad Request",
	"description": "No API Client Key received",
	"translation": "Nenhuma chave de API do cliente recebida",
	"code": "GDF000003"
}
```
 
## Incorrect <strong>API_KEY</strong> 

If the API_KEY sent does not match the API_KEY displayed in the QI Tech front end after key registration, the following response will be returned:

STATUS 404

Response Body

```json
  {
  	"code": "GDF000018",
  	"title": "Not Found",
  	"description": "No ClientIntegration found for api_client_key: {api_client_key}.",
  	"translation": "Nenhuma ClientIntegration encontrada para api_client_key: {api_client_key}."
  }
```

## Unauthorized endpoint

If the accessed endpoint or method is unauthorized, the following error will be returned:

STATUS 401

Response Body

```json
{
	"title": "QI Unauthenticated",
	"description": "Please provide valid credentials as part of the request. (Documentation: https://qitech.com.br/documentation) Details: Endpoint or HTTP method not allowed for the given ClientIntegration (Action: POST /debt)",
	"translation": "Por favor forneça credenciais válidas como parte da request. (Documentação: https://qitech.com.br/documentation) Detalhes: Endpoint ou método HTTP não permitido para a ClientIntegration fornecida (Action: POST /debt)",
	"code": "GDF000014"
}
```

:::caution Attention!

To request access to the endpoint that returned the mentioned error, it is necessary to ask for authorization from the QI Tech support team.:::

---

# Authentication test

URL: /en/documentation/primeiros_passos/teste_de_autenticacao/teste_de_autenticacao_completo

### Overview
This documentation details the process of signing and encrypting headers for secure authentication in requests to our API. The process ensures that requests are reliable and secure, preventing unauthorized access and ensuring data integrity.

:::caution Atenção!

The GET and DELETE methods hash md5 must be generated with an empty payload
:::

**Python**

```python
#Here, we import the necessary libraries throughout the authentication process.
from jose import jwt
import json
from datetime import datetime
from hashlib import md5
import requests

def get_auth_header(endpoint, method, CLIENT_PRIVATE_KEY, API_KEY, request_body=None):

    if request_body is None:
        request_body = {}

    #The date and time object provided must be in UTC and must follow the ISO 8601 international standard ("2023-06-26T19:48:32.759844Z").
    timestamp = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ")

    #We define the JWT encoding algorithm
    jwt_header = {
        "typ": "JWT",
        "alg": "ES512"
    }

    #Build MD5 hash for header signature using the payload
    json_body = json.dumps(request_body)
    md5_hash = md5(json_body.encode()).hexdigest()

    #Define the JWT body
    jwt_body = {
        "payload_md5": md5_hash,
        "timestamp": timestamp,
        "method": method,
        "uri": endpoint
    }

    #Build signed header
    encoded_header_token = jwt.encode(
        claims=jwt_body,
        key=CLIENT_PRIVATE_KEY,
        algorithm="ES512",
        headers=jwt_header
    )

    #Build signed header
    signed_header = {
        "AUTHORIZATION": encoded_header_token,
        "API-CLIENT-KEY": API_KEY
    }

    return signed_header

if __name__ == "__main__":

    #we will use the following variables base_url, endpoint, method and request_body. In this example, we will be conducting a POST in /test.
    #The following keys in this example are fake. Please use your own keys.
    CLIENT_PRIVATE_KEY = "Your Private Key Here"
    API_KEY = "Your API Key Here"

    BASE_URL = "https://api-auth.sandbox.qitech.app"
    METHOD = "POST" #GET ou POST
    REQUEST_BODY = {
        "name": "QI Tech"
    }

    #In order to conduct a GET requisition in /test, it is necessary to insert the API Key into the endpoint, while for a post requisition, it is not.
    if METHOD == 'GET':
        ENDPOINT = f"/test/{API_KEY}"
        signed_header = get_auth_header(ENDPOINT, METHOD, CLIENT_PRIVATE_KEY, API_KEY)
        response = requests.get(f"{BASE_URL}{ENDPOINT}", headers=signed_header)
    else:
        ENDPOINT = f"/test/"
        signed_header = get_auth_header(ENDPOINT, METHOD, CLIENT_PRIVATE_KEY, API_KEY, REQUEST_BODY)
        response = requests.post(f"{BASE_URL}{ENDPOINT}", json=REQUEST_BODY, headers=signed_header)

    print(response.status_code)
    print(response.json())
```

**PHP**

```php
<?php
require __DIR__ . '/vendor/autoload.php';

//Here, we import the necessary libraries throughout the authentication process
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Signature\JWSTokenSupport;
use Jose\Component\Signature\Algorithm\ES512;
use Jose\Component\Signature\Serializer\CompactSerializer;
use Jose\Component\KeyManagement\JWKFactory;
use Jose\Component\Signature\JWSBuilder;

function get_auth_header($endpoint, $method, $privateKeyString, $api_key, $request_body = null) {

    if ($request_body === null) {
        $request_body = (object)[];
    }

    //The date and time object provided must be in UTC and must follow the ISO 8601 international standard ("2023-06-26T19:48:32.759844Z").
    $microtime_float = microtime(true);
    $datetime = new DateTimeImmutable('@' . floor($microtime_float), new DateTimeZone('UTC'));
    $timestamp = $datetime->format('Y-m-d\TH:i:s.') . sprintf('%06d', ($microtime_float - floor($microtime_float)) * 1000000) . 'Z';

    //We define the JWT encoding algorithm
    $header = [
        "typ" => "JWT",
        "alg" => "ES512"
    ];

    //Build MD5 hash for header signature using the payload
    $request_body_json = json_encode($request_body);
    $md5_hash = md5($request_body_json);

    //These are the necessary pieces of information to sign the header
    $payload = [
        "payload_md5" => $md5_hash,
        "timestamp" => $timestamp,
        "method" => $method,
        "uri" => $endpoint
    ];

    // Initialize Algorithm Manager with ES512
    $algorithmManager = new AlgorithmManager([
        new ES512(),
    ]);

    // Inicializar JWS Builder
    $jwsBuilder = new JWSBuilder(
        $algorithmManager,
        new JWSTokenSupport()
    );

    $privateKey = JWKFactory::createFromKey($privateKeyString);

    //Encrypt the header
    $jws = $jwsBuilder
        ->create()
        ->withPayload(json_encode($payload))
        ->addSignature($privateKey, $header)
        ->build();

    $serializer = new CompactSerializer();
    $jwt = $serializer->serialize($jws, 0);

    //Build signed header
    $headers = [
        'Authorization' => $jwt,
        'API-CLIENT-KEY' => $api_key,
    ];

    return $headers;
}

if (php_sapi_name() == 'cli' || (isset($_SERVER['REQUEST_METHOD']) && realpath($_SERVER['SCRIPT_FILENAME']) === __FILE__)) {
    
    //we will use the following variables base_url, endpoint, method and request_body. In this example, we will be conducting a POST in /test.
    //The following keys in this example are fake. Please use your own keys.
    $base_url = "https://api-auth.sandbox.qitech.app";
    $method = "POST"; // HTTP method: "GET" or "POST"

    $request_body = ["name" => "QI Tech"];

    $api_key = "Your API Key Here";
    $privateKeyString = "Your Private Key Here";

    $response = null;

    //In order to conduct a GET requisition in /test, it is necessary to insert the API Key into the endpoint, while for a post requisition, it is not.
    if ($method == 'GET') {
        $endpoint = "/test/" . $api_key;
        $headers = get_auth_header($endpoint, $method, $privateKeyString, $api_key);
        $url = $base_url . $endpoint;
        $response = \WpOrg\Requests\Requests::get($url, $headers);
    } else {
        $endpoint = "/test";
        $headers = get_auth_header($endpoint, $method, $privateKeyString, $api_key, $request_body);
        $url = $base_url . $endpoint;
        $response = \WpOrg\Requests\Requests::post($url, $headers, json_encode($request_body));
    }

    if ($response) {
        echo "HTTP Status Code: " . $response->status_code . "\n";

        $json_response = json_decode($response->body, true);
        if (json_last_error() === JSON_ERROR_NONE) {
            echo "Response JSON:\n";
            print_r($json_response);
        } else {
            echo "Error decoding JSON. Raw Response Text:\n";
            echo $response->body . "\n";

    }
}
?>
```

**Node.js**

```js
//Here, we import the necessary libraries throughout the authentication process
const jwt = require('jsonwebtoken');
const crypto = require('crypto');
const axios = require('axios');

function getAuthHeader(endpoint, method, client_private_key, api_key, request_body = null) {
    if (request_body === null) {
        request_body = {};
    }

    //The date and time object provided must be in UTC and must follow the ISO 8601 international standard ("2023-06-26T19:48:32.759844Z").
    const now = new Date();
    const isoString = now.toISOString();
    const timestamp = isoString.slice(0, -1) + (now.getMilliseconds() * 1000).toString().padStart(6, '0').slice(0, 3) + 'Z';

    //We define the JWT encoding algorithm
    const jwt_header = {
        typ: 'JWT',
        alg: 'ES512'
    };

    //Build MD5 hash for header signature using the payload
    const str_body = JSON.stringify(request_body);
    const md5_hash = crypto.createHash('md5').update(str_body).digest('hex');

    //These are the necessary pieces of information to sign the header
    const jwt_body = {
        payload_md5: md5_hash,
        timestamp: timestamp,
        method: method,
        uri: endpoint
    };

    //Encrypt the header
    const encoded_header_token = jwt.sign(
        jwt_body,
        client_private_key,
        {
            algorithm: 'ES512',
            header: jwt_header
        }
    );

    //Build signed header
    const signed_header = {
        'AUTHORIZATION': encoded_header_token,
        'API-CLIENT-KEY': api_key
    };

    return signed_header;
}

    //we will use the following variables base_url, endpoint, method and request_body. In this example, we will be conducting a POST in /test.
    //The following keys in this example are fake. Please use your own keys.
async function main() {
    const BASE_URL = "https://api-auth.sandbox.qitech.app";
    const METHOD = "POST"; //"POST" ou "GET"

    const REQUEST_BODY = {
        name: "QI Tech"
    };

    const API_KEY = "Your API Key Here";
    const CLIENT_PRIVATE_KEY = "Your Private Key Here";

    let ENDPOINT;
    let url;
    let signed_header;

    try {
    //In order to conduct a GET requisition in /test, it is necessary to insert the API Key into the endpoint, while for a post requisition, it is not.
        if (METHOD === 'GET') {
            ENDPOINT = `/test/${API_KEY}`;
            url = `${BASE_URL}${ENDPOINT}`;
            signed_header = getAuthHeader(ENDPOINT, METHOD, CLIENT_PRIVATE_KEY, API_KEY);

            const response = await axios.get(url, { headers: signed_header });
            console.log("Status Code:", response.status);
            console.log("Response Body:", response.data);

        } else {
            ENDPOINT = "/test";
            url = `${BASE_URL}${ENDPOINT}`; // Corrected string interpolation
            signed_header = getAuthHeader(ENDPOINT, METHOD, CLIENT_PRIVATE_KEY, API_KEY, REQUEST_BODY);

            const response = await axios.post(url, REQUEST_BODY, { headers: signed_header });
            console.log("Status Code:", response.status);
            console.log("Response Body:", response.data);
        }
    } catch (error) {
        if (error.response) {
            console.error("API Error - Status Code:", error.response.status);
            console.error("API Error - Response Data:", error.response.data);
            console.error("API Error - Headers:", error.response.headers);
        } else if (error.request) {
            console.error("Network Error: No response received from server.");
            console.error("Request:", error.request);
        } else {
            console.error("Error setting up request:", error.message);
        }
        console.error("Full Error Object:", error);
    }
}

main();
```

**Java**

```java
// To utilize Java we must create a file called qitech-java-client
// Create a file called pom.xml and paste the end of the code inside
// It will be necessary to create a few folders - create the following path; src > main > java > com > qitech > api e insira seu arquivo java dentro com o nome de QItechApiClient.java
// Add your private key inside the root directory in the same project at your poms level
// To run the code, open your terminal or command prompt, search through your projects root and execute the following comand 
// mvn clean install exec:java

//Here, we import the necessary libraries throughout the authentication process
package com.qitech.api;

import com.google.gson.Gson;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import org.bouncycastle.jce.provider.BouncyCastleProvider;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Security;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.text.SimpleDateFormat;
import java.util.Base64;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
import org.bouncycastle.jce.ECNamedCurveTable;
import org.bouncycastle.jce.spec.ECParameterSpec;
import org.bouncycastle.jce.spec.ECPrivateKeySpec;

public class QItechApiClient {

    public static Map<String, String> getAuthHeader(String endpoint, String method, PrivateKey privateKey, String apiKey, Map<String, Object> requestBody) throws NoSuchAlgorithmException {        
        //O objeto de data e hora informado deve estar em UTC e deve seguir o padrão da norma internacional ISO 8601 ("2023-06-26T19:48:32.759844Z")
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'");
        sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
        String timestamp = sdf.format(new Date());

        //Build MD5 hash for header signature using the payload
        String jsonBody = jsonToString(requestBody);
        String md5Hash = md5Hash(jsonBody);

        //These are the necessary pieces of information to sign the header
        Map<String, Object> jwtBody = new HashMap<>();
        jwtBody.put("payload_md5", md5Hash);
        jwtBody.put("timestamp", timestamp);
        jwtBody.put("method", method);
        jwtBody.put("uri", endpoint);

        //Encrypt the header
        JwtBuilder jwtBuilder = Jwts.builder()
                .setClaims(jwtBody)
                .signWith(privateKey, SignatureAlgorithm.ES512);
        String encodedHeaderToken = jwtBuilder.compact();

        //Build signed header
        Map<String, String> signedHeader = new HashMap<>();
        signedHeader.put("AUTHORIZATION", encodedHeaderToken);
        signedHeader.put("API-CLIENT-KEY", apiKey);

        return signedHeader;
    }

    public static void main(String[] args) {
        Security.addProvider(new BouncyCastleProvider());
        OkHttpClient client = null;

        try {

            //we will use the following variables base_url, endpoint, method and request_body. In this example, we will be conducting a POST in /test.
            //The following keys in this example are fake. Please use your own keys.
            final String BASE_URL = "https://api-auth.sandbox.qitech.app";
            final String PRIVATE_KEY_FILENAME = "private.key";

            final String API_CLIENT_KEY = "Your API Key Here";
            
            final String METHOD = "GET";  //GET ou POST
            final Map<String, Object> REQUEST_BODY = new HashMap<>();
            REQUEST_BODY.put("name", "QI Tech");

            
            String keyFromFile = readKeyFromFile(PRIVATE_KEY_FILENAME);
            PrivateKey privateKey = getPrivateKey(keyFromFile);

            String endpoint;
            Request request;

            //In order to conduct a GET requisition in /test, it is necessary to insert the API Key into the endpoint, while for a post requisition, it is not.

            if ("GET".equalsIgnoreCase(METHOD)) {
                endpoint = "/test/" + API_CLIENT_KEY;

                Map<String, String> headers = getAuthHeader(endpoint, "GET", privateKey, API_CLIENT_KEY, Collections.emptyMap());

                request = new Request.Builder()
                        .url(BASE_URL + endpoint)
                        .headers(okhttp3.Headers.of(headers))
                        .get()
                        .build();

            } else {
                endpoint = "/test";

                Map<String, String> headers = getAuthHeader(endpoint, "POST", privateKey, API_CLIENT_KEY, REQUEST_BODY);

                RequestBody body = RequestBody.create(
                    jsonToString(REQUEST_BODY),
                    MediaType.parse("application/json; charset=utf-8")
                );

                request = new Request.Builder()
                        .url(BASE_URL + endpoint)
                        .headers(okhttp3.Headers.of(headers))
                        .post(body)
                        .build();
            }

            client = new OkHttpClient.Builder()
                    .connectTimeout(30, TimeUnit.SECONDS)
                    .readTimeout(30, TimeUnit.SECONDS)
                    .build();

            System.out.println("--- Sending " + METHOD + " Request ---");
            System.out.println("URL: " + BASE_URL + endpoint);

            try (Response response = client.newCall(request).execute()) {
                System.out.println("\n--- Received Response ---");
                System.out.println("Status Code: " + response.code());
                if (response.body() != null) {
                    System.out.println("Response Body: " + response.body().string());
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (client != null) {
                client.dispatcher().executorService().shutdown();
                client.connectionPool().evictAll();
            }
        }
    }

    // --- Helper Methods ---
    
    private static String readKeyFromFile(String filename) throws IOException {
        String key = new String(Files.readAllBytes(Paths.get(filename)));
        return key.replace("-----BEGIN EC PRIVATE KEY-----", "")
                  .replace("-----END EC PRIVATE KEY-----", "")
                  .replace("-----BEGIN PRIVATE KEY-----", "")
                  .replace("-----END PRIVATE KEY-----", "")
                  .replaceAll("\\s", "");
    }

    private static String jsonToString(Map<String, Object> jsonMap) { return new Gson().toJson(jsonMap); }

    private static String md5Hash(String text) throws NoSuchAlgorithmException {
        MessageDigest md = MessageDigest.getInstance("MD5");
        byte[] array = md.digest(text.getBytes());
        StringBuilder sb = new StringBuilder();
        for (byte b : array) { sb.append(String.format("%02x", b)); }
        return sb.toString();
    }

    private static PrivateKey getPrivateKey(final String encodedPvKey) throws IOException {
        try {
            byte[] derBytes = Base64.getDecoder().decode(encodedPvKey);
            KeyFactory keyFactory = KeyFactory.getInstance("EC", BouncyCastleProvider.PROVIDER_NAME);
            try {
                return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(derBytes));
            } catch (InvalidKeySpecException e) {
                org.bouncycastle.asn1.sec.ECPrivateKey sec1Key = org.bouncycastle.asn1.sec.ECPrivateKey.getInstance(derBytes);
                ECParameterSpec ecParameterSpec = ECNamedCurveTable.getParameterSpec("secp521r1");
                ECPrivateKeySpec privateKeySpec = new ECPrivateKeySpec(sec1Key.getKey(), ecParameterSpec);
                return keyFactory.generatePrivate(privateKeySpec);
            }
        } catch (Exception e) {
            throw new IOException("Failed to parse private key. Key is corrupted or not a valid EC key.", e);
        }
    }
}

////POM File

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.qitech.api</groupId>
    <artifactId>qitech-api-client</artifactId>
    <version>1.0.0</version>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- HTTP Client -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>4.12.0</version>
        </dependency>

        <!-- JSON Web Token (JWT) Handling -->
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>0.12.5</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>0.12.5</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>0.12.5</version>
            <scope>runtime</scope>
        </dependency>

        <!-- Cryptography Provider for ES512 -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk18on</artifactId>
            <version>1.78</version>
        </dependency>

        <!-- JSON Serialization -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.10.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <mainClass>com.qitech.api.QItechApiClient</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

```

**C#**

```c#
//Here, we import the necessary libraries throughout the authentication process.
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using Jose;
using Newtonsoft.Json;

public static class QiTechAuthGenerator {
    public static string GetAuthorizationHeader(
        string endpoint,
        string method,
        string clientPrivateKey,
        object requestBody)
    {
        string privateKeyBase64 = clientPrivateKey 
            .Replace("-----BEGIN EC PRIVATE KEY-----", "")
            .Replace("-----END EC PRIVATE KEY-----", "")
            .Replace("\n", "")
            .Replace("\r", "");

        using var privateKey = ECDsa.Create();
        privateKey.ImportECPrivateKey(Convert.FromBase64String(privateKeyBase64), out _);

        string payloadToHash;

        if (method.ToUpper() == "GET") {
            payloadToHash = "{}";
        }
        else {
            payloadToHash = JsonConvert.SerializeObject(requestBody);
        }
        
        //Calculate to md5hash
        var payloadMd5Hash = CalculateMd5Hash(payloadToHash);

        //These are the necessary pieces of information to sign the header
        var jwtBody = new Dictionary<string, object> {
            { "payload_md5", payloadMd5Hash },
            { "timestamp", timestamp },
            { "method", method },
            { "uri", endpoint }
        };

        //We define the JWT encoding algorithm
        var jwtHeader = new Dictionary<string, object> {
            { "typ", "JWT" },
            { "alg", "ES512" }
        };

        return JWT.Encode(jwtBody, privateKey, JwsAlgorithm.ES512, jwtHeader);
    }

    //Build MD5 hash for header signature using the payload
    private static string CalculateMd5Hash(string input) {
        using (var md5 = MD5.Create()) {
            byte[] inputBytes = Encoding.UTF8.GetBytes(input);
            byte[] hashBytes = md5.ComputeHash(inputBytes);

            var builder = new StringBuilder();
            foreach (var b in hashBytes) {
                builder.Append(b.ToString("x2"));
            }
            return builder.ToString();
        }
    }
}

public class QiTechApiClient {
    private readonly string _baseUrl;
    private readonly string _apiKey;
    private readonly string _clientPrivateKey;

    public QiTechApiClient(string baseUrl, string apiKey, string clientPrivateKey) {
        _baseUrl = baseUrl;
        _apiKey = apiKey;
        _clientPrivateKey = clientPrivateKey;
    }

    //Encrypt the header
    public async Task<string> CallEndpointAsync(string endpoint, string method, object requestBody) {
        var signedHeader = QiTechAuthGenerator.GetAuthorizationHeader(
            endpoint,
            method,
            _clientPrivateKey,
            requestBody
        );

        var url = $"{_baseUrl}{endpoint}";

        //Build signed header
        using (var client = new HttpClient()) {
            client.DefaultRequestHeaders.Add("AUTHORIZATION", signedHeader);
            client.DefaultRequestHeaders.Add("API-CLIENT-KEY", _apiKey);

            HttpResponseMessage httpResponse;

            if (method.ToUpper() == "GET") {
                httpResponse = await client.GetAsync(url);
            }
            else {
                var jsonBody = JsonConvert.SerializeObject(requestBody);
                var content = new StringContent(jsonBody, Encoding.UTF8, "application/json");
                httpResponse = await client.PostAsync(url, content);
            }

            httpResponse.EnsureSuccessStatusCode();

            var responseContent = await httpResponse.Content.ReadAsStringAsync();

            return responseContent;
        }
    }
}

public class Program {
    public static async Task Main() {
        string response = "";
        
        //we will use the following variables base_url, endpoint, method and request_body. In this example, we will be conducting a POST in /test.
        //The following keys in this example are fake. Please use your own keys.
        var baseUrl = "https://api-auth.sandbox.qitech.app";
        var method = "POST";
        var requestBody = new { name = "QI Tech" };
        
        var apiKey = "Your API Key Here";
        var clientPrivateKey = @"Your Private Key Here";

        try {
            var apiClient = new QiTechApiClient(baseUrl, apiKey, clientPrivateKey);

            //In order to conduct a GET requisition in /tst, it is necessary to insert the API Key into the endpoint, while for a post requisition, it is not.
            if (method.ToUpper() == "GET") {
                var endpoint = "/test/" + apiKey;
                response = await apiClient.CallEndpointAsync(endpoint, method, null);
            }
            else {
                var endpoint = "/test";
                response = await apiClient.CallEndpointAsync(endpoint, method, requestBody);
            }

            Console.WriteLine("\nAPI Response:");
            Console.WriteLine(response);
        }
        catch (HttpRequestException ex) {
            Console.WriteLine($"\nHTTP Error: {ex.Message}");
        }
        catch (Exception ex) {
            Console.WriteLine($"\nAn unexpected error occurred: {ex.Message}");
        }
    }
}
```

---

# Authentication test

URL: /en/documentation/primeiros_passos/teste_de_autenticacao/teste_de_autenticacao_v2

# Authentication test

## 1. Introduction and Initial Configuration

### Overview
This documentation details the process of signing and encrypting headers for secure authentication in requests to our API. The process ensures that requests are reliable and secure, preventing unauthorized access and ensuring data integrity.

### Import libraries
Here, we import the necessary libraries throughout the authentication process.


**Python**

```python
import json
import requests
from datetime import datetime, timezone
from hashlib import md5
from jose import jwt
```


**PHP**

```php
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Signature\JWSTokenSupport;
use Jose\Component\Signature\Algorithm\ES512;
use Jose\Component\Signature\Serializer\CompactSerializer;
use Jose\Component\Signature\JWSBuilder;
use Jose\Component\KeyManagement\JWKFactory;
```


**Node.js**

```js
const jose = require('jose');
const jwt = require('jsonwebtoken');
const crypto = require('crypto');
const axios = require('axios');
```


**Java**

```java
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;

import java.io.IOException;
import java.io.StringReader;
import java.security.KeyPair;
import java.security.PrivateKey;
import java.util.Base64;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.bouncycastle.openssl.PEMKeyPair;
import org.bouncycastle.openssl.PEMParser;
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;
```


**C#**

```c#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using Jose;
using Newtonsoft.Json;
```




### Define variables

We will use the variables base_url, endpoint, method, and request_body. In this example, we will make a POST request to the "/test" endpoint.


**Python**

```python
base_url = "https://api-auth.sandbox.qitech.app"
endpoint = "/test"
method = "POST"
request_body = {"name": "QI Tech"}
```
  

**PHP**

```php
$base_url = "https://api-auth.sandbox.qitech.app";
$endpoint = "/test";
$method = "POST";
$request_body = ["name" => "QI Tech"];
```
  

**Node.js**

```js
const base_url = 'https://api-auth.sandbox.qitech.app';
const endpoint = '/test';
const method = 'POST';
const request_body = { name: 'QI Tech' };
```
  

**Java**

```java
private static final String base_url = "https://api-auth.sandbox.qitech.app";
private static final String endpoint = "/test";
private static final String method = "POST";
private static final Map<String, Object> request_body = new HashMap<>();
static {
    request_body.put("name", "QI Tech");
}
```
  

**C#**

```c#
var base_url = "https://api-auth.sandbox.qitech.app";
var endpoint = "/test";
var method = "POST";
var request_body = new { name = "QI Tech" };

```
  


## 2. Data Preparation for Signature

### Insert encryption data

The keys in this example are for demonstration purposes only. Please use your own keys.


**Python**

```python
api_key = "f19c6e62-bd82-4334-9839-020810550c44" 

client_private_key = '''-----BEGIN EC PRIVATE KEY-----
MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv
-----END EC PRIVATE KEY-----'''  
```
  

**PHP**

```php
$api_key = "f19c6e62-bd82-4334-9839-020810550c44"; 

$privateKeyString = "-----BEGIN EC PRIVATE KEY-----
MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv
-----END EC PRIVATE KEY-----"; 
```
  

**Node.js**

```js
const api_key = 'f19c6e62-bd82-4334-9839-020810550c44'; 

const client_private_key = `-----BEGIN EC PRIVATE KEY-----
MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv
-----END EC PRIVATE KEY-----`; 
```
  

**Java**

```java
private static final String clientPrivateKey = "MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv"; 
```
  

**C#**

```c#
var api_key = "f19c6e62-bd82-4334-9839-020810550c44"; 
var client_private_key = @"-----BEGIN EC PRIVATE KEY-----
MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv
-----END EC PRIVATE KEY-----"; 
```
  


### Format date
The date and time object provided must be in UTC and must follow the ISO 8601 international standard ("2023-06-26T19:48:32.759844Z").



**Python**

```python
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.%fZ")
```
  

**PHP**

```php
$timestamp = gmdate('Y-m-d\TH:i:s.u\Z');
```
  

**Node.js**

```js
const timestamp = new Date().toISOString();
```
  

**Java**

```java
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'");
String formattedDate = sdf.format(now);
```
  

**C#**

```c#
var timestamp = datetime.now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
```
  


### Define JWT header
We define the JWT encoding algorithm


**Python**

```python
jwt_header = {
    "typ": "JWT",
    "alg": "ES512"
}
```
  

**PHP**

```php
$header = [
    "typ" => "JWT",
    "alg" => "ES512"
];
```
  

**Node.js**

```js
const jwt_header = {
  typ: 'JWT',
  alg: 'ES512'
};
```
  

**Java**

```java
// Não é necessário
```
  

**C#**

```c#
var jwt_header = new Dictionary<string, object>
{ 
  { "typ", "JWT" },
  { "alg", "ES512" }
};
```
  


### Build MD5 hash for JSON header signature

Build MD5 hash for header signature using the payload


**Python**

```python
json_body = json.dumps(request_body)
md5_hash = md5(json_body.encode()).hexdigest()
```
  

**PHP**

```php
$request_body_json = json_encode($request_body);
$md5_hash = md5($request_body_json);
```
  

**Node.js**

```js
const str_body = JSON.stringify(request_body);
const md5_hash = crypto.createHash('md5').update(str_body).digest('hex');
```
  

**Java**

```java
String payloadMd5 = md5Hash(jsonToString(request_body));

...

private static String jsonToString(Map<String, Object> jsonMap) {
    return new com.google.gson.Gson().toJson(jsonMap);
}

...

private static String md5Hash(String text) {
    try {
        java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
        byte[] array = md.digest(text.getBytes());
        StringBuilder sb = new StringBuilder();
        for (byte b : array) {
            sb.append(String.format("%02x", b));
        }
        return sb.toString();
    } catch (java.security.NoSuchAlgorithmException e) {
        return null;
    }
}
```
  

**C#**

```c#
var json_body = JsonConvert.SerializeObject(request_body);
var md5_hash = CalculateMD5Hash(json_body);


.

static string CalculateMD5Hash(string input)
{
    using (MD5 md5 = MD5.Create())
    {
        byte[] inputBytes = Encoding.UTF8.GetBytes(input);
        byte[] hashBytes = md5.ComputeHash(inputBytes);

        StringBuilder builder = new StringBuilder();

        for (int i = 0; i < hashBytes.Length; i++)
        {
            builder.Append(hashBytes[i].ToString("x2"));
        }

        return builder.ToString();
    }
}
```
  


:::caution Attention!

The MD5 hash for GET and DELETE requests must be generated with an empty payload
:::


### Build an MD5 hash for the header signature File

Build an MD5 hash for the header signature using a file


**Python**

```python
md5_instance = md5()
for chunk in iter(lambda: file.read(4096), b""):
    md5_instance.update(chunk)

file.seek(0)
md5_hash = md5_instance.hexdigest()
```


**PHP**

```php
$md5_instance = md5_file($file);
$md5_hash = hash_file('md5', $file);
```


**Node.js**

```js
const md5_instance = crypto.createHash('md5');
const readStream = fs.createReadStream(file);

readStream.on('data', (chunk) => {
  md5_instance.update(chunk);
});

readStream.on('end', () => {
  const md5_hash = md5_instance.digest('hex');
  file.seek(0);
```


**Java**

```java
MessageDigest md5_instance = MessageDigest.getInstance("MD5");
byte[] buffer = new byte[4096];
int bytesRead;

try (InputStream inputStream = new FileInputStream(file)) {
    while ((bytesRead = inputStream.read(buffer)) != -1) {
        md5_instance.update(buffer, 0, bytesRead);
    }
}

byte[] md5_hashBytes = md5_instance.digest();
StringBuilder md5_hashBuilder = new StringBuilder();

for (byte b : md5_hashBytes) {
    md5_hashBuilder.append(String.format("%02x", b));
}

String md5_hash = md5_hashBuilder.toString();
```


**C#**

```c#
using (var md5_instance = MD5.Create())
{
    using (var stream = File.OpenRead(file))
    {
        byte[] hash = md5_instance.ComputeHash(stream);
        string md5_hash = BitConverter.ToString(hash).Replace("-", "").ToLower();
        stream.Seek(0, SeekOrigin.Begin);
    }
}
```



### Define the JWT body

These are the necessary pieces of information to sign the header


**Python**

```python
jwt_body = {
    "payload_md5": md5_hash,
    "timestamp": timestamp,
    "method": method,
    "uri": endpoint
}
```
  

**PHP**

```php
$payload = [
    "payload_md5" => $md5_hash,
    "timestamp" => $timestamp,
    "method" => $method,
    "uri" => $endpoint
];
```
  

**Node.js**

```js
const jwt_body = {
  payload_md5: md5_hash,
  timestamp: timestamp,
  method: method,
  uri: endpoint
};
```
  

**Java**

```java
Map<String, Object> jwt_body = new HashMap<>();
jwt_body.put("payload_md5", payloadMd5);
jwt_body.put("timestamp", formattedDate);
jwt_body.put("method", method);
jwt_body.put("uri", endpoint);
```
  

**C#**

```c#
// Ajuste: Remover espaços e quebras de linha no meio da chave privada
client_private_key = client_private_key.Replace("-----BEGIN EC PRIVATE KEY-----", "")
                                       .Replace("-----END EC PRIVATE KEY-----", "")
                                       .Replace("\n", "")
                                       .Replace("\r", "");
// Converter a chave privada para ECDsa
using (ECDsa ecdsa = ECDsa.Create())
{
  ecdsa.ImportECPrivateKey(Convert.FromBase64String(client_private_key), out _);
  var jwt_body = new Dictionary<string, object>
    {
      { "payload_md5", md5_hash },
      { "timestamp", timestamp },
      { "method", method },
      { "uri", endpoint }
    };
```
  


### Encrypt the header


**Python**

```python
encoded_header_token = jwt.encode(
    claims=jwt_body,
    key=client_private_key,
    algorithm="ES512",
    headers=jwt_header
)
```
  

**PHP**

```php
$jws = $jwsBuilder
    ->create()
    ->withPayload(json_encode($payload))
    ->addSignature($privateKey, $header)
    ->build();
$serializer = new CompactSerializer();
$jwt = $serializer->serialize($jws, 0);
```
  

**Node.js**

```js
const encoded_header_token = jwt.sign(
  jwt_body,
  client_private_key,
  {
    algorithm: 'ES512',
    header: jwt_header
  }
);
```
  

**Java**

```java
PrivateKey privateKey = getPrivateKey(clientPrivateKey);
JwtBuilder jwtBuilder = Jwts.builder().setClaims(jwt_body).signWith(privateKey, SignatureAlgorithm.ES512);
String encodedHeaderToken = jwtBuilder.compact();

...

public static PrivateKey getPrivateKey(final String encodedPvKey) {
    try {
        final String pvKey = new String(Base64.getDecoder().decode(encodedPvKey));
        PEMParser pemParser = new PEMParser(new StringReader(pvKey));
        PEMKeyPair pemKeyPair = (PEMKeyPair) pemParser.readObject();

        JcaPEMKeyConverter converter = new JcaPEMKeyConverter();
        KeyPair kp = converter.getKeyPair(pemKeyPair);
        pemParser.close();

        return kp.getPrivate();
    } catch (IOException e) {
        throw new RuntimeException("Couldn't load private key");
    }
}
```
  

**C#**

```c#
var encoded_header_token = JWT.Encode(jwt_body, ecdsa, JwsAlgorithm.ES512, jwt_header);
```
  


### Build signed header


**Python**

```python
signed_header = {
    "AUTHORIZATION": encoded_header_token,
    "API-CLIENT-KEY": api_key
}
```
  

**PHP**

```php
$headers = [
    'Authorization' => $jwt,
    'API-CLIENT-KEY' => $api_key,
];
```
  

**Node.js**

```js
const signed_header = {
  AUTHORIZATION: encoded_header_token,
  'API-CLIENT-KEY': api_key
};
```
  

**Java**

```java
Map<String, String> headers = new HashMap<>();
headers.put("AUTHORIZATION", encodedHeaderToken);
headers.put("API-CLIENT-KEY", api_key);
```
  

**C#**

```c#
using (var client = new HttpClient())
    client.DefaultRequestHeaders.Clear();
    client.DefaultRequestHeaders.Add("AUTHORIZATION", encoded_header_token);
    client.DefaultRequestHeaders.Add("API-CLIENT-KEY", api_key);
```
  


### Build the request URL


**Python**

```python
url = f"{base_url}{endpoint}"
```
  

**PHP**

```php
$url = $base_url . $endpoint;
```
  

**Node.js**

```js
const url = `${base_url}${endpoint}`;
```
  

**Java**

```java
String requestUrl = base_url + endpoint;
```
  

**C#**

```c#
var url = $"{base_url}{endpoint}";
```
  


## 3. Make the Request


**Python**

```python
post_test_response = requests.post(url=url, headers=signed_header, json=request_body)
```
  

**PHP**

```php
$response = \WpOrg\Requests\Requests::post($url, $headers, json_encode($request_body));
```
  

**Node.js**

```js
axios
  .post(url, request_body, { headers: signed_header })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });
```
  

**Java**

```java
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
okhttp3.RequestBody requestBody = RequestBody.create(mediaType, jsonToString(request_body));
Request request = new Request.Builder().url(requestUrl).headers(okhttp3.Headers.of(headers))
        .method(method, requestBody).build();
Response response = client.newCall(request).execute();

System.out.println(response.body().string());
```
  

**C#**

```c#
var content = new StringContent(json_body, Encoding.UTF8, "application/json");
var post_test_response = client.PostAsync(url, content).Result;
```

---

# Webhook

URL: /en/documentation/primeiros_passos/teste_de_autenticacao/webhook_v2

# Webhook

## 1. Introduction and Preparation

### Overview and Importance
This section covers how QI Tech sends webhooks with signed headers, highlighting the importance of decrypting and validating these headers to ensure secure communication.

### Request Format
Webhook requests will be sent to the [ URL configured for receiving webhooks. ](/documentation/primeiros_passos/configurando_webhooks). They have a specific format for headers and body, which is detailed below.

ENDPOINT URL configurada para recebimento dos webhooks
METHOD POST

Request Headers

```json
{
    "AUTHORIZATION": "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkX21kNSI6IjRhNjAzZjBmMGU3ZGRkZTlkYTJhMGFkM2QzNDFmNzRiIiwidGltZXN0YW1wIjoiMjAyMy0wNi0zMFQxODo1MjoyNy44ODU3MzFaIiwibWV0aG9kIjoiUE9TVCIsInVyaSI6Ii90ZXN0In0.AcNiJqXDdVmlXSbPI6bH41n0KXz9JwVVMgo4Ivqsq5UZjM2WBOTWw3aAvIMAAhjK5OdrURD4cX3dbbnRgzxspUckANRt0hVHRKSkhROHBfZxuTXVfv8oYzwghwiO2MatPBsroC9Vxbh-DEVQJIBigtN9_D5bg8p2-mlVvoxou2I-EwZs",
    "API-CLIENT-KEY": "20d6a816-9d21-4e29-bbe5-2ffb3baacfe9"
}
```

Request Body

```json
{
    "body_sample": "Exemplo de webhook"
}
```

## 2. Configuration and Decryption

### Import libraries

Before starting the decryption and validation of webhooks, it is essential to import the necessary libraries in your preferred programming language. These libraries will facilitate working with JWTs, encryption, and other related aspects.


**Python**

```python
import json
from datetime import datetime, timedelta
from hashlib import md5
from jose import jwt
```


**PHP**

```php
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Signature\Algorithm\ES512;
use Jose\Component\Signature\JWSVerifier;
use Jose\Component\KeyManagement\JWKFactory;
use Jose\Component\Signature\Serializer\JWSSerializerManager;
use Jose\Component\Signature\Serializer\CompactSerializer;
```


**Node.js**

```js
const jwt = require('jsonwebtoken');
const crypto = require('crypto');
```


**Java**

```java
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.util.io.pem.PemReader;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.Security;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
```


**C#**

```c#
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using Newtonsoft.Json;
using Jose;
```



### Define variables

Define the necessary variables to handle the headers and body of the webhook. This includes the public key provided by QI Tech, used to decrypt and validate the webhook.


**Python**

```python
headers = {
    "AUTHORIZATION": "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkX21kNSI6IjRhNjAzZjBmMGU3ZGRkZTlkYTJhMGFkM2QzNDFmNzRiIiwidGltZXN0YW1wIjoiMjAyMy0wNi0zMFQxODo1MjoyNy44ODU3MzFaIiwibWV0aG9kIjoiUE9TVCIsInVyaSI6Ii90ZXN0In0.AcNiJqXDdVmlXSbPI6bH41n0KXz9JwVVMgo4Ivqsq5UZjM2WBOTWw3aAvIMAAhjK5OdrURD4cX3dbbnRgzxspUckANRt0hVHRKSkhROHBfZxuTXVfv8oYzwghwiO2MatPBsroC9Vxbh-DEVQJIBigtN9_D5bg8p2-mlVvoxou2I-EwZs",
    "API-CLIENT-KEY": "20d6a816-9d21-4e29-bbe5-2ffb3baacfe9",
}
body = {"body_sample": "Exemplo de webhook"}
authorization = headers.get("AUTHORIZATION")
```


**PHP**

```php
$headers = [
    "AUTHORIZATION" => "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkX21kNSI6IjRhNjAzZjBmMGU3ZGRkZTlkYTJhMGFkM2QzNDFmNzRiIiwidGltZXN0YW1wIjoiMjAyMy0wNi0zMFQxODo1MjoyNy44ODU3MzFaIiwibWV0aG9kIjoiUE9TVCIsInVyaSI6Ii90ZXN0In0.AcNiJqXDdVmlXSbPI6bH41n0KXz9JwVVMgo4Ivqsq5UZjM2WBOTWw3aAvIMAAhjK5OdrURD4cX3dbbnRgzxspUckANRt0hVHRKSkhROHBfZxuTXVfv8oYzwghwiO2MatPBsroC9Vxbh-DEVQJIBigtN9_D5bg8p2-mlVvoxou2I-EwZs",
    "API-CLIENT-KEY" => "20d6a816-9d21-4e29-bbe5-2ffb3baacfe9",
];
$body = ["body_sample" => "Exemplo de webhook"];
$authorization = $headers["AUTHORIZATION"];
```


**Node.js**

```js
const headers = {
  AUTHORIZATION: 'eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkX21kNSI6IjRhNjAzZjBmMGU3ZGRkZTlkYTJhMGFkM2QzNDFmNzRiIiwidGltZXN0YW1wIjoiMjAyMy0wNi0zMFQxODo1MjoyNy44ODU3MzFaIiwibWV0aG9kIjoiUE9TVCIsInVyaSI6Ii90ZXN0In0.AcNiJqXDdVmlXSbPI6bH41n0KXz9JwVVMgo4Ivqsq5UZjM2WBOTWw3aAvIMAAhjK5OdrURD4cX3dbbnRgzxspUckANRt0hVHRKSkhROHBfZxuTXVfv8oYzwghwiO2MatPBsroC9Vxbh-DEVQJIBigtN9_D5bg8p2-mlVvoxou2I-EwZs',
  'API-CLIENT-KEY': '20d6a816-9d21-4e29-bbe5-2ffb3baacfe9'
};
const body = { body_sample: 'Exemplo de webhook' };
```


**Java**

```java
String authorization = "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkX21kNSI6IjRhNjAzZjBmMGU3ZGRkZTlkYTJhMGFkM2QzNDFmNzRiIiwidGltZXN0YW1wIjoiMjAyMy0wNi0zMFQxODo1MjoyNy44ODU3MzFaIiwibWV0aG9kIjoiUE9TVCIsInVyaSI6Ii90ZXN0In0.AcNiJqXDdVmlXSbPI6bH41n0KXz9JwVVMgo4Ivqsq5UZjM2WBOTWw3aAvIMAAhjK5OdrURD4cX3dbbnRgzxspUckANRt0hVHRKSkhROHBfZxuTXVfv8oYzwghwiO2MatPBsroC9Vxbh-DEVQJIBigtN9_D5bg8p2-mlVvoxou2I-EwZs";
```


**C#**

```c#
var headers = new Dictionary<string, string>()
{
    { "AUTHORIZATION", "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkX21kNSI6IjRhNjAzZjBmMGU3ZGRkZTlkYTJhMGFkM2QzNDFmNzRiIiwidGltZXN0YW1wIjoiMjAyMy0wNi0zMFQxODo1MjoyNy44ODU3MzFaIiwibWV0aG9kIjoiUE9TVCIsInVyaSI6Ii90ZXN0In0.AcNiJqXDdVmlXSbPI6bH41n0KXz9JwVVMgo4Ivqsq5UZjM2WBOTWw3aAvIMAAhjK5OdrURD4cX3dbbnRgzxspUckANRt0hVHRKSkhROHBfZxuTXVfv8oYzwghwiO2MatPBsroC9Vxbh-DEVQJIBigtN9_D5bg8p2-mlVvoxou2I-EwZs" },
    { "API-CLIENT-KEY", "20d6a816-9d21-4e29-bbe5-2ffb3baacfe9" }
};

var body = new Dictionary<string, string>()
{
    { "body_sample", "Exemplo de webhook" }
};
```




### 2. Insertion of Encryption Data and Performing Decryption
We insert the public key provided by QI Tech and perform the decryption of the webhook header. This key is crucial for decrypting the webhook headers.


**Python**

```python
qi_public_key = """-----BEGIN PUBLIC KEY-----
{QI_PUBLIC_KEY}
-----END PUBLIC KEY-----"""
```


**PHP**

```php
$qiPublicKey = "-----BEGIN PUBLIC KEY-----
{QI_PUBLIC_KEY}
-----END PUBLIC KEY-----";
```


**Node.js**

```js
const qiPublicKey = `-----BEGIN PUBLIC KEY-----
{QI_PUBLIC_KEY}
-----END PUBLIC KEY-----`;
```


**Java**

```java
String publicKeyStr = "{QI_PUBLIC_KEY}";
```


**C#**

```c#
var authorization = headers["AUTHORIZATION"];

var qiPublicKey = @"-----BEGIN PUBLIC KEY-----
{QI_PUBLIC_KEY}
-----END PUBLIC KEY-----";
```



### Decrypt the header

The decryption process is essential to verify the authenticity and integrity of the received webhook.


**Python**

```python
try:
    decoded_header = jwt.decode(token=authorization, key=qi_public_key)
except:
    raise Exception("Decodification failed.")
```


**PHP**

```php
$algorithmManager = new AlgorithmManager([new ES512()]);
$jwsVerifier = new JWSVerifier($algorithmManager);
$publicKey = JWKFactory::createFromKey($qiPublicKey, null, ['use' => 'sig']);
$serializerManager = new JWSSerializerManager([new CompactSerializer]);
$jws = $serializerManager->unserialize($authorization);
$decodedHeader = json_decode($jws->getPayload(), true);
```


**Node.js**

```js
const decodedHeader = jwt.verify(authorization, qiPublicKey);
```


**Java**

```java
private static Claims validate(final String encodedBody, String publicKeyStr){
    try {
        Security.addProvider(new BouncyCastleProvider());

        final String pbKey = new String(Base64.getDecoder().decode(publicKeyStr));
        Reader rdr = new StringReader(pbKey);
        PemReader pemParser = new PemReader(rdr);

        X509EncodedKeySpec spec = new X509EncodedKeySpec(pemParser.readPemObject().getContent());
        KeyFactory kf = KeyFactory.getInstance("EC");

        PublicKey publicKey = kf.generatePublic(spec);
        return Jwts.parser().setSigningKey(publicKey).parseClaimsJws(encodedBody).getBody();
    }  catch (IOException | NoSuchAlgorithmException | InvalidKeySpecException e) {
        throw new IllegalStateException(e);
    }
}
```


**C#**

```c#
var key = ECDsa.Create();
key.ImportFromPem(qiPublicKey);
var decodedHeader = JWT.Decode<IDictionary<string, string>>(authorization, key);
```



## 3. Validation and Conclusion

### Performing Validations

After decrypting the header, it is important to perform various validations to ensure that the webhook is valid and secure.


**Python**

```python
assert decoded_header.get("method") == "POST"
assert decoded_header.get("uri") == "/client_webhook_endpoint"
assert (
    decoded_header.get("payload_md5")
    == md5(json.dumps(body).encode()).hexdigest()
)
assert (
    (datetime.now() - timedelta(minutes=5))
    < datetime.strptime(decoded_header.get("timestamp"), "%Y-%m-%dT%H:%M:%S.%fZ")
    < (datetime.now() + timedelta(minutes=5))
)
```


**PHP**

```php
$method = $decodedHeader["method"];
$uri = $decodedHeader["uri"];
$payloadMd5 = $decodedHeader["payload_md5"];
$timestamp = $decodedHeader["timestamp"];

assert($method === "POST");
assert($uri === "/client_webhook_endpoint");
assert($payloadMd5 === md5(json_encode($body, JSON_UNESCAPED_SLASHES)));
assert(
    (new DateTime("now", new DateTimeZone("UTC")))->sub(new DateInterval("PT5M")) < DateTime::createFromFormat("Y-m-d\TH:i:s.u\Z", $timestamp) &&
    DateTime::createFromFormat("Y-m-d\TH:i:s.u\Z", $timestamp) < (new DateTime("now", new DateTimeZone("UTC")))->add(new DateInterval("PT5M"))
);
```


**Node.js**

```js
if (decodedHeader.method !== 'POST') {
    throw new Error('Invalid method');
  }
  
  if (decodedHeader.uri !== '/client_webhook_endpoint') {
    throw new Error('Invalid URI');
  }
  
  const payloadMd5 = crypto
    .createHash('md5')
    .update(JSON.stringify(body))
    .digest('hex');
    
  if (decodedHeader.payload_md5 !== payloadMd5) {
    throw new Error('Invalid payload MD5');
  }
  
  const timestamp = new Date(decodedHeader.timestamp);
  const currentDateTime = new Date();
  
  const fiveMinutesAgo = new Date(currentDateTime.getTime() - 5 * 60000);
  const fiveMinutesAhead = new Date(currentDateTime.getTime() + 5 * 60000);
  
  if (!(timestamp > fiveMinutesAgo && timestamp < fiveMinutesAhead)) {
    throw new Error('Invalid timestamp');
  }
```


**Java**

```java
Claims result = validate(authorization, publicKeyStr);
System.out.println(result);
System.out.println(result.get("method").equals("POST"));
System.out.println(result.get("uri").equals("/test"));
```


**C#**

```c#
var method = decodedHeader["method"];
var uri = decodedHeader["uri"];
var payloadMd5 = decodedHeader["payload_md5"];
var timestamp = DateTime.Parse(decodedHeader["timestamp"]);
timestamp = timestamp.ToUniversalTime();
var bodyJson = JsonConvert.SerializeObject(body, new JsonSerializerSettings
{
    NullValueHandling = NullValueHandling.Ignore,
    Formatting = Formatting.None
});

using (var md5Hash = MD5.Create())
{
    var calculatedMd5 = GetMd5Hash(md5Hash, bodyJson);
    if (payloadMd5 != calculatedMd5)
    {
        throw new Exception("Payload MD5 verification failed.");
    }
}

var currentTime = datetime.now;
var validTimeStart = currentTime.AddMinutes(-5);
var validTimeEnd = currentTime.AddMinutes(5);
if (timestamp < validTimeStart || timestamp > validTimeEnd)
{
    throw new Exception("Timestamp verification failed.");
}

...

static string GetMd5Hash(MD5 md5Hash, string input)
{
    byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));

    StringBuilder builder = new StringBuilder();
    for (int i = 0; i < data.Length; i++)
    {
        builder.Append(data[i].ToString("x2"));
    }

    return builder.ToString();
}
```

---

# Key Exchange

URL: /en/documentation/primeiros_passos/troca_de_chaves

## Key pair generation (public and private)

**Unix**

To generate your private key on a **Unix** computer, run in your terminal or command line:

```bash
$ ssh-keygen -t ecdsa -b 521 -m PEM -f jwtECDSASHA512.key
```

And from this private key, generate your public key.

```bash
$ openssl ec -in jwtECDSASHA512.key -pubout -outform PEM -out jwtECDSASHA512.key.pub
```

**Mac OS**

To generate your private key on a **Mac OS** computer, run in your terminal:

```bash
openssl ecparam -name secp521r1 -genkey -noout -out ec512-private.pem
```

And from this private key, generate your public key.

```bash
openssl ec -in ec512-private.pem -pubout -out ec512-public.pem
```

**Windows**

To generate your key pair (private and public) on a **Windows** computer, you will need the `ssh-keygen` and `openssl` tools in PowerShell or GitBash.

Run the command below to create your private key file (`jwtECDSASHA512.key`).

```bash
ssh-keygen -t ecdsa -b 521 -m PEM -f jwtECDSASHA512.key
```

And from this private key, generate your public key (`jwtECDSASHA512.key.pub`).

```bash
openssl ec -in jwtECDSASHA512.key -pubout -outform PEM -out jwtECDSASHA512.key.pub
```

To view the key in notepad:

```bash
notepad jwtECDSASHA512.key.pub
```

To view the key in the terminal:

```bash
cat jwtECDSASHA512.key.pub
```

If you add an encryption password to your private key and want to view it, you will need to decrypt it with the command below and your password:

```bash
openssl ec -in jwtECDSASHA512.key -out chave_descriptografada.pem
```

---

# Consulta de valor presente de uma operação

URL: /en/documentation/refinanciamento/consulta_de_valor_presente_de_uma_operacao

Para descobrir o valor presente que será utilizado no refinanciamento de uma operação, é possível utilizar o endpoint de consulta de dívidas indicando 4 query params chave listados abaixo.

## Request

ENDPOINT /debt
MÉTODO GET

## Query Params
| Campo | Tipo | Descrição | Caracteres |
|---|---| ---| ---|
| `key` * | string | Chave da dívida devolvida no momento da criação da operação de crédito. | - |
| `eval_present_value` * | string | Indica que o valor atual de cada parcela deve ser calculado e mostrado. | - |
| `calculate_delay` * | string | Indica que, se a parcela estiver vencida, os juros de mora e multa devem ser calculados com o valor presente. | - |
| `calculate_spread` * | booleano | Indica se o valor de spread da operação deve ser adicionado ao valor presente (para operações de refinanciamento deve ser falso). | - |

## Response

STATUS 200

Response Body

```json
{
	"data": {
		"additional_iof": 11.547136,
		"after_disbursement_actions": [],
		"all_day_disbursement": true,
		"annual_cet": 41.0883,
		"assigned": false,
		"assigned_at": null,
		"assignment_amount": 3038.72,
		"attached_document_list": [{
			"created_at": "2022-10-19T11:53:01",
			"document_key": "5df59dca-b8d1-4dca-8358-8b4bd944f3dc",
			"document_type": {
				"enumerator": "document_identification",
				"translation_path": "co.DocumentType.document_identification"
			},
			"document_url": "https://storage.googleapis.com/sandbox-doc-api/documents/5df59dca-b8d1-4dca-8358-8b4bd944f3dc/image_1666180300436.jpg",
			"related_party_key": null,
			"signature_required": false,
			"signature_url": null,
			"signed": false
		}],
		"balance_due": 3150.62,
		"base_iof": 27.17569413,
		"calculus_correction": null,
		"central_depository": null,
		"cet": 2.91,
		"cetip_assignments": [],
		"cetip_settlements": [],
		"collateral_constituted": true,
		"collateral_type": null,
		"collaterals": [],
		"contract_fee_amount": 0,
		"contract_fees": [],
		"contract_number": "TESTE118261",
		"created_at": "2022-10-19T11:53:00",
		"credit_operation_key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
		"credit_operation_status": {
			"enumerator": "opened",
			"translation_path": "co.CreditOperationStatus.opened",
			"translation_ptbr": "Desembolsada"
		},
		"credit_operation_type": {
			"enumerator": "ccb",
			"translation_path": "co.CreditOperationType.ccb"
		},
		"credit_rating": null,
		"creditor_bank_account_key": "5d068423-6094-49e4-b15b-7740038295a8",
		"custodian": {
			"enumerator": "qi_scd",
			"translation_path": "co.Custodian.qi_scd"
		},
		"decimal_annual_cet": 0.43241941956989105,
		"decimal_cet": 0.0304,
		"disburse_before_assign": true,
		"disbursed_at": "2022-10-19T11:54:47",
		"disbursed_issue_amount": 3000,
		"disbursement_account": [{
			"account_branch": "1234",
			"account_digit": "1",
			"account_number": "2345678601",
			"account_type": "checking_account",
			"amount_receivable": null,
			"created_at": "2022-10-19T11:53:01",
			"digitable_line": null,
			"disbursement_type": "pix",
			"document_number": "92147661180",
			"financial_institutions": {
				"code_number": 104,
				"is_active": true,
				"is_pix_participant": true,
				"ispb": 360305,
				"name": "CAIXA ECONOMICA FEDERAL"
			},
			"financial_institutions_code_number": 104,
			"is_pix_disbursement": true,
			"ispb": "00360305",
			"name": "104 CAIXA ECONOMICA FEDERAL",
			"percentage_receivable": 100,
			"pix_key": null,
			"pix_transfer_key": "da80477f-412e-40a5-81b0-c830b238081e",
			"pix_type": "manual",
			"qr_code_key": null,
			"retry_counter": 0,
			"retry_vector": null,
			"transaction_key": null,
			"webhook_key": null
		}],
		"disbursement_callback": {
			"installments": [{
				"bank_slip_key": "9d8c566a-c865-495e-8764-db8351e7ac41",
				"digitable_line": "32990001031000699925348000000207991730000055231",
				"due_date": "2022-11-18",
				"qr_code_key": "bdd41d56-8588-4468-9705-5233994cdc39",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/bdd41d56-8588-4468-9705-5233994cdc395204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63044F44"
			}],
			"key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
			"origin_type": "lego-api",
			"status": "opened",
			"transaction_receipts": [{
				"amount": 3000,
				"description": "00360305 1234 2345678601-1 92147661180 - 104 CAIXA ECONOMICA FEDERAL",
				"destination": {
					"account_digit": "1",
					"account_number": "2345678601",
					"bank_ispb": "00360305",
					"branch": "1234",
					"branch_digit": null,
					"document": "92147661180",
					"name": "104 CAIXA ECONOMICA FEDERAL",
					"purpose": "Crédito PIX em Conta",
					"type": "checking_account"
				},
				"fee": 0,
				"origin": {
					"account_branch": "0001",
					"account_digit": "5",
					"account_key": "5d068423-6094-49e4-b15b-7740038295a8",
					"account_number": "00002",
					"bank_code": "329",
					"branch": "0001",
					"branch_digit": null,
					"document": "32402502000135",
					"name": "QI SOCIEDADE DE CRÉDITO DIRETO S.A.",
					"type": "payment_account"
				},
				"origin_transaction_key": null,
				"timestamp": "2022-10-19T11:55:03",
				"transaction_key": "da80477f-412e-40a5-81b0-c830b238081e"
			}]
		},
		"disbursement_confirmed_at": "2022-10-20T13:00:56",
		"disbursement_date": "2022-10-19",
		"disbursement_end_date": "2022-10-19",
		"disbursement_inelegibility_reason": null,
		"disbursement_inelegibility_reason_issued": null,
		"disbursement_options": [{
			"additional_iof": 11.547136,
			"annual_cet": 41.0883,
			"assignment_amount": 3038.72,
			"base_iof": 27.17569413,
			"calculus_correction": null,
			"cet": 2.91,
			"contract_fee_amount": 0,
			"contract_fees": [],
			"created_at": "2022-10-19T11:53:01",
			"disbursed_issue_amount": 3000,
			"disbursement_date": "2022-10-19",
			"external_contract_fee_amount": 0,
			"external_contract_fees": [],
			"first_due_date": "2022-11-18",
			"installments": [{
				"additional_costs": [],
				"business_due_date": "2022-11-21",
				"calendar_days": 30,
				"created_at": "2022-10-19T11:53:01",
				"due_date": "2022-11-18",
				"due_interest": 0,
				"due_principal": 3038.72,
				"fine_amount": null,
				"has_interest": true,
				"installment_number": 1,
				"post_fixed_amount": 0,
				"pre_fixed_amount": 75.66402982,
				"principal_amortization_amount": 476.64597018,
				"tax_amount": 1.17254909,
				"total_amount": 552.31,
				"workdays": 20
			}],
			"interest_subsidy_amount": 0,
			"issue_amount": 3038.72,
			"net_external_contract_fee_amount": 0,
			"prefixed_interest_rate": null,
			"share_quantity": 4,
			"total_iof": 38.72
		}],
		"disbursement_start_date": "2022-10-19",
		"document_certifier": {
			"enumerator": "electronic_client_side",
			"translation_path": "co.DocumentCertifier.electronic_client_side"
		},
		"early_settlement_configuration": {
			"created_at": "2022-10-19T11:53:00",
			"early_settlement_configuration_type": {
				"enumerator": "fixed_rate",
				"translation_path": "co.EarlySettlementConfigurationType.fixed_rate"
			},
			"effective_end_date": null,
			"fixed_interest_rate": 0
		},
		"endorsement": null,
		"entry": null,
		"events": [],
		"external_contract_fee_amount": 0,
		"external_contract_fees": [],
		"extra_fields": null,
		"facial_biometrics_enabled": false,
		"final_disbursement_amount": 3000,
		"financial_index": null,
		"fine_configuration": {
			"contract_fine_rate": 0.02,
			"created_at": "2022-10-19T11:53:00",
			"fine_delay_rate": {
				"annual_rate": 0.12682503,
				"created_at": "2022-10-19T11:53:00",
				"daily_rate": 0.00033173,
				"interest_base": {
					"enumerator": "calendar_days",
					"translation_path": "co.InterestBase.calendar_days",
					"year_days": 360
				},
				"monthly_rate": 0.01
			}
		},
		"first_due_date": "2022-11-18",
		"first_due_date_delay": null,
		"if_code": null,
		"installments": [{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0,
				"bank_slip_key": "9d8c566a-c865-495e-8764-db8351e7ac41",
				"business_due_date": "2022-11-21",
				"calendar_days": 30,
				"cetip_settlements": [],
				"created_at": "2022-10-19T11:53:00",
				"digitable_line": "32990001031000699925348000000207991730000055231",
				"due_date": "2022-11-18",
				"due_interest": 0,
				"due_principal": 3038.72,
				"events": [{
						"amount": null,
						"created_at": "2022-10-19T11:54:47",
						"event_date": "2022-10-19T11:54:47",
						"installment_event_type": {
							"enumerator": "open",
							"translation_path": "co.InstallmentEventType.open"
						},
						"installment_old_status": {
							"enumerator": "created",
							"translation_path": "co.InstallmentStatus.created"
						},
						"old_due_date": null
					},
					{
						"amount": null,
						"created_at": "2022-11-18T08:00:10",
						"event_date": "2022-11-18T08:00:10",
						"installment_event_type": {
							"enumerator": "maturity",
							"translation_path": "co.InstallmentEventType.maturity"
						},
						"installment_old_status": {
							"enumerator": "opened",
							"translation_path": "co.InstallmentStatus.opened"
						},
						"old_due_date": null
					},
					{
						"amount": 11.76,
						"created_at": "2022-11-22T08:00:14",
						"event_date": "2022-11-22T08:00:14",
						"installment_event_type": {
							"enumerator": "delay_fine",
							"translation_path": "co.InstallmentEventType.delay_fine"
						},
						"installment_old_status": {
							"enumerator": "waiting_payment",
							"translation_path": "co.InstallmentStatus.waiting_payment"
						},
						"old_due_date": null
					},
					{
						"amount": 11.94,
						"created_at": "2022-11-23T09:13:46",
						"event_date": "2022-11-23T09:13:46",
						"installment_event_type": {
							"enumerator": "delay_fine",
							"translation_path": "co.InstallmentEventType.delay_fine"
						},
						"installment_old_status": {
							"enumerator": "overdue",
							"translation_path": "co.InstallmentStatus.overdue"
						},
						"old_due_date": null
					},
					{
						"amount": 12.12,
						"created_at": "2022-11-24T09:15:55",
						"event_date": "2022-11-24T09:15:55",
						"installment_event_type": {
							"enumerator": "delay_fine",
							"translation_path": "co.InstallmentEventType.delay_fine"
						},
						"installment_old_status": {
							"enumerator": "overdue",
							"translation_path": "co.InstallmentStatus.overdue"
						},
						"old_due_date": null
					},
					{
						"amount": 12.3,
						"created_at": "2022-11-25T09:24:45",
						"event_date": "2022-11-25T09:24:44",
						"installment_event_type": {
							"enumerator": "delay_fine",
							"translation_path": "co.InstallmentEventType.delay_fine"
						},
						"installment_old_status": {
							"enumerator": "overdue",
							"translation_path": "co.InstallmentStatus.overdue"
						},
						"old_due_date": null
					},
					{
						"amount": 12.84,
						"created_at": "2022-11-28T09:37:41",
						"event_date": "2022-11-28T09:37:41",
						"installment_event_type": {
							"enumerator": "delay_fine",
							"translation_path": "co.InstallmentEventType.delay_fine"
						},
						"installment_old_status": {
							"enumerator": "overdue",
							"translation_path": "co.InstallmentStatus.overdue"
						},
						"old_due_date": null
					},
					{
						"amount": 13.02,
						"created_at": "2022-11-29T09:17:44",
						"event_date": "2022-11-29T09:17:44",
						"installment_event_type": {
							"enumerator": "delay_fine",
							"translation_path": "co.InstallmentEventType.delay_fine"
						},
						"installment_old_status": {
							"enumerator": "overdue",
							"translation_path": "co.InstallmentStatus.overdue"
						},
						"old_due_date": null
					}
				],
				"fine_amount": 13.02,
				"has_interest": true,
				"installment_key": "1d76836e-1fcc-4b67-8c01-64faa43de9c8",
				"installment_number": 1,
				"installment_payment": [],
				"installment_status": {
					"enumerator": "overdue",
					"translation_path": "co.InstallmentStatus.overdue"
				},
				"installment_type": {
					"enumerator": "principal",
					"translation_path": "co.InstallmentType.principal"
				},
				"original_due_principal": 3038.72,
				"original_pre_fixed_amount": 75.66402982,
				"original_principal_amortization_amount": 476.64597018,
				"original_total_amount": 552.31,
				"paid_amount": 0,
				"paid_at": null,
				"payment_type": {
					"enumerator": "bankslip",
					"translation_path": "co.PaymentType.bankslip"
				},
				"post_fixed_amount": 0,
				"pre_fixed_amount": 75.66402982,
				"principal_amortization_amount": 476.64597018,
				"qr_code_key": "bdd41d56-8588-4468-9705-5233994cdc39",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/bdd41d56-8588-4468-9705-5233994cdc395204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63044F44",
				"renegotiation_proposal_key": null,
				"tax_amount": 1.17254909,
				"total_accrual_amount": null,
				"total_amount": 565.33,
				"total_paid_amount": 0,
				"updated_at": "2022-11-29T09:17:44",
				"workdays": 20,
				"present_amount": 1000.11
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0,
				"bank_slip_key": "527835e4-7b09-42f2-a7d0-befed3a326fd",
				"business_due_date": "2022-12-20",
				"calendar_days": 31,
				"cetip_settlements": [],
				"created_at": "2022-10-19T11:53:00",
				"digitable_line": "32990001031000699925349000000205492040000055231",
				"due_date": "2022-12-19",
				"due_interest": 0,
				"due_principal": 2562.07402982,
				"events": [{
					"amount": null,
					"created_at": "2022-10-19T11:54:47",
					"event_date": "2022-10-19T11:54:47",
					"installment_event_type": {
						"enumerator": "open",
						"translation_path": "co.InstallmentEventType.open"
					},
					"installment_old_status": {
						"enumerator": "created",
						"translation_path": "co.InstallmentStatus.created"
					},
					"old_due_date": null
				}],
				"fine_amount": null,
				"has_interest": true,
				"installment_key": "dde36938-8594-4507-a87d-cd2dd5309817",
				"installment_number": 2,
				"installment_payment": [],
				"installment_status": {
					"enumerator": "opened",
					"translation_path": "co.InstallmentStatus.opened"
				},
				"installment_type": {
					"enumerator": "principal",
					"translation_path": "co.InstallmentType.principal"
				},
				"original_due_principal": 2562.07402982,
				"original_pre_fixed_amount": 65.94922003,
				"original_principal_amortization_amount": 486.36077997,
				"original_total_amount": 552.31,
				"paid_amount": 0,
				"paid_at": null,
				"payment_type": {
					"enumerator": "bankslip",
					"translation_path": "co.PaymentType.bankslip"
				},
				"post_fixed_amount": 0,
				"pre_fixed_amount": 65.94922003,
				"principal_amortization_amount": 486.36077997,
				"qr_code_key": "9d2980e9-fa0c-4b21-a7c5-5ca266c9aba8",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/9d2980e9-fa0c-4b21-a7c5-5ca266c9aba85204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***6304FBC3",
				"renegotiation_proposal_key": null,
				"tax_amount": 2.43277662,
				"total_accrual_amount": null,
				"total_amount": 552.31,
				"total_paid_amount": 0,
				"updated_at": "2022-10-19T11:56:43",
				"workdays": 21,
				"present_amount": 1000.11
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0,
				"bank_slip_key": "d69c9ab6-01f1-40bb-9519-a06ee2230c22",
				"business_due_date": "2023-01-19",
				"calendar_days": 30,
				"cetip_settlements": [],
				"created_at": "2022-10-19T11:53:00",
				"digitable_line": "32990001031000699925350000000203192340000055231",
				"due_date": "2023-01-18",
				"due_interest": 0,
				"due_principal": 2075.71324985,
				"events": [{
					"amount": null,
					"created_at": "2022-10-19T11:54:47",
					"event_date": "2022-10-19T11:54:47",
					"installment_event_type": {
						"enumerator": "open",
						"translation_path": "co.InstallmentEventType.open"
					},
					"installment_old_status": {
						"enumerator": "created",
						"translation_path": "co.InstallmentStatus.created"
					},
					"old_due_date": null
				}],
				"fine_amount": null,
				"has_interest": true,
				"installment_key": "93273ee0-71bd-46a6-b5e2-39e03a365b16",
				"installment_number": 3,
				"installment_payment": [],
				"installment_status": {
					"enumerator": "opened",
					"translation_path": "co.InstallmentStatus.opened"
				},
				"installment_type": {
					"enumerator": "principal",
					"translation_path": "co.InstallmentType.principal"
				},
				"original_due_principal": 2075.71324985,
				"original_pre_fixed_amount": 51.68519286,
				"original_principal_amortization_amount": 500.62480714,
				"original_total_amount": 552.31,
				"paid_amount": 0,
				"paid_at": null,
				"payment_type": {
					"enumerator": "bankslip",
					"translation_path": "co.PaymentType.bankslip"
				},
				"post_fixed_amount": 0,
				"pre_fixed_amount": 51.68519286,
				"principal_amortization_amount": 500.62480714,
				"qr_code_key": "d79eb27b-7a1e-4d4c-94a1-f20045c4904e",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/d79eb27b-7a1e-4d4c-94a1-f20045c4904e5204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***6304E949",
				"renegotiation_proposal_key": null,
				"tax_amount": 3.73566231,
				"total_accrual_amount": null,
				"total_amount": 552.31,
				"total_paid_amount": 0,
				"updated_at": "2022-10-19T11:56:43",
				"workdays": 22,
				"present_amount": 1000.11
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0,
				"bank_slip_key": "5c62c50f-5326-4226-b154-a0cc6d2f62e7",
				"business_due_date": "2023-02-23",
				"calendar_days": 35,
				"cetip_settlements": [],
				"created_at": "2022-10-19T11:53:00",
				"digitable_line": "32990001031000699925351000000201192690000055231",
				"due_date": "2023-02-22",
				"due_interest": 0,
				"due_principal": 1575.08844271,
				"events": [{
					"amount": null,
					"created_at": "2022-10-19T11:54:47",
					"event_date": "2022-10-19T11:54:47",
					"installment_event_type": {
						"enumerator": "open",
						"translation_path": "co.InstallmentEventType.open"
					},
					"installment_old_status": {
						"enumerator": "created",
						"translation_path": "co.InstallmentStatus.created"
					},
					"old_due_date": null
				}],
				"fine_amount": null,
				"has_interest": true,
				"installment_key": "1f7b16fe-04b6-4f07-a807-eb3501e44e0d",
				"installment_number": 4,
				"installment_payment": [],
				"installment_status": {
					"enumerator": "opened",
					"translation_path": "co.InstallmentStatus.opened"
				},
				"installment_type": {
					"enumerator": "principal",
					"translation_path": "co.InstallmentType.principal"
				},
				"original_due_principal": 1575.08844271,
				"original_pre_fixed_amount": 45.8505547,
				"original_principal_amortization_amount": 506.4594453,
				"original_total_amount": 552.31,
				"paid_amount": 0,
				"paid_at": null,
				"payment_type": {
					"enumerator": "bankslip",
					"translation_path": "co.PaymentType.bankslip"
				},
				"post_fixed_amount": 0,
				"pre_fixed_amount": 45.8505547,
				"principal_amortization_amount": 506.4594453,
				"qr_code_key": "b55464c8-3764-4ee2-a814-ce22396aabe7",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/b55464c8-3764-4ee2-a814-ce22396aabe75204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63044215",
				"renegotiation_proposal_key": null,
				"tax_amount": 5.23273899,
				"total_accrual_amount": null,
				"total_amount": 552.31,
				"total_paid_amount": 0,
				"updated_at": "2022-10-19T11:56:43",
				"workdays": 23,
				"present_amount": 1000.11
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0,
				"bank_slip_key": "256be15f-dcc6-4775-8298-c3efde5a1147",
				"business_due_date": "2023-03-21",
				"calendar_days": 26,
				"cetip_settlements": [],
				"created_at": "2022-10-19T11:53:00",
				"digitable_line": "32990001031000699925352000000209192950000055231",
				"due_date": "2023-03-20",
				"due_interest": 0,
				"due_principal": 1068.62899741,
				"events": [{
					"amount": null,
					"created_at": "2022-10-19T11:54:47",
					"event_date": "2022-10-19T11:54:47",
					"installment_event_type": {
						"enumerator": "open",
						"translation_path": "co.InstallmentEventType.open"
					},
					"installment_old_status": {
						"enumerator": "created",
						"translation_path": "co.InstallmentStatus.created"
					},
					"old_due_date": null
				}],
				"fine_amount": null,
				"has_interest": true,
				"installment_key": "3ed37dc1-61f8-44f1-af21-a55f0cf0795d",
				"installment_number": 5,
				"installment_payment": [],
				"installment_status": {
					"enumerator": "opened",
					"translation_path": "co.InstallmentStatus.opened"
				},
				"installment_type": {
					"enumerator": "principal",
					"translation_path": "co.InstallmentType.principal"
				},
				"original_due_principal": 1068.62899741,
				"original_pre_fixed_amount": 23.02305805,
				"original_principal_amortization_amount": 529.28694195,
				"original_total_amount": 552.31,
				"paid_amount": 0,
				"paid_at": null,
				"payment_type": {
					"enumerator": "bankslip",
					"translation_path": "co.PaymentType.bankslip"
				},
				"post_fixed_amount": 0,
				"pre_fixed_amount": 23.02305805,
				"principal_amortization_amount": 529.28694195,
				"qr_code_key": "64e05528-83fb-432a-8af7-491ca4eb7b90",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/64e05528-83fb-432a-8af7-491ca4eb7b905204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***630472F7",
				"renegotiation_proposal_key": null,
				"tax_amount": 6.59703244,
				"total_accrual_amount": null,
				"total_amount": 552.31,
				"total_paid_amount": 0,
				"updated_at": "2022-10-19T11:56:43",
				"workdays": 18,
				"present_amount": 1000.11
			},
			{
				"accrual_reference_date": null,
				"additional_costs": [],
				"advanced_paid_amount": 0,
				"bank_slip_key": "a8c2edaa-ed3d-4c5b-808e-b26947a5e79e",
				"business_due_date": "2023-04-19",
				"calendar_days": 29,
				"cetip_settlements": [],
				"created_at": "2022-10-19T11:53:01",
				"digitable_line": "32990001031000699925353000000207293240000055232",
				"due_date": "2023-04-18",
				"due_interest": 0,
				"due_principal": 539.34205545,
				"events": [{
					"amount": null,
					"created_at": "2022-10-19T11:54:47",
					"event_date": "2022-10-19T11:54:47",
					"installment_event_type": {
						"enumerator": "open",
						"translation_path": "co.InstallmentEventType.open"
					},
					"installment_old_status": {
						"enumerator": "created",
						"translation_path": "co.InstallmentStatus.created"
					},
					"old_due_date": null
				}],
				"fine_amount": null,
				"has_interest": true,
				"installment_key": "2b58b2be-89cd-4710-a6a5-81180938b501",
				"installment_number": 6,
				"installment_payment": [],
				"installment_status": {
					"enumerator": "opened",
					"translation_path": "co.InstallmentStatus.opened"
				},
				"installment_type": {
					"enumerator": "principal",
					"translation_path": "co.InstallmentType.principal"
				},
				"original_due_principal": 539.34205545,
				"original_pre_fixed_amount": 12.97660456,
				"original_principal_amortization_amount": 539.34339544,
				"original_total_amount": 552.32,
				"paid_amount": 0,
				"paid_at": null,
				"payment_type": {
					"enumerator": "bankslip",
					"translation_path": "co.PaymentType.bankslip"
				},
				"post_fixed_amount": 0,
				"pre_fixed_amount": 12.97660456,
				"principal_amortization_amount": 539.34339544,
				"qr_code_key": "dcc7d257-e6a1-4d0a-88f7-1acf662482b5",
				"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/dcc7d257-e6a1-4d0a-88f7-1acf662482b55204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***6304C9A1",
				"renegotiation_proposal_key": null,
				"tax_amount": 8.00493468,
				"total_accrual_amount": null,
				"total_amount": 552.32,
				"total_paid_amount": 0,
				"updated_at": "2022-10-19T11:56:43",
				"workdays": 20,
				"present_amount": 1000.11
			}
		],
		"interest_grace_period": 0,
		"interest_payment_month_period": 1,
		"interest_subsidy_amount": 0,
		"interest_subsidy_percentage": 0,
		"interest_type": {
			"enumerator": "pre_price_days",
			"translation_path": "co.InterestType.pre_price_days"
		},
		"iof_charge_method": "financed",
		"ipoc_code": "324025020203192147661180DiDi118261",
		"is_allowed_to_disburse": true,
		"is_portability": false,
		"is_refinancing": 0,
		"isin_number": null,
		"issue_amount": 3038.72,
		"issue_date": "2022-10-19",
		"issuer_document_number": "92147661180",
		"issuer_name": "Wxy  Wsx",
		"kyc": null,
		"modality": {
			"code": "0203",
			"description": "crédito pessoal - sem consignação em folha de pagam.",
			"enumerator": null,
			"visible": true
		},
		"net_external_contract_fee_amount": 0,
		"next_due_date": "2022-12-19",
		"number_of_installments": 6,
		"operation_extra_fields": null,
		"operation_type": {
			"enumerator": "structured_operation",
			"translation_path": "co.OperationType.structured_operation"
		},
		"origin_key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
		"origin_type": {
			"enumerator": "lego-api",
			"translation_path": "co.OriginType.lego-api"
		},
		"original_prefixed_interest_rate": {
			"annual_rate": 0.34331516,
			"created_at": "2022-10-19T11:53:00",
			"daily_rate": 0.00082017,
			"interest_base": {
				"enumerator": "calendar_days",
				"translation_path": "co.InterestBase.calendar_days",
				"year_days": 360
			},
			"monthly_rate": 0.0249
		},
		"original_total_iof": 38.72,
		"payment_and_settlement_agent": {
			"enumerator": "qi_scd",
			"translation_path": "co.PaymentAndSettlementAgent.qi_scd"
		},
		"payment_type": {
			"enumerator": "bankslip",
			"translation_path": "co.PaymentType.bankslip"
		},
		"payroll_data": null,
		"portability_amount": null,
		"portability_financial_institution_code_number": null,
		"portability_original_contract": null,
		"post_fixed_interest_base": {
			"enumerator": "workdays",
			"translation_path": "co.InterestBase.workdays",
			"year_days": 252
		},
		"post_fixed_interest_rate": null,
		"prefixed_interest_rate": {
			"annual_rate": 0.34331516,
			"created_at": "2022-10-19T11:53:00",
			"daily_rate": 0.00082017,
			"interest_base": {
				"enumerator": "calendar_days",
				"translation_path": "co.InterestBase.calendar_days",
				"year_days": 360
			},
			"monthly_rate": 0.0249
		},
		"principal_amortization_month_period": 1,
		"principal_grace_period": 0,
		"purchaser_document_number": "32402502000135",
		"rebate_account": null,
		"refinanced_credit_operations": [],
		"registration_institution": {
			"enumerator": "qi_scd",
			"translation_path": "co.RegistrationInstitution.qi_scd"
		},
		"related_party_list": [{
			"address": {
				"city": "Aguascalientes",
				"complement": null,
				"created_at": "2022-10-19T11:52:59",
				"neighborhood": "Aguascalientes",
				"number": "1",
				"postal_code": "20000000",
				"state": "SP",
				"street": "Zona Centro"
			},
			"attached_document_list": [{
				"created_at": "2022-10-19T11:53:01",
				"document_key": "5df59dca-b8d1-4dca-8358-8b4bd944f3dc",
				"document_type": {
					"enumerator": "document_identification",
					"translation_path": "co.DocumentType.document_identification"
				},
				"document_url": "https://storage.googleapis.com/sandbox-doc-api/documents/5df59dca-b8d1-4dca-8358-8b4bd944f3dc/image_1666180300436.jpg",
				"related_party_key": null,
				"signature_required": false,
				"signature_url": null,
				"signed": false
			}],
			"birth_date": "1997-10-19",
			"birth_place": null,
			"cnae_code": null,
			"company_document_number": null,
			"created_at": "2022-10-19T11:53:01",
			"document_identification_date": null,
			"document_identification_number": "",
			"document_identification_type": null,
			"email": "wxr@ff.com",
			"foundation_date": null,
			"gender": null,
			"income": 0.01,
			"individual_document_number": "92147661180",
			"is_pep": false,
			"marital_status": {
				"enumerator": "single",
				"translation_path": "co.MaritalStatus.single"
			},
			"mother_name": null,
			"name": "Wxy  Wsx",
			"nationality": "nationality",
			"person_type": "natural",
			"phone": {
				"area_code": "00",
				"country_code": "055",
				"created_at": "2022-10-19T11:53:00",
				"number": "016048311",
				"phone_key": "341d7c67-963c-49a5-b585-265425d71f52",
				"phone_type": null
			},
			"profession": null,
			"property_system": null,
			"related_party_key": "203b2ada-ff3e-44a6-a843-f244aa1afbc9",
			"revenue": null,
			"role_type": {
				"enumerator": "issuer",
				"translation_path": "co.RoleType.issuer"
			},
			"simples_nacional_participant": null,
			"spouse_document_number": null,
			"trading_name": null
		}],
		"requester_identifier_key": "89bb875a4a654ecfbad0c6ce0b3b5037",
		"requester_key": "75f2ab85-a5ce-40b9-9b1e-915175906d78",
		"requester_name": "DiDi Global (99Pay)",
		"resource_source_account": {
			"enumerator": "third_party",
			"translation_path": "co.ResourceSourceAccount.third_party"
		},
		"selfie_enabled": false,
		"settlement_bank_account_key": null,
		"share_quantity": 4,
		"signature_method": {
			"enumerator": "email"
		},
		"tax_configuration": {
			"created_at": "2019-03-15T13:09:32",
			"iof_additional_rate": 0.0038,
			"iof_rate": 0.000082
		},
		"tax_exempt_amount": null,
		"third_party_account_key": "5d068423-6094-49e4-b15b-7740038295a8",
		"total_iof": 38.72
	},
	"operation_key": "438ceaa3-2906-4ee3-85f9-0dcacd5f2581",
	"status": "opened",
	"webhook_type": "signed_debt"
}
```

:::caution Atenção!

Dentro do array de parcelas será retornado o valor presente calculado de cada parcela em **"present_amount"**, seu somatório será o valor presente considerado para o contrato no momento da solicitação do refinanciamento.
:::

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

```

---

# introducao

URL: /en/documentation/refinanciamento/introducao

Um refinanciamento consiste na geração de um novo contrato de crédito para a quitação de um anterior, neste sentido, seu fluxo funciona da mesma forma de uma emissão de dividas simples, porém quando informados os valores da operação, o somatorio do valor presente dos contratos anteriores será retido e apenas o excedente, caso exista, será liberado na conta do tomador.

---

# Refinancing Simulation

URL: /en/documentation/refinanciamento/simulando_refinanciamento

## Requesting a simulation for a non existing operation

ENDPOINT /debt_simulation
METHOD POST

Request Body

```json
{
  "complex_operation": true,
  "operation_batch": [
    {
      "borrower": {
        "person_type": "natural"
      },
     "refinanced_credit_operations": [
            {
                "original_deadline": 5,
                "monthly_interest_rate": "0.0133",
                "disbursement_date": "2024-06-30",
                "due_balance": 1050,
            }
    ],
      "financial": {
        "amount": 1900.83,
        "disbursement_amount": 800,
        "interest_type": "pre_price_days",
        "credit_operation_type": "ccb",
        "annual_interest_rate": 2.32,
        "disbursement_date": "2023-04-01",
        "interest_grace_period": 0,
        "principal_grace_period": 0,
        "number_of_installments": 2,
        "fine_configuration": {
          "contract_fine_rate": 0.02,
          "interest_base": "calendar_days",
          "monthly_rate": 0.01
        }
      }
    }
  ]
}
```
:::caution Atenção!

The **"disbursement_date"** and **"monthly_interest_rate"** within **"refinanced_credit_operations"** are required only when attempting to calculate operation settlement values for multiple disbursement option operations.
:::

## Requesting a simulation for an existing operation

ENDPOINT /debt_simulation
METHOD POST

Request Body

```json
{
  "complex_operation": true,
  "operation_batch": [
    {
      "borrower": {
        "person_type": "natural"
      },
     "refinanced_credit_operations": [
            {
                "operation_key": "a9630d51-f08f-4763-b269-c1947e97c260"
            }
    ],
      "financial": {
        "amount": 1900.83,
        "disbursement_amount": 800,
        "interest_type": "pre_price_days",
        "credit_operation_type": "ccb",
        "annual_interest_rate": 2.32,
        "disbursement_date": "2023-04-01",
        "interest_grace_period": 0,
        "principal_grace_period": 0,
        "number_of_installments": 2,
        "fine_configuration": {
          "contract_fine_rate": 0.02,
          "interest_base": "calendar_days",
          "monthly_rate": 0.01
        }
      }
    }
  ]
}

```

:::caution Atenção!
The utilized payloads are the same utilized in the simple debt simulation, in addition to the operation list that will be settled in the **"refinanced_credit_operations"** with their settlement debt values.
:::

## Response

STATUS 200

Response Body

```json
[
    {
        "data": {
            "annual_cet": 0.6252134981759837,
            "assignment_amount": 1919.84,
            "cet": 0.0413,
            "contract_fee_amount": -179.13,
            "contract_fees": [
                {
                    "amount": 1.0,
                    "amount_type": "percentage",
                    "fee_amount": -179.13,
                    "fee_type": "tac"
                }
            ],
            "credit_operation_type": "ccb",
            "disbursed_issue_amount": 2079.96,
            "disbursement_date": "2023-04-01",
            "disbursement_options": [
                {
                    "annual_cet": 0.6252134981759837,
                    "assignment_amount": 1919.84,
                    "cet": 0.0413,
                    "contract_fee_amount": -179.13,
                    "contract_fees": [
                        {
                            "amount": 1.0,
                            "amount_type": "percentage",
                            "fee_amount": -179.13,
                            "fee_type": "tac"
                        }
                    ],
                    "disbursed_issue_amount": 2079.96,
                    "disbursement_date": "2023-04-01",
                    "external_contract_fee_amount": 19.01,
                    "external_contract_fees": [
                        {
                            "amount": 1.0,
                            "amount_released": 17.25,
                            "amount_type": "percentage",
                            "cofins_amount": 0,
                            "csll_amount": 0,
                            "description": null,
                            "fee_amount": 19.01,
                            "fee_type": "spread",
                            "irrf_amount": 0,
                            "net_fee_amount": 17.25,
                            "pis_amount": 0,
                            "tax_amount": 1.76
                        }
                    ],
                    "first_due_date": "2023-05-01",
                    "installments": [
                        {
                            "business_due_date": "2023-05-02",
                            "calendar_days": 30,
                            "due_date": "2023-05-01",
                            "due_principal": 1900.83,
                            "has_interest": true,
                            "installment_number": 1,
                            "post_fixed_amount": 0,
                            "pre_fixed_amount": 199.90606482231624,
                            "principal_amortization_amount": 904.6839351776838,
                            "tax_amount": 0.0,
                            "total_amount": 1104.59,
                            "workdays": 18.0
                        },
                        {
                            "business_due_date": "2023-06-01",
                            "calendar_days": 31,
                            "due_date": "2023-06-01",
                            "due_principal": 996.1460648223162,
                            "has_interest": true,
                            "installment_number": 2,
                            "post_fixed_amount": 0,
                            "pre_fixed_amount": 108.43818022618876,
                            "principal_amortization_amount": 996.1418197738112,
                            "tax_amount": 0.0,
                            "total_amount": 1104.58,
                            "workdays": 23.0
                        }
                    ],
                    "iof_amount": 0.0,
                    "issue_amount": 1900.83,
                    "net_external_contract_fee_amount": 17.25,
                    "prefixed_interest_rate": {
                        "annual_rate": 2.32,
                        "daily_rate": 0.0033388,
                        "interest_base": "calendar_days",
                        "monthly_rate": 0.10516767
                    },
                    "total_pre_fixed_amount": 308.344245048505
                }
            ],
            "external_contract_fee_amount": 19.01,
            "external_contract_fees": [
                {
                    "amount": 1.0,
                    "amount_released": 17.25,
                    "amount_type": "percentage",
                    "cofins_amount": 0,
                    "csll_amount": 0,
                    "description": null,
                    "fee_amount": 19.01,
                    "fee_type": "spread",
                    "irrf_amount": 0,
                    "net_fee_amount": 17.25,
                    "pis_amount": 0,
                    "tax_amount": 1.76
                }
            ],
            "final_disbursement_amount": -17733.89,
            "installments": [
                {
                    "business_due_date": "2023-05-02",
                    "calendar_days": 30,
                    "due_date": "2023-05-01",
                    "due_principal": 1900.83,
                    "has_interest": true,
                    "installment_number": 1,
                    "post_fixed_amount": 0,
                    "pre_fixed_amount": 199.90606482231624,
                    "principal_amortization_amount": 904.6839351776838,
                    "tax_amount": 0.0,
                    "total_amount": 1104.59,
                    "workdays": 18.0
                },
                {
                    "business_due_date": "2023-06-01",
                    "calendar_days": 31,
                    "due_date": "2023-06-01",
                    "due_principal": 996.1460648223162,
                    "has_interest": true,
                    "installment_number": 2,
                    "post_fixed_amount": 0,
                    "pre_fixed_amount": 108.43818022618876,
                    "principal_amortization_amount": 996.1418197738112,
                    "tax_amount": 0.0,
                    "total_amount": 1104.58,
                    "workdays": 23.0
                }
            ],
            "interest_grace_period": 0,
            "interest_payment_month_period": 1,
            "interest_type": "pre_price_days",
            "iof_amount": 0.0,
            "issue_amount": 1900.83,
            "issue_date": "2023-04-01",
            "net_external_contract_fee_amount": 17.25,
            "number_of_installments": 2,
            "operation_type": "refinancing",
            "post_fixed_interest_base": "workdays",
            "post_fixed_interest_rate": null,
            "prefixed_interest_rate": {
                "annual_rate": 2.32,
                "daily_rate": 0.0033388,
                "interest_base": "calendar_days",
                "monthly_rate": 0.10516767
            },
            "principal_amortization_month_period": 1,
            "principal_grace_period": 0,
            "refinanced_credit_operations": [
                {
                    "due_balance": 19813.85,
                    "due_balance_reference_date": "2023-03-29",
                    "original_deadline": 1084,
                    "refinanced_credit_operation_key": "a9630d51-f08f-4763-b269-c1947e97c260",
                    "refinanced_credit_operation_status": null
                }
            ],
            "requester_key": "ef48fbe4-267b-45c1-9049-75345c075486",
            "total_pre_fixed_amount": 308.344245048505
        },
        "event_datetime": "2023-03-29 19:19:28",
        "key": "0fc07785-7f74-45b0-a8ca-8ca48f8c17ed",
        "status": "finished",
        "type": "debt"
    }
]
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

## Definitions

### Request Body
| Field                 | Type    | Description                                                                                     | 
|-----------------------|---------|-------------------------------------------------------------------------------------------------|
| **complex_operation** | boolean | _true_ - indicates multiple operations may be realized for the same request                     |
| **operation_batch**   | object  | Lists operation batches - **[Lista Operation Batch Objects](#object-da-lista-operation_batch)** |

### Lista Operation Batch Objects
| Field         | Type   | Description                                                                    | 
|---------------|--------|--------------------------------------------------------------------------------|
| **borrower**  | object | **[Object Borrower](#object-borrower)** - Credit Operation borrowers objects|
| **financial** | object | **[Object Financial](#object-financial)** - Credit operation financial objects |

### Object Borrower
| Field           | Type   | Description                                                                            |
|-----------------|--------|----------------------------------------------------------------------------------------|
| **person_type** | object | **[Enumerador Person Type](#enumerador-person_type)** - Creditors' natural person type |

### Object Financial
| Field                            | Type             | Description                                                                                                 |
|----------------------------------|------------------|-------------------------------------------------------------------------------------------------------------|
| **amout**                        | float            | Credit operation issue amount                                                                               |
| **interest_type**                | object           | **[Enumerador Interest Type](#enumerador-interest-type)** -Amortization method and interest calculation type |
| **credit_operation_type**        | object           | **[Enumerador Credit Operation Type](#enumerador-credit-operation-type)** - Contract type                   |
| **annual_interest_rate**         | float            | Pre-fixed anual interest rate                                                                               |
| **disbursement_date**            | date             | Operation disbursement date                                                                                 |
| **interest_grace_period**        | int              | Interest grace period (in months)                                                                           |
| **principal_grace_period**       | int              | Principal grace period (in months)                                                                          |
| **number_of_installments**       | int              | Number of credit operation installments                                                                     |
| **fine_configuration**           | object           | **[Object fine_configuration](#object-fine-configuration)** - Fine configuration type                       |
| **refinanced_credit_operations** | array of objects | Lists all refinanced credit operations                                                                      |

### Object Refinanced Credit Operations

#### Existing refinanced operation fields
| Field                     | Type   | Description                                    |
|---------------------------|--------|------------------------------------------------|
| **due_balance**           | number | Refinanced operation due balance               |
| **original_deadline**     | int    | Refinanced operation original payment deadline |
| **monthly_interest_rate** | float  | Refinanced operation monthly interest rate     |
| **disbursement_date**     | date   | Refinanced operation due date                  |

#### Existing refinanced operation fields
| Field             | Type        | Description               |
|-------------------|-------------|---------------------------|
| **operation_key** | string uuid | Refinanced operation uuid |

### Object Fine Configuration
| Field                  | Type  | Description                                                                           | 
|------------------------|-------|---------------------------------------------------------------------------------------|
| **contract_fine_rate** | float | Fine percentage (decimals)                                                            |
| **interest_base**      | enum  | **[Enumerador Interest Base](#enumerador-interest-base)** - Interest base calculation |
| **monthly_rate**       | float | Monthly interest rate (decimals)                                                      |

---

# Refinancing Creation

URL: /en/documentation/refinanciamento/solicitando_refinanciamento

## Request

ENDPOINT /debt
METHOD POST

Request Body

```json
{
    "borrower": {
        "address": {
            "city": "Bauru",
            "neighborhood": "Centro",
            "number": "343",
            "postal_code": "17057770",
            "state": "SP",
            "street": "Av Um"
        },
        "birth_date": "1998-03-21",
        "document_identification": "2f7bfc50-d7c0-4d4e-a5ce-d8bba2aeb348",
        "document_identification_number": "432202821",
        "email": "victor.moura@qitech.com.br",
        "individual_document_number": "37197645832",
        "name": "Urich Oliveira",
        "person_type": "natural",
        "phone": {
            "area_code": "14",
            "country_code": "055",
            "number": "936180265"
        }
    },
    "disbursement_bank_account": {
        "account_digit": "2",
        "account_number": "63755",
        "bank_code": "329",
        "branch_number": "0001"
    },
    "financial": {
        "disbursed_amount": 5000.0
        "monthly_interest_rate": 0.0175,
        "credit_operation_type": "ccb",
        "disbursement_date": "2022-04-25",
        "fine_configuration": {
            "contract_fine_rate": 0.02,
            "interest_base": "calendar_days",
            "monthly_rate": 0.01
        },
        "first_due_date": "2022-06-07",
        "interest_grace_period": 0,
        "interest_subsidy_percentage": 0,
        "interest_type": "pre_price_days",
        "issue_date": "2022-04-25",
        "number_of_installments": 84,
        "principal_grace_period": 0,
        "payment_type": "bankslip"
    },
    "simplified": true,
    "refinanced_credit_operations": [
            {
                "operation_key": "d897f8fa-30d0-4a25-b7e5-5daa61c7480d"
            },
            {
                "operation_key": "f8f0d7a9-4f0c-426c-ac50-33a09d4a0d78"
            }
    ],
  "purchaser_document_number": "32402502000135"
}

```

:::caution Attention!
The payload used in a refinancing operation is the same used in a simple debt emission, in addition to the operation list which will be settled in the **"refinanced_credit_operations"**

:::

### Body Params

| Field                              | Type             | Description                                                                                                        | Máx. Caract. | 
|------------------------------------|------------------|--------------------------------------------------------------------------------------------------------------------|--------------|
| **borrower** *                     | object           | **[Object Borrower](#object-borrower)** - Credit Operation borrower information                                    | -            | 
| **disbursement_bank_account** *    | object           | **[Object Disbursement Bank Account](#object-disbursement_bank_accounts)** - Disbursement bank account information | -            |
| **financial** *                    | object           | **[Object Financial](#object-financial)** - Financial information                                                  | -            |
| **purchaser_document_number** *    | string           | Purchaser document number                                                                                          | -            |
| **refinanced_credit_operations** * | array of objects | **[Objects Refinanced Credit Operations](#object-refinanced_credit_operations)** Refinanced operations list        | -            |

## Definitions

### Object Request Body
| Field                           | Type   | Description                                                                                                       | Máx. Caract. | 
|---------------------------------|--------|-------------------------------------------------------------------------------------------------------------------|--------------|
| **borrower** *                  | object | **[Object Borrower](#object-borrower)** - Credit operation borrower information                                   | -            | 
| **disbursement_bank_account** * | object | **[Object Disbursement Bank Account](#object-disbursement_bank_accounts)** - Disbursement bank account information | -            |
| **financial** *                 | object | **[Object Financial](#object-financial)** - Financial information                                                 | -            |
| **purchaser_document_number** * | string |  Purchaser document number                                                             | -            |

### Object Borrower
| Campo                            | Tipo    | Description                                                                                    | Máx. Caract. | 
|----------------------------------|---------|----------------------------------------------------------------------------------------------|--------------|
| **name** *                       | string  | Creditors name                                                                               | 100          |
| **email**                        | string  | Creditors email                                                                              | 254          |
| **phone**                        | object  | **[Object Phone](#object-phone)** - Creditors Telefphone                                     | -            | 
| **is_pep** *                     | boolean | Indicador de PEP (http://www.portaldatransparencia.gov.br/download-de-dados/pep)             | -            |
| **address** *                    | object  | **[Object Address](#object-address)** - Creditors Address                                    | -            | 
| **role_type** *                  | enum    | default: _issuer_                                                                            | -            |
| **birth_date** *                 | date    | Creditors birth date ("AAAA-MM-DD" format)                                                   | -            |
| **mother_name** *                | string  | Creditors monthers name                                                                      | 100          |
| **nationality**                  | string  | Creditors nationality                                                                        | 50           |
| **person_type** *                | string  | Natural person indicator - default: _natural_                                                | -            |
| **individual_document_number** * | string  | Creditors document number (apenas números)                                                   | 11           |
| **document_identification**     * | string  | Creditors **DOCUMENT_KEY** in PDF format (RG ou CNH)                                         | -            |
| **document_identification_back** |string | Creditors **DOCUMENT_KEY** (BACK)                                                            | 11 |
| **wedding_certificate** | string | Creditors wedding **DOCUMENT_KEY**. In the case their marital satus is "Single" must be null | 11 |
| **proof_of_residence** * |string | Creditors address **DOCUMENT_KEY**                                                           | 11 |

### Object Address
| Field              | Type   | Description                                                          | Mx. Charact. | 
|--------------------|--------|----------------------------------------------------------------------|--------------| 
| **city** *         | string | Address city                                                         | 100          |
| **state** *        | string | Address state (2 upper-case letters)                                 | 2            |
| **number** *       | string | Address number                                                       | 10           |
| **street** *       | string | Address street                                                       | 100          |
| **complement** *   | string | Address complement (free text)                                       | 100          |
| **postal_code** *  | string | Address CEP (http://www.buscacep.correios.com.br/sistemas/buscacep/) | 8            |
| **neighborhood** * | string | Address neighborhood                                                 | 100          |

### Object Phone
| Field              | Description | Example                                               | Max. Charact. | 
|--------------------|-------------|-------------------------------------------------------|---------------| 
| **number** *       | string      | Telephone number                                      | 10            |
| **area_code** *    | string      | Telefone DDD area code (https://ddd.guiamais.com.br/) | 2             |
| **country_code** * | string      | Telefone country code (https://ddi.guiamais.com.br/)  | 3             |

### Object Disbursement Bank Account

A debt emission must contain disbursement bank account informations in the same titularity as the creditor

| Field            | Type   | Description                                                             | Max. Charact. | 
|------------------|--------|-------------------------------------------------------------------------|---------------|
| name             | string | Creditor name                                                           | 50            |
| document_number  | string | Creditor document number                                                | 11            |
| bank_code *      | string | Bank Code (https://www.bcb.gov.br/pom/spb/estatistica/port/ASTR003.pdf) | 3             |
| branch_number *  | string | Branch number - Do NOT send the verification number                     | 4             |
| account_number * | string | Account number - Do NOT send the verification number                    | 10            |
| account_digit *  | string | Account verification number                                             | 1             |
| account_type     | enum   | [Enumerator Account Type](#enumerador-account-type) Account Type        | 1             |

### Object Financial

The financial object describes the credit operations financial information 

| Field                      | Type  | Description                                                                                      | Max. Charact. |
|----------------------------|-------|--------------------------------------------------------------------------------------------------|---------------|
| **amout**                  | float | Credit issue amount                                                                              | -             |
| **interest_type**          | object | **[Enumerator Interest Type](#enumerador-interest-type)** - Interest calculation enumerator      | -             |
| **credit_operation_type**  | object | **[Enumerator Credit Operation Type](#enumerador-credit-operation-type)** - credit operation type | -             |
| **annual_interest_rate**   | float | Pre-fixed anual interest rate                                                                    | -             |
| **disbursement_date**      | date  | Operation disbursement date                                                                      | -             |
| **interest_grace_period**  | int   | Interest grace period (in months)                                                                | -             |
| **principal_grace_period** | int   | Principal grace period                                                                           | -             |
| **number_of_installments** | int   | Credit operation installment number                                                              | -             |
| **fine_configuration**     | object | **[Object Fine Configuration](#object-fine-configuration)** - Fine configuration                 | -             |

### Object Fine Configuration

In the object fine configuration, the interest and fine values are set for this operation

| Field                  | Type  | Description                                                                           | Max. Charact. |
|------------------------|-------|---------------------------------------------------------------------------------------|---------------|
| **contract_fine_rate** | float | Default fine configuration                                                            | -             |
| **interest_base**      | enum  | **[Enumerator Interest Base](#enumerador-interest-base)** - Interest calculation base | -             |
| **monthly_rate**       | float | Monthly default rate                                                                  | -             |

### Object Refinanced Credit Operations 

| Field           | Type   | Description              | Characters |
|-----------------|--------|--------------------------|------------|
| `operation_key` | string | Refinanced operation key | uuid key   |

# Enumerators

### Enumerator _Person Type_
| Enumerator  | Description    |
|-------------|----------------|
| **legal**   | Legal person   |
| **natural** | Natural person |

### Enumerator _Account Type_
| Enumerator             | Description        |
|------------------------|--------------------|
| **checking_account**   | Checking account   |
| **deposit_account**    | Deposit account    |
| **guaranteed_account** | guaranteed account |
| **investment_account** | Investment account |
| **payment_account**    | Payment account    |
| **saving_account**     | Savings account    |
| **salary_account**     | Salary account            |

### Enumerator _Interest Type_
| Enumerator           | Description                                                                                                                                                            |
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **pre_price_days**   | Amortization method: Fixed installments with interest calculated daily                                                                                                 | 
| **pre_price**        | Amortization method: Fixed installments with fixed period calculations (30 days)                                                                                       |
| **pre_sac**          | Amortization method: Constant amortization with pre-fixed daily interest rate                                                                                          |
| **post_sac**         | Amortization method: Constant amortization with pre-fixed daily interest rate + post-fixed integrated benchmark (IPCA, CBD, ETC) calculated daily                      |
| **post_price**       | Amortization method: Fixed installments with pre-fixed daily interest rate + post-fixed integrated benchmark (IPCA, CBD, ETC) with fixed period calculations (30 days) |                                                                 |
| **post_price_days**  | Amortization method: Fixed installments with pre-fixed daily interest rate + post-fixed integrated benchmark (IPCA, CBD, ETC) calculated daily                         |

### Enumerator _Credit Operation Type_
| Enumerator    | Description                      |
|---------------|--------------------------------|
| **ccb**       | Cédula de Crédito Bancário     |
| **cce**       | Cédula de Crédito à Exportação |
| **cci**       | Cédula de Crédito Imobiliário  |
| **nce**       | Nota de Crédito à Exportação   |

### Enumerator _Interest Base_
| Enumerator            | Description              |
|-----------------------|--------------------------|
| **workdays**          | Interest basis: 252 days |
| **calendar_days**     | Interest basis: 360 days |
| **calendar_days_365** | Interest basis: 365 days |

### Enumerator _Fee Type_
Each enumerator type must be previously set and configured by QI Tech

| Enumerator            | Description                                    |
|-----------------------|------------------------------------------------|
| **tac**               | Opening fee                                    |
| **spread**            | Additional fee charged on credit operation     |
| **warranty_analysis** | Warranty analysis fee                          |
| **ted_fee**           | TED fee                                        |
| **spread_ted_fee**    | TED additional fee charged on credit operation |

## Response

STATUS 200

Response Body

```json
{
  "data": {
    "additional_iof": 469.1328,
    "annual_cet": "283,3821%",
    "assignment_amount": 124690.56,
    "base_iof": 473.6829374063069,
    "borrower": {
      "document_number": "96969879003",
      "name": "Alan Mathison Turing"
    },
    "cet": "11,8500%",
    "collaterals": [],
    "contract": {
      "number": "0000067563/AMT",
      "signature_information": [
        {
          "signature_url": null,
          "signer_document_number": "15627918004",
          "signer_email": "alan.turing@email.com",
          "signer_external_key": null,
          "signer_name": "Alan Mathison Turing",
          "signer_role": "issuer"
        }
      ],
      "urls": [
        "https://storage.googleapis.com/sandbox-doc-api/documents/5af36fcd-8e4c-4421-ad45-7bcba899c0d3/SYNGENTASANDBOX-ALAN_MATHISON_TURING-CCB-0000067563-20230302234816.pdf"
      ]
    },
    "contract_fee_amount": 1234.56,
    "contract_fees": [
      {
        "fee_amount": 1234.56,
        "fee_type": "tac"
      }
    ],
    "external_contract_fee_amount": 1234.56,
    "external_contract_fees": [
      {
        "fee_amount": 1234.56,
        "fee_type": "spread",
        "net_fee_amount": 1120.36,
        "tax_amount": 114.2
      }
    ],
    "installments": [
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2023-04-03",
        "calendar_days": 31,
        "digitable_line": null,
        "due_date": "2023-04-02",
        "due_interest": 0,
        "due_principal": 123456,
        "fine_amount": null,
        "has_interest": true,
        "installment_history": [],
        "installment_key": "da264e95-2bbd-47de-876b-bfea7d25e266",
        "installment_number": 1,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 123456,
        "original_pre_fixed_amount": 13245.468714162304,
        "original_principal_amortization_amount": 58473.151285837695,
        "original_total_amount": 71718.62,
        "paid_amount": 0,
        "paid_at": null,
        "post_fixed_amount": 0,
        "pre_fixed_amount": 13245.468714162304,
        "principal_amortization_amount": 58473.151285837695,
        "qr_code_key": null,
        "qr_code_url": null,
        "renegotiation_proposal_key": null,
        "tax_amount": 148.63875056859942,
        "total_accrual_amount": null,
        "total_amount": 71718.62,
        "total_paid_amount": 0,
        "workdays": 21
      },
      {
        "accrual_reference_date": null,
        "additional_costs": [],
        "advanced_paid_amount": 0,
        "bank_slip_key": null,
        "business_due_date": "2023-05-02",
        "calendar_days": 30,
        "digitable_line": null,
        "due_date": "2023-05-02",
        "due_interest": 0,
        "due_principal": 64982.848714162305,
        "fine_amount": null,
        "has_interest": true,
        "installment_history": [],
        "installment_key": "cac7064b-2310-45e1-a91f-5e8f39f0f0ea",
        "installment_number": 2,
        "installment_payment": [],
        "installment_status": "created",
        "installment_type": "principal",
        "original_due_principal": 64982.848714162305,
        "original_pre_fixed_amount": 6735.77577015044,
        "original_principal_amortization_amount": 64982.84422984956,
        "original_total_amount": 71718.62,
        "paid_amount": 0,
        "paid_at": null,
        "post_fixed_amount": 0,
        "pre_fixed_amount": 6735.77577015044,
        "principal_amortization_amount": 64982.84422984956,
        "qr_code_key": null,
        "qr_code_url": null,
        "renegotiation_proposal_key": null,
        "tax_amount": 325.0441868377075,
        "total_accrual_amount": null,
        "total_amount": 71718.62,
        "total_paid_amount": 0,
        "workdays": 19
      }
    ],
    "iof_charge_method": "financed",
    "issue_amount": 123456,
    "net_external_contract_fee_amount": 1120.36,
    "number_of_installments": 2,
    "prefixed_interest_rate": {
      "annual_rate": 2.32,
      "created_at": "2023-03-02T23:48:15",
      "daily_rate": 0.00329298,
      "interest_base": "calendar_days_365",
      "monthly_rate": 0.10516767
    },
    "requester_identifier_key": "1c2ca4dc-2a20-4dd4-bd5f-af143fadadf4",
    "total_iof": 942.82,
    "total_pre_fixed_amount": 19981.244484312745
  },
  "event_datetime": "2023-03-02 23:48:20",
  "key": "1c2ca4dc-2a20-4dd4-bd5f-af143fadadf4",
  "status": "waiting_signature",
  "webhook_type": "debt"
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Cancelar uma renegociação

URL: /en/documentation/renegociacao/cancelar_uma_renegociacao

## Request

ENDPOINT /renegotiation/proposal/ PROPOSAL-KEY
METHOD DELETE

### Path Params

| Field            | Type   | Description                | Characters |
|------------------|--------|----------------------------|------------|
| `proposal_key` * | string | Renegotiation proposal key | uuid key   |  

## Response

STATUS 200

Response Body

```json
{

}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Consult a renegotiation

URL: /en/documentation/renegociacao/consultar_uma_renegociacao

## Request

ENDPOINT /renegotiation/proposal/ PROPOSAL-KEY
METHOD GET

### Path params

| Field            | Type   | Description                | Characters |
|------------------|--------|----------------------------|------------|   
| `proposal_key` * | string | Renegotiation proposal key | uuid key   |
 

 ## Response

STATUS 200

Response Body

```json
{
  "proposal_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "contract_number": "ABCD/1",
  "proposal_status": "pending_payment",
  "amortization_type": "installment_payment",
  "discount_percentage": 0.2,
  "payment_amount": 240,
  "requester_name": "Requester",
  "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "issuer_name": "issuer",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "issuer_document_number": "98765432100",
  "payment_type": "bank_slip",
  "payment": {
    "digitable_line": "",
    "qr_code_url": {},
    "qr_code_key": "",
    "bank_slip_key": "",
    "paid_method_type": null
  },
  "affected_installments": [
    {
      "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88",
      "due_date": "2022-05-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    },
    {
      "installment_key": "6597a073-ea7a-4447-b250-f4d3f07b0b74",
      "due_date": "2022-06-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18900",
      "due_date": "2022-07-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    }
  ],
  "remaining_installments": [
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18903",
      "due_date": "2022-08-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18904",
      "due_date": "2022-09-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18905",
      "due_date": "2022-10-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    }
  ]
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Renegotiation Creation

URL: /en/documentation/renegociacao/criacao_de_uma_renegociacao

## Request

ENDPOINT /renegotiation/proposal
METHOD POST

Request Body

**Using installment keys**

```json
{
  "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
  "payment_type": "bank_slip",
  "amortization_type": "installment_payment",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "discount_percentage": 0.2,
  "discount_amount": 100,
  "request_control_key": "3571e292-3a83-4011-904d-20ee963022ef",
  "installments": [
    {
      "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88"
    },
    {
      "installment_key": "0ff87136-b084-44fb-8fc2-d2e3beed483b"
    },
    {
      "installment_key": "e4101c6a-51b3-435f-a2b7-4a65a005cc15"
    }
  ]
}
```

**Using number of installments**

```json
{ 
  "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
  "payment_type": "bank_slip",
  "amortization_type": "first_installments",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "discount_percentage": 0.2,
  "discount_amount": 100,
  "request_control_key": "3571e292-3a83-4011-904d-20ee963022ef",
  "number_of_installments": 4
}
```

**Using final value**

```json
{ 
  "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
  "payment_type": "bank_slip",
  "amortization_type": "first_installments",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "discount_percentage": 0.2,
  "discount_amount": 100,
  "request_control_key": "3571e292-3a83-4011-904d-20ee963022ef",
  "payment_amount": 900
}
```

:::warning Warning
 The `discount_amount` and `discount_percentage` may **NOT** be used simultaneously.
:::

### Body Params

| Field                 | Type             | Description                                         | Characters                                        |
|-----------------------|------------------|-----------------------------------------------------|---------------------------------------------------|  
| `contract_number`     | string           | Contract Number                                     | 10                                                |
| `amortization_type`   | string           | Amortization Type                                   | **[Enumerators](#enumerators amortization_type)** |
| `reference_date`      | string           | Renegotiation reference date                        | 10                                                |
| `proposal_due_date`   | string           | Renegotiation proposal due date                     | 10                                                |
| `discount_percentage` | string           | Percentual discount added on installment face value | 10                                                |
| `payment_type`        | string           | Payment type                                        | **[Enumerators](#enumeradores-payment_type)**     |
| `installments`        | array of objects | Renegotiated installments                           | **[Installments Object](#installments-object)**   |

### Installments Object

| Field             | Type   | Description                  | Characters |
|-------------------|--------|------------------------------|------------|
| `installment_key` | string | Renegotiated installment key | uuid key   |

### Enumerators amortization_type

| Field               | Description                    | 
|---------------------|--------------------------------|
| installment_payment | Installment payment enumerator | 

### Enumeradores payment_type

| Field    | Description      | 
|----------|------------------|
| banklisp | Bankslip Payment | 
| manual   | Manual payment   | 
| pix      | Pix Payment      | 

## Response

STATUS 200

Response Body

```json
{
  "proposal_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "contract_number": "ABCD/1",
  "proposal_status": "pending_payment",
  "amortization_type": "installment_payment",
  "discount_percentage": 0.2,
  "payment_amount": 240,
  "requester_name": "Requester",
  "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "issuer_name": "issuer",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "issuer_document_number": "98765432100",
  "payment_type": "bank_slip",
  "payment": {
    "digitable_line": "",
    "qr_code_url": {},
    "qr_code_key": "",
    "bank_slip_key": "",
    "paid_method_type": null
  },
  "affected_installments": [
    {
      "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88",
      "due_date": "2022-05-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    },
    {
      "installment_key": "6597a073-ea7a-4447-b250-f4d3f07b0b74",
      "due_date": "2022-06-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18900",
      "due_date": "2022-07-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    }
  ],
  "remaining_installments": [
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18903",
      "due_date": "2022-08-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18904",
      "due_date": "2022-09-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18905",
      "due_date": "2022-10-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    }
  ]
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# List renegotiations

URL: /en/documentation/renegociacao/listar_renegociacoes

## Request

ENDPOINT /renegotiation/proposal
METHOD GET

### Query Params

| Field                    | Type   | Description             | Characters |
|--------------------------|--------|-------------------------|------------|   
| `proposal_status`        | string | Proposal current status | 10         |
| `contract_number`        | string | Contract Number         | 10         |
| `issuer_document_number` | string | Issuer document number  | 10         |

 ## Response

STATUS 200

Response Body

```json
{
  "data": [],
  "pagination": {
    "current_page": 1,
    "next_page": 2,
    "rows_per_page": 30,
    "total_pages": 5,
    "total_rows": 140
  }
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Renegotiation Payment

URL: /en/documentation/renegociacao/pagamento_renegociacao

## Webhooks:

WEBHOOK_TYPE renegotiation.proposal
STATUS paid

#### paid_method_type Enumerators

| Enumerator                   | Description                                   |
|------------------------------|-----------------------------------------------|
| **bank_slip**                | Bank slip payment                             |
| **pix**                      | PIX payment                                   |

#### Renegotiation payment webhook example

Webhook Body

```json
{
	"webhook_type": "renegotiation.proposal",
	"key": "\<PROPOSAL-KEY\>",
	"event_datetime": "\<DATA E HORA DO ENVIO DO WEBHOOK\>",
	"status": "paid",
    "data": {
        "paid_method_type": "<METODO DE PAGAMENTO>",
        "paid_in": {
            "code_number": "<CODIGO DO BANCO LIQUIDANTE>", 
            "ispb": "<ISPB DO BANCO LIQUIDANTE>", 
            "name": "<NOME DO BANCO LIQUIDANTE>"
        }
    }
}
```

#### Payment data of installment paid through renegotiation

Webhook Body

```json
{
    "renegotiation_proposal_key": "806fa827-d1c4-4e5d-bf24-7b317fbbff15",
    "paid_in": {
        "ispb": "18236120",
        "name": "NU PAGAMENTOS - IP",
        "code_number": 260
    },
    "resource_account_key": "8517eb4e-ddce-457b-9e39-194213e53691"
}
```

---

# Batch Renegotiation

URL: /en/documentation/renegociacao/renegociacao_em_lote

:::caution ATTENTION
Batch renegotiation can only be created with operations from the same issuer and same integration key.
:::

:::caution ATTENTION
There is a limit of 50 operations for each batch renegotiation.
:::

## 1. Simulate a batch renegotiation

### Request

ENDPOINT /renegotiation/batch_proposal_simulation
METHOD POST

Request Body

```json
{
    "amortization_type": "installment_payment",
    "reference_date": "2022-07-20",
    "discount_percentage": 0.0,
    "operations": [
      {
        "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
        "installments": [{
          "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88"
        }]
      },
      {
        "debt_key": "2cbfb9b1-1gdb-5g8d-9967-b338e5eb83g9",
        "installments": [{
          "installment_key": "2ef25ed8-7124-44f5-9e3d-1d1a7196166e"
        }]
      }
  ]
}
```

### Response

Response Body

```json
{
  "amortization_type": "installment_payment",
  "discount_percentage": 0.0,
  "discount_amount": 0.0,
  "payment_amount": 240,
  "requester_name": "Requester",
  "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "issuer_name": "issuer",
  "reference_date": "2022-07-20",
  "issuer_document_number": "98765432100",
  "operations": [
    {
      "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
      "payment_amount": 100,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125,
          "present_amount": 100,
          "paid_amount": 100
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "7ac54a3e-fd11-46b2-b811-4c7d6d158fd5",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    },
     {
      "debt_key": "2cbfb9b1-1gdb-5g8d-9967-b338e5eb83g9",
      "payment_amount": 140,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "2ef25ed8-7124-44f5-9e3d-1d1a7196166e",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 200,
          "present_amount": 140,
          "paid_amount": 140
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18907",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    }
  ]
}
```

### Discount fields

Adding one of these fields to the request allows you to define a percentage or absolute discount value when creating or simulating the renegotiation proposal.

Percentage discount

```json
{
  "discount_percentage": 0.5
}
```

Absolute discount

```json
{
  "discount_amount": 200
}
```

## 2. Create a batch renegotiation

:::caution ATTENTION
The field 'request_control_key' is free and optional and is intended to ensure request uniqueness.
:::

### Request

ENDPOINT /renegotiation/batch_proposal
METHOD POST

Request Body

```json
{
    "amortization_type": "installment_payment",
    "reference_date": "2022-07-20",
    "proposal_due_date": "2022-07-20",
    "discount_percentage": 0.0,
    "payment_type": "bank_slip",
    "request_control_key": "4f75374c-e02f-4459-bddc-b9a7a0c9b0f3",
    "operations": [
      {
        "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
        "installments": [{
          "installment_key": "767f6ce0-add7-4334-a843-0e82cd1e7360"
        }]
      },
      {
        "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
        "installments": [{
          "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e89"
        }]
      }
  ]
}
```

:::warning Attention
The fields `discount_amount` and `discount_percentage` **CANNOT** be sent together in the same payload.
:::

### Body Params

| Field                 | Type | Description                                                                                                                         | Characters                                                            |
|-----------------------|---|-----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|  
| `debt_key`            | string | Unique key of the credit operation within QI Tech.                                                                                  | UUID                                                                  |
| `amortization_type`   | string | Amortization type.                                                                                                              | **[Amortization Type Enumerators](#amortization-type-enumerators)** |
| `reference_date`      | string | Reference date to which the present value of the renegotiation will be calculated (must be D+1).                                           | 10                                                                    |
| `proposal_due_date`   | string | Due date of the renegotiation proposal.                                                                                   | 10                                                                    |
| `payment_type`        | string | Payment type.                                                                                                                | **[Payment Type Enumerators](#payment-type-enumerators)**           |
| `discount_percentage` | float | Discount percentage that will be calculated on the present value of the renegotiation ((1 - discount percentage) * Present Value). | 10                                                                    |
| `discount_amount`     | float | Discount amount that will be applied to the present value of the renegotiation (Present Value - Gross Discounted Value).             | 10                                                                    |
| `installments`        | array of objects | Renegotiated installments.                                                                                                            | **[Installments Object](#installments-object)**                       |

### Amortization Type Enumerators

| Field                           | Description                                                                                |
|---------------------------------|------------------------------------------------------------------------------------------| 
| **installment_payment**         | A renegotiation will be created for the payment of distinct installments sent in the payload. <br/><br/> To use this amortization type, it is necessary to pass the `installment_key` of the installment. |
| **overdue_installment_payment** | A renegotiation will be created directed to the payment of overdue installments.<br/><br/> To use this amortization type, it is necessary to pass the `installment_key` of the installment.          |

### Payment Type Enumerators

| Field    | Description                                                     | 
|----------|---------------------------------------------------------------|
| bankslip | Payment via bank slip (generates bank slip payment and PIX) | 
| pix      | Payment via PIX (generates only PIX)     |
| manual   | Payment made manually (does not generate payment method) | 

### Installments Object

| Field | Type | Description | Characters |
|---|---|---|---|
| `installment_key` | string | key of the installment to be renegotiated | uuid key |

### Response

Response Body

```json
{
  "batch_proposal_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "batch_proposal_status": "pending_payment",
  "amortization_type": "installment_payment",
  "discount_percentage": 0.0,
  "discount_amount": 0.0,
  "payment_amount": 240,
  "requester_name": "Requester",
  "requester_key": "0193d113-9abd-4a13-8edb-2d94c2fdb70b",
  "issuer_name": "issuer",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "issuer_document_number": "98765432100",
  "payment_type": "bank_slip",
  "request_control_key": "4f75374c-e02f-4459-bddc-b9a7a0c9b0f3",
  "payment": {
    "digitable_line": "",
    "qr_code_url": "",
    "qr_code_key": "",
    "bank_slip_key": "",
    "paid_method_type": null
  },
  "operations": [
    {
      "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
      "payment_amount": 100,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "767f6ce0-add7-4334-a843-0e82cd1e7360",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125,
          "present_amount": 100,
          "paid_amount": 100
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "6807c8ee-8deb-40da-9b39-653d64ee8db7",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    },
     {
      "debt_key": "2cbfb9b1-1gdb-5g8d-9967-b338e5eb83g9",
      "payment_amount": 140,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e89",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 200,
          "present_amount": 140,
          "paid_amount": 140
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18907",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    }
  ]
}
```

## 3. List batch renegotiations

### Path params

| Field | Type | Description | Characters |
|---|---|---|---|   
| `batch_proposal_status` * | string |  Batch renegotiation proposal status. | - |
| `issuer_document_number` * | string |  Issuer document number | - |
| `request_control_key` * | string |  Requester identification key | - |
 

### Request

ENDPOINT /renegotiation/batch_proposal
METHOD GET

Response Body

```json
{
    "data": [
        {
            "batch_proposal_key": "7eba74fb-e893-40ac-91bb-9a9d8f8108d7",
            "request_control_key": "cb55f099-d7cf-4b0a-9ddb-8e3ac3fefe8e",
            "batch_proposal_status": "pending_payment",
            "amortization_type": "installment_payment",
            "discount_percentage": 0,
            "discount_amount": 0.0,
            "payment_amount": 240,
            "requester_name": "Requester",
            "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
            "issuer_name": "issuer",
            "reference_date": "2022-07-25",
            "proposal_due_date": "2022-07-25",
            "issuer_document_number": "98765432100",
            "payment_type": "bank_slip"
        },
        {
            "batch_proposal_key": "272d1b0f-c06d-47c0-943b-812609ff2e6f",
            "request_control_key": "2ef25ed8-7124-44f5-9e3d-1d1a7196166e",
            "batch_proposal_status": "pending_payment",
            "amortization_type": "installment_payment",
            "discount_percentage": 0,
            "discount_amount": 0.0,
            "payment_amount": 240,
            "requester_name": "Requester",
            "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
            "issuer_name": "issuer",
            "reference_date": "2022-07-20",
            "proposal_due_date": "2022-07-20",
            "issuer_document_number": "98765432100",
            "payment_type": "bank_slip"
        }
    ],
    "pagination": {
        "current_page": 1,
        "next_page": 2,
        "rows_per_page": 2,
        "total_pages": 5,
        "total_rows": 140
    }
}
```

## 4. Query a batch renegotiation

### Request

ENDPOINT /renegotiation/batch_proposal/BATCH-PROPOSAL-KEY
METHOD GET

Response Body

```json
{
  "batch_proposal_key": "7ac54a3e-fd11-46b2-b811-4c7d6d158fd5",
  "request_control_key": "61905b8b-3ed2-46bc-8e9c-a5e99ceaea37",
  "batch_proposal_status": "pending_payment",
  "amortization_type": "installment_payment",
  "discount_percentage": 0.0,
  "discount_amount": 0.0,
  "payment_amount": 240,
  "requester_name": "Requester",
  "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "issuer_name": "issuer",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "issuer_document_number": "98765432100",
  "payment_type": "bank_slip",
  "payment": {
    "digitable_line": "",
    "qr_code_url": "",
    "qr_code_key": "",
    "bank_slip_key": "",
    "paid_method_type": null
  },
  "operations": [
    {
      "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
      "payment_amount": 100,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18903",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125,
          "present_amount": 100,
          "paid_amount": 100
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "34f81236-e24a-4788-88e0-86cd697c36b7",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    },
     {
      "debt_key": "2cbfb9b1-1gdb-5g8d-9967-b338e5eb83g9",
      "payment_amount": 140,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e89",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 200,
          "present_amount": 140,
          "paid_amount": 140
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "44cad2ae-60e9-4eb8-bb2a-b37e9557873f",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    }
  ]
}
```

### Request

ENDPOINT /renegotiation/batch_proposal/request_control_key/REQUEST-CONTROL-KEY
METHOD GET

Response Body

```json
{
  "batch_proposal_key": "7ac54a3e-fd11-46b2-b811-4c7d6d158fd5",
  "request_control_key": "61905b8b-3ed2-46bc-8e9c-a5e99ceaea37",
  "batch_proposal_status": "pending_payment",
  "amortization_type": "installment_payment",
  "discount_percentage": 0.0,
  "discount_amount": 0.0,
  "payment_amount": 240,
  "requester_name": "Requester",
  "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "issuer_name": "issuer",
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "issuer_document_number": "98765432100",
  "payment_type": "bank_slip",
  "payment": {
    "digitable_line": "",
    "qr_code_url": "",
    "qr_code_key": "",
    "bank_slip_key": "",
    "paid_method_type": null
  },
  "operations": [
    {
      "debt_key": "1baea8a0-0fca-4f7c-8857-a227d4da72f8",
      "payment_amount": 100,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18903",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125,
          "present_amount": 100,
          "paid_amount": 100
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "34f81236-e24a-4788-88e0-86cd697c36b7",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    },
     {
      "debt_key": "2cbfb9b1-1gdb-5g8d-9967-b338e5eb83g9",
      "payment_amount": 140,
      "discount_amount": 0,
      "affected_installments": [
        {
          "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e89",
          "due_date": "2022-05-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 200,
          "present_amount": 140,
          "paid_amount": 140
        }
      ],
      "remaining_installments": [
        {
          "installment_key": "44cad2ae-60e9-4eb8-bb2a-b37e9557873f",
          "due_date": "2022-08-01",
          "principal_amount": 100,
          "interest_amount": 20,
          "fine_amount": 5,
          "total_amount": 125
        }
      ]
    }
  ]
}
```

## 5. Cancel a batch renegotiation

ENDPOINT /renegotiation/batch_proposal/BATCH-PROPOSAL-KEY
METHOD DELETE

### Response

ENDPOINT /renegotiation/batch_proposal/BATCH-PROPOSAL-KEY
METHOD DELETE
HTTP STATUS 204

Response Body

```json
    {}
```

## 6. Webhooks

## 6.1. Batch renegotiation payment webhook

Webhook Body

```json
{
    "webhook_type": "renegotiation.batch_proposal",
    "key": "\<BATCH-PROPOSAL-KEY\>",
    "event_datetime": "\<DATA E HORA DO ENVIO DO WEBHOOK\>",
    "status": "paid",
    "data": {
        "paid_method_type": "<METODO DE PAGAMENTO>",
        "paid_in": {
            "code_number": "<CODIGO DO BANCO LIQUIDANTE>",
            "ispb": "<ISPB DO BANCO LIQUIDANTE>",
            "name": "<NOME DO BANCO LIQUIDANTE>"
        }
    }
}
```

## 6.2. Batch renegotiation rejection webhook

:::caution ATTENTION
A batch renegotiation can be rejected due to payment deadline expiration or by payment of an installment outside the renegotiation.
:::

Webhook Body

```json
{
    "webhook_type": "renegotiation.batch_proposal",
    "key": "\<BATCH-PROPOSAL-KEY\>",
    "event_datetime": "\<DATA E HORA DO ENVIO DO WEBHOOK\>",
    "status": "rejected",
    "data": {}
}
```

## 6.3. Example of payment data for installment paid through batch renegotiation

Webhook Body

```json
{
    "batch_renegotiation_proposal_key": "f9addba2-ec91-41bf-a150-c59eb1c3fbef",
    "paid_in": {
        "ispb": "18236120",
        "name": "NU PAGAMENTOS - IP",
        "code_number": 260
    },
    "resource_account_key": "ea44b9f2-ad00-4896-b8a3-b1a3da28a72f"
}
```

---

# Renegotiation simulation

URL: /en/documentation/renegociacao/simulacao_de_uma_renegociacao

## Request

ENDPOINT /renegotiation/simulation
METHOD POST

Request Body

```json
{
	"contract_number": "ABCD/1",
	"amortization_type": "installment_payment",
	"reference_date": "2022-07-20",
	"installments": [{
		"installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88"
	}],
	"discount_percentage": 0.2,
	"amount_percentage": 100
}

```

### Body Params 

| Field                 | Type             | Description                                             | Characters                                                          |
|-----------------------|------------------|---------------------------------------------------------|---------------------------------------------------------------------|
| `contract_number`     | string           | Contract number                                         | 10                                                                  |
| `amortization_type`   | enum             | Amortization Type                                       | **[Enumerators](#enumeradores-amortization_type)**                  |
| `reference_date`      | date             | Reference date                                          | 10                                                                  |
| `installments`        | array of objects | Renegotiated installments                               | **[Installments array of objects](#installments-array-of-objects)** |
| `discount_percentage` | float            | Percentual discount added on installment present values | 10                                                                  |
| `amount_percentage`   | float            | Monetary discount added on installment present values   | 10                                                                  |

### Installments array of objects

| Field             | Type   | Description                  | Characters |
|-------------------|--------|------------------------------|------------| 
| `installment_key` | string | renegociated installment key | uuid key   |

## Response

STATUS 200

Response Body

```json
{
  "contract_number": "ABCD/1",
  "discount_percentage": 0.2,
  "payment_amount": 240,
  "reference_date": "2022-07-20",
  "proposal_due_date": "2022-07-20",
  "requester_name": "Requester",
  "amortization_type": "installment_payment",
  "requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
  "issuer_name": "issuer",
  "issuer_document_number": "98765432100",
  "affected_installments": [
    {
      "installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88",
      "due_date": "2022-05-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    },
    {
      "installment_key": "6597a073-ea7a-4447-b250-f4d3f07b0b74",
      "due_date": "2022-06-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18900",
      "due_date": "2022-07-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125,
      "present_amount": 100,
      "paid_amount": 80
    }
  ],
  "remaining_installments": [
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18903",
      "due_date": "2022-08-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18904",
      "due_date": "2022-09-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    },
    {
      "installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18905",
      "due_date": "2022-10-01",
      "principal_amount": 100,
      "interest_amount": 20,
      "fine_amount": 5,
      "total_amount": 125
    }
  ]
}
```

STATUS 400

Response Body

```json
{
  "data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
```

---

# Document inquiry

URL: /en/documentation/upload_de_documentos/consulta_documents

To query a document uploaded to QI Tech, you can make a request with the previously obtained DOCUMENT_KEY.

### Request

ENDPOINT /document/[document_key]/url
METHOD GET

### Path Params

| Field          | Description                            |
|--------------- |----------------------------------------|
| `document_key` | Unique document key                    |

:::caution Attention
The document URL will be generated with a 10-minute expiration period.
:::

### Response

STATUS 200

Response Body

```json
{
	"document_url": "url_expirável",
	"signed_document_url": "url_expirável",
	"expiration_datetime": "2024-05-01T01:00:00.000Z"
}
```

| Field 				| Type   | Description                                                                                               | 
|-----------------------|--------|---------------------------------------------------------------------------------------------------------|
| `document_url`* 		| string | Expirable document URL
 original.                                                                    |
| `signed_document_url` | string | Expirable URL of the signed document if it exists. If it does not exist, this field will not be returned..|
| `expiration_datetime`*| string | Date and time when the URLs will expire.                                            |

---

# Documents upload

URL: /en/documentation/upload_de_documentos/

---

The call must be authenticated following the pattern described in section [1.1.3. Authentication Test](../primeiros_passos/teste_de_autenticacao). Authentication Test. With the following caveats:

- The value of the md5_hash variable (md5_body for v1 of our authentication) sent in the header signature must be the MD5 of the binary file being sent.
- The binary file must be sent in the request body as FormData using the string "file" as the key and the file to be sent as the value. (This content is not encrypted)
- The response body of this call will return a GUID, which is the document identifier (referred to as DOCUMENT_KEY from now on) and must be stored for future use.

---

## Request

ENDPOINT /upload
METHOD POST

Response Body

```json
{
  "document_key": "cfbc8469-89ea-4a80-9f64-ba7b1566c68b",
  "document_md5": "cd451103fa512frc98ce684d3896698c"
}
```

:::caution Attention
It is crucial to save the **document_key**, obtained from the response. This key is necessary for retrieving or referencing the document in future interactions.
:::

## Call Example

Example 
Call for Uploading an Image from a URL

**Python**

```python

import jwt
import hashlib
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
import json
from datetime import datetime

BASE_URL = "https://api-auth.sandbox.qitech.app"
API_KEY = "4c268c0a-53ff-429b-92b6-47ef98a6d89a" # This key is an example, please use your own
CLIENT_PRIVATE_KEY = ''''
-----BEGIN EC PRIVATE KEY-----
MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv
-----END EC PRIVATE KEY----- 
''' # This key is an example, please use your own

def get_document(url):
    try:
        response = requests.get(url)
        return response.content
    except Exception as error:
        print("Error fetching document:", error)
        raise

def upload_document(array_buffer):
    endpoint = "/upload"
    method = "POST"
    timestamp = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z"
    md5_hash = hashlib.md5(array_buffer).hexdigest()

    jwt_header = {
        "typ": "JWT",
        "alg": "ES512",
    }

    jwt_body = {
        "payload_md5": md5_hash,
        "timestamp": timestamp,
        "method": method,
        "uri": endpoint,
    }

    encoded_header_token = jwt.encode(jwt_body, CLIENT_PRIVATE_KEY, algorithm="ES512", headers=jwt_header)

    signed_header = {
        "Authorization": encoded_header_token,
        "API-CLIENT-KEY": API_KEY,
        "Content-Type": "multipart/form-data",
    }

    url = f"{BASE_URL}{endpoint}"
    multipart_data = MultipartEncoder(
        fields={'file': ('image.jpeg', array_buffer, 'image/jpeg')}
    )
    signed_header['Content-Type'] = multipart_data.content_type

    try:
        response = requests.post(url, headers=signed_header, data=multipart_data)
        response_data = response.json()
        document_key = response_data.get('document_key')
        print(f'Response data is: {response_data} and document_key is: {document_key}')
        return document_key
    except Exception as error:
        print('Error:', error)
        raise

def main():
    file_url = "{FILE_URL}"

    document_buffer = get_document(file_url)

    document_key = upload_document(document_buffer)

    print("Document key is", document_key)

if __name__ == "__main__":
    main()

```
  

**Node.js**

```js
const jwt = require('jsonwebtoken')
const crypto = require('crypto')
const axios = require('axios')
const FormData = require('form-data')
const fs = require('fs')
const fetch = require('node-fetch')

async function getDocument(url) {
  try {
    const response = await axios.get(url, { responseType: 'arraybuffer' })
    return response.data
  } catch (error) {
    console.error('Error fetching document:', error)
    throw error
  }
}

async function uploadDocument(arrayBuffer) {
  const base_url = "[https://api-auth.sandbox.qitech.app](https://api-auth.sandbox.qitech.app)"
  const endpoint = '/upload'
  const method = 'POST'
  const timestamp = new Date().toISOString()
  const md5_hash = crypto.createHash('md5').update(arrayBuffer).digest('hex')
  const client_private_key = `-----BEGIN EC PRIVATE KEY-----
    MIHbAgEBBEHh1hIeOPE5XNNhn6bxRAmVswsPZ0wZCmzVvP8Tl/LZK9ofVmRVGzll
    srU1uezJEyHKYdOHrE2p52xUj+pHzjJvb6AHBgUrgQQAI6GBiQOBhgAEAAofUz1J
    hBSOyGHLsnV9Sz0DSWmhl7U+ljqbfa8PKVFWSV3w16I1v2zME5/UzUhHn1gWsjnv
    7/ekcLLAQbvqMPNXAfjIhFXLAPzqbB9iCuVua1v0Vgy52rBemOWrJka/Ws2bnKR8
    h1N1OxOYeYr6C2jqMygBLktKMAs+282CEiEb4bIv
    -----END EC PRIVATE KEY-----`; // This key is an example, please use your own
  const api_key = '4c268c0a-53ff-429b-92b6-47ef98a6d89a' // This key is an example, please use your own

  try {
    const jwt_header = {
      typ: 'JWT',
      alg: 'ES512',
    }

    const jwt_body = {
      payload_md5: md5_hash,
      timestamp: timestamp,
      method: method,
      uri: endpoint,
    }

    const encoded_header_token = jwt.sign(jwt_body, client_private_key, {
      algorithm: 'ES512',
      header: jwt_header,
    })

    const signed_header = {
      AUTHORIZATION: encoded_header_token,
      'API-CLIENT-KEY': api_key,
    }

    const url = `${base_url}${endpoint}`
    const formData = new FormData()
    formData.append('file', Buffer.from(arrayBuffer), {
      filename: 'image.jpeg',
    })

    const response = await fetch(url, {
      method: 'POST',
      headers: {
        ...signed_header,
        ...formData.getHeaders(),
      },
      body: formData,
    })

    if (!response.ok) {
      const errorText = await response.text()
      console.log(`Error: ${response.status} ${response.statusText}`, errorText)
      return
    }

    const data = await response.json()
    console.log('Response data is: ', data)
    return data.document_key
    
  } catch (error) {
    console.error('Error:', error)
  }
}

async function main() {
  const fileUrl = '<URL_LINK_TO_DOCUMENT_IMAGE>'
  const documentBuffer = await getDocument(fileUrl)
  const documentKey = await uploadDocument(documentBuffer)

  console.log('Document key is: ' + documentKey)
}

main()
```

- Note: The example above uses the [node-fetch](https://www.npmjs.com/package/node-fetch) library to make the call, but you can use the library of your choice. The important thing is that the call is made with the POST method, with the `Content-Type` header set to `multipart/form-data`, and the body is a FormData with the key `file` and the value as the binary of the file to be sent.

:::warning Warning

The 'Axios' library has a bug that causes the FormData to be sent empty. The issue can be seen in the [GitHub repository](https://github.com/axios/axios/issues/5986). If this problem has not yet been resolved at the time of your integration, we suggest using the 'node-fetch' library to make this call.
:::

---

# Debt Webhooks

URL: /en/documentation/webhooks/dividas

:::info Information
Our webhook response timeout is 10 seconds.
:::

:::danger Attention!
QI Tech's webhooks must not be mapped in a restricted manner
Additional fields may be included in our API webhook payloads.
:::

:::info Reenvio de Webhooks
You may consult and resend webhooks following the detailed guide [Resending Webhooks](/documentation/notificacoes/reenvio_de_notificacoes)
:::

## Operation creation Webhook 

Response Body

```json
{
    "key": "871059bd-4014-41ad-82b4-28275ff0e67b",
    "data": {
        "entry": null,
        "borrower": {
            "name": "marcos antonio",
            "document_number": "33205493087"
        },
        "contract": {
            "urls": ["https://qitech.com.br/"],
            "number": "0000000000/SDM",
            "signers": [{
                "signer_name": "marcos antonio ",
                "signer_role": "issuer",
                "signer_email": "teste@teste.com",
                "signature_url": "https://qitech.com.br/",
                "signer_external_key": "c446eaa1-04ec-429c-97b0-2ef8ea583c44",
                "signer_document_number": "75305593972"
            }],
            "external_contract_key": "c446eaa1-04ec-429c-97b0-2ef8ea583c44"
        },
        "collaterals": [],
        "iof_charge_method": "financed",
        "disbursement_options": [{
            "cet": "0,6200%",
            "base_iof": 8.9496686,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-03-01",
                "workdays": 395,
                "tax_amount": 8.9496686,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 580,
                "due_principal": 299.02,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 24.1,
                "business_due_date": "2024-04-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.02
            }],
            "issue_amount": 299.02,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.136276,
            "assignment_amount": 299.02,
            "disbursement_date": "2022-09-29",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.43,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 24.1,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.9508658,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 394,
                "tax_amount": 8.9508658,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 579,
                "due_principal": 299.06,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 24.06,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.06
            }],
            "issue_amount": 299.06,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.136428,
            "assignment_amount": 299.06,
            "disbursement_date": "2022-09-30",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.47,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 24.06,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.952063,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 394,
                "tax_amount": 8.952063,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 578,
                "due_principal": 299.1,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 24.02,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.1
            }],
            "issue_amount": 299.1,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.13658,
            "assignment_amount": 299.1,
            "disbursement_date": "2022-10-01",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.51,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 24.02,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.9532602,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 394,
                "tax_amount": 8.9532602,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 577,
                "due_principal": 299.14,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 23.98,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.14
            }],
            "issue_amount": 299.14,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.136732,
            "assignment_amount": 299.14,
            "disbursement_date": "2022-10-02",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.55,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 23.98,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.9544574,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 393,
                "tax_amount": 8.9544574,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 576,
                "due_principal": 299.18,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 23.94,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.18
            }],
            "issue_amount": 299.18,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.136884,
            "assignment_amount": 299.18,
            "disbursement_date": "2022-10-03",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.59,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 23.94,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.9556546,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 392,
                "tax_amount": 8.9556546,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 575,
                "due_principal": 299.22,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 23.9,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.22
            }],
            "issue_amount": 299.22,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.137036,
            "assignment_amount": 299.22,
            "disbursement_date": "2022-10-04",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.63,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 23.9,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.9568518,
            "total_iof": 10.09,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 391,
                "tax_amount": 8.9568518,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 574,
                "due_principal": 299.26,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 23.86,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.26
            }],
            "issue_amount": 299.26,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.137188,
            "assignment_amount": 299.26,
            "disbursement_date": "2022-10-05",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.67,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 23.86,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }, {
            "cet": "0,6200%",
            "base_iof": 8.958049,
            "total_iof": 10.1,
            "annual_cet": "7,6990%",
            "installments": [{
                "due_date": "2024-05-01",
                "workdays": 390,
                "tax_amount": 8.958049,
                "fine_amount": null,
                "due_interest": 0,
                "has_interest": true,
                "total_amount": 323.12,
                "calendar_days": 573,
                "due_principal": 299.3,
                "additional_costs": [],
                "installment_type": null,
                "pre_fixed_amount": 23.82,
                "business_due_date": "2024-05-02",
                "post_fixed_amount": null,
                "installment_number": 1,
                "installment_status": null,
                "principal_amortization_amount": 299.3
            }],
            "issue_amount": 299.3,
            "contract_fees": [{
                "fee_type": "tac",
                "fee_amount": 1.5
            }],
            "additional_iof": 1.13734,
            "assignment_amount": 299.3,
            "disbursement_date": "2022-10-06",
            "contract_fee_amount": 1.5,
            "disbursed_issue_amount": 287.7,
            "external_contract_fees": [],
            "number_of_installments": null,
            "total_pre_fixed_amount": 23.82,
            "external_contract_fee_amount": 0,
            "net_external_contract_fee_amount": 0
        }],
        "prefixed_interest_rate": {
            "created_at": null,
            "daily_rate": 0.00013368,
            "annual_rate": 0.05,
            "monthly_rate": 0.00407412,
            "interest_base": "calendar_days_365"
        },
        "post_fixed_interest_base": "workdays",
        "post_fixed_interest_rate": 1,
        "requester_identifier_key": "57f8e1ce-1080-4d0d-a195-89709b961561"
    },
    "status": "waiting_signature",
    "webhook_type": "debt",
    "event_datetime": "2022-09-29 20:00:54"
}

```

## Disbursement Webhook.

Response Body

```json
{
    "key": "871059bd-4014-41ad-82b4-28275ff0e67b",
    "data": {
        "installments": [{
            "due_date": "2022-09-29",
            "qr_code_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "qr_code_url": "https://qitech.com.br/",
            "bank_slip_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "digitable_line": "32990001031000699920446000000201991230000019896"
        }, {
            "due_date": "2022-10-31",
            "qr_code_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "qr_code_url": "https://qitech.com.br/",
            "bank_slip_key": "243f9441-872a-4d64-886c-2f9724c36f2e",
            "digitable_line": "32990001031000699920447000000209191550000019896"
        }, {
            "due_date": "2022-11-29",
            "qr_code_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "qr_code_url": "https://qitech.com.br/",
            "bank_slip_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "digitable_line": "32990001031000699920448000000207891840000019896"
        }, {
            "due_date": "2022-12-29",
            "qr_code_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/cf7d2d2e-003a-4296-9daf-350864d282245204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63047335",
            "bank_slip_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "digitable_line": "32990001031000699920449000000205892140000019896"
        }, {
            "due_date": "2023-01-30",
            "qr_code_key": "e809ffca-ac2f-4a51-9f4f-df7ffc4de8e3",
            "qr_code_url": "https://qitech.com.br/",
            "bank_slip_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "digitable_line": "32990001031000699920450000000203792460000019892"
        }],
        "ted_receipt_list": [{
            "fee": 0,
            "url": "https://qitech.com.br/",
            "amount": 500,
            "origin": {
                "name": "QI SOCIEDADE DE CRÉDITO DIRETO S.A.",
                "type": "payment_account",
                "branch": "0001",
                "document": "0000000000000",
                "bank_code": "000",
                "account_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
                "branch_digit": null,
                "account_digit": "5",
                "account_branch": "0001",
                "account_number": "00002"
            },
            "timestamp": "2022-09-28T13:00:47",
            "description": "DESCRIPTION",
            "destination": {
                "name": "QI TECH",
                "type": "checking_account",
                "branch": "0000",
                "purpose": "Crédito PIX em Conta",
                "document": "000000000000000",
                "bank_ispb": "00000000",
                "branch_digit": null,
                "account_digit": "0",
                "account_number": "00000000"
            },
            "end_to_end_id": null,
            "transaction_key": "871059bd-4014-41ad-82b4-28275ff0e67b",
            "origin_transaction_key": null
        }],
        "requester_identifier_key": "57f8e1ce-1080-4d0d-a195-89709b961561"
    },
    "status": "disbursed",
    "webhook_type": "debt",
    "event_datetime": "2022-09-28 13:01:23"
}

```

## Operation cancelled Webhook.

Response Body

```json
{
     "webhook_type": "debt",
     "key":"27a099df-4688-43cb-87fa-515b1cf343a5",
     "event_datetime": "2022-09-27 07:03:49",
    "data": {
        "cancel_reason": "Operacao cancelada manualmente",
        "cancel_reason_enumerator": "manual"
    },
     "status":"canceled "
  }

```

## Debt settled Webhook.

Response Body

```json
{
    "key": "27a099df-4688-43cb-87fa-515b1cf343a5",
    "data": {
        "settlement_amount": 3429.38
    },
    "status": "settled",
    "webhook_type": "debt",
    "event_datetime": "2022-09-27 07:03:49"
}
```

----

### Cancel reasons

| Enumerator                  | Description                                                                   | 
|-----------------------------|-------------------------------------------------------------------------------|
| disbursing_error            | Operation cancelled due to disbursement error                         
| waiting_signature           | Operation cancelled due to awaiting signature                           
| is_portability              | Operation cancelled due to failed portability      
| not_collateral_constituted	 | Operation cancelled due to inability to constitute collateral            
| entry_not_paid              | Operation cancelled due to entry not being paid                         
| not_assigned                | Operation cancelled due to inability to assign         
| pix_max_retry               | Operation cancelled due to too many disbursement errors 
| lack_of_resource            | Operation cancelled due to lack of resource for disbursement                                      
| manual                      | Operation cancelled manually                                               
| kyc_not_accepted            | Operation cancelled due to KYC error                      
| not_collateral_fgts         | Operation cancelled due inability to constitute FGTS collateral                                       
| agencia_conta_invalida	     | Operation cancelled due error in disbursement agency or bank account                            
| invalid_account             | 	Operation cancelled due invalid bank account                     
| invalid_document_number	    | Operation cancelled due to error in document number                                
| unsupported_transaction	    | Operation cancelled due unsuported transaction account type                        
| bank_slip_payment	          | Operation cancelled due to bankslip error                 
| bank_slip_paid	             | Operation cancelled due to bankslip already being paid                                
| bank_slip_written_off	      | Operation cancelled due to bankslip being written off                        
| invalid_ispb	               | Operation cancelled due to invalid bank ISPB                                         
| rejected_payment            | 	Operation cancelled due rejected payment by receiving bank

---

# Risk management webhooks

URL: /en/documentation/webhooks/gestao_de_risco

The `risk_amount` represents the outstanding balance of operations that have not yet been **assigned** — i.e., the open portfolio exposure that remains under risk and consumes the available limit (`limit_amount`) for new issuances. As operations are assigned or settled, they stop contributing to the `risk_amount` and free up limit for new disbursements.

:::danger Disbursement rule
If `risk_amount + issue_amount > limit_amount`, the operation will not be disbursed.
:::

:::tip Enablement
Reach out to the QI Tech team so we can configure the delivery for you!
:::

## Risk update webhook

Sent periodically, **every hour**, with the update of the customer's accumulated risk value.

Response Body

```json
{
    "key": "b3a7e2c4-9d1f-4e8a-a456-2c3d4e5f6a7b",
    "data": {
        "risk_amount": 1500000,
        "limit_amount": 9000000,
        "reconciled_at": "2025-09-15T20:24:41"
    },
    "status": "completed",
    "webhook_type": "risk_management.risk_updated",
    "event_datetime": "2025-09-15T20:24:41Z"
}
```

## Limit update webhook

Sent whenever the customer's debt issuance limit is updated.

Response Body

```json
{
    "key": "c4b8f3d5-0e2a-5f9b-b567-3d4e5f6a7b8c",
    "data": {
        "risk_amount": 0,
        "limit_amount": 9000000,
        "reconciled_at": "2025-09-15T18:03:54"
    },
    "status": "completed",
    "webhook_type": "risk_management.limit_updated",
    "event_datetime": "2025-09-15T18:03:54Z"
}
```

## Definitions

### Callback object

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| **event_datetime** | string | Event date and time in ISO 8601 UTC format | Yes |
| **key** | string | Unique event key | Yes |
| **status** | string | Event status | Yes |
| **webhook_type** | string | Webhook type (`risk_management.risk_updated` or `risk_management.limit_updated`) | Yes |
| **data** | object | Risk management event-specific data | Yes |

### Data object

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| **risk_amount** | number | Outstanding balance of non-assigned operations — open portfolio exposure consuming the available limit | Yes |
| **limit_amount** | number | Total limit available for issuing new debts | Yes |
| **reconciled_at** | string | Date and time of the last reconciliation in ISO 8601 format | Yes |

---

# Overpayment webhooks

URL: /en/documentation/webhooks/indevidos

:::info Information
The timeout for our webhooks response is 5 seconds.
:::

:::danger Attention!
QI Tech webhooks should not be mapped in a restrictive way. 
Additional fields may be included in webhook payloads returned by our APIs.
:::

:::info Webhook Resending
You can check and resend webhooks by following the detailed instructions in the documentation: [Webhook Resending](/documentation/notificacoes/reenvio_de_notificacoes).
:::

## Introduction

This webhook is automatically triggered when QI Tech identifies and processes the return of an overpayment amount. After validation, the system performs the transfer via PIX to the borrower, using the disbursement account registered in the system. The event is sent only when the return is successfully completed.

## Overpayment refund webhook

Response Body

```json
{
    "callback": {
        "event_datetime": "2024-01-15T14:30:00.000Z",
        "key": "fb34e0ac-2c98-47e7-9040-406b8c3d80e7",
        "status": "refunded",
        "webhook_type": "laas.devolution.refund_receipt",
        "data": {
            "devolution_key": "fb34e0ac-2c98-47e7-9040-406b8c3d80e7",
            "devolution_amount": 150.75,
            "devolution_status": "refunded",
            "devolution_reason_description": "The payment arrived earlier than expected. The difference between the paid amount and the present value should be refund",
            "receipt_url": "https://storage.googleapis.com/receipts/devolution_receipt_12345.pdf",
            "document_key": "cd27a0c3-630d-4682-81b2-71b5b325bcde",
            "transacted_at": "2024-01-15T14:25:30.000Z"
        }
    }
}
```

## Definitions

### Callback object

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| **event_datetime** | string | Event date and time in ISO 8601 UTC format | Yes |
| **key** | string | Unique devolution key | Yes |
| **status** | string | Devolution status | Yes |
| **webhook_type** | string | Webhook type | Yes |
| **data** | object | Specific devolution data | Yes |

### Data object

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| **devolution_key** | string | Unique devolution key | Yes |
| **devolution_amount** | number | Devolution amount in reais | Yes |
| **devolution_status** | string | Current devolution status | Yes |
| **devolution_reason_description** | string | Description of the devolution reason | Yes |
| **receipt_url** | string | Devolution receipt URL | Yes |
| **document_key** | string | Related document key | Yes |
| **transacted_at** | string | Transaction date and time in ISO 8601 UTC format | Yes |

## Possible statuses

| Status | Description |
|--------|-------------|
| **refunded** | Devolution processed successfully |

## Usage example

When you receive this webhook, it means that a PIX refund has been processed successfully. You can:

1. Check the devolution status through the `devolution_status` field
2. Access the receipt through the URL provided in `receipt_url`
3. Identify the refunded amount through the `devolution_amount` field
4. Check the reason for the devolution through the `devolution_reason_description` field

---

# Installment payment webhooks

URL: /en/documentation/webhooks/pagamento_de_parcela

:::info Information
The timeout for our webhook responses is 10 seconds.
:::

:::danger Attention!
QI Tech webhooks should not be mapped in a restrictive manner. 
Additional fields may be included in the webhook payloads returned by our APIs.
:::

:::info Webhook Resending
You can check and resend webhooks by following the detailed instructions in the documentation: [Webhook Resending](/documentation/notificacoes/reenvio_de_notificacoes).
:::

----
### Example of paid installment webhook

```json
{
    "key": "4219cb7b-32b9-45d1-b19c-24fbca04ca02",
    "webhook_type": "laas.credit_operation.installment.payment",
    "event_datetime": "2026-01-14 04:08:30",
    "data": {
        "installment_key":"1234cb7b-3329-12d1-429c-24f84975ca02",
        "reference_date":"2026-02-13",
        "paid_at":"2026-02-13 20:38:07",
        "paid_method_type":"pix",
        "installment_status":"paid_early",
        "installment_payment_key":"2accee19-ed22-43f9-9573-3b6232658337",
        "paid_amount":567.73,
        "total_amount":567.73,
        "present_total_amount":567.73,
        "prefixed_interest_payment_amount":556.73948769,
        "principal_amortization_payment_amount":10.99051231,
        "resource_account_key":"422cee19-ed22-43f9-9573-3b6111658337",
        "batch_renegotiation_proposal_key":null,
        "renegotiation_proposal_key":null,
        "received_portability_key":null,
        "refinancing_credit_operation_key":null,
        "bank_slip_key":null,
        "pix_qrcode_key":"3b61ee19-ed22-6119-9573-3b6119573337",
        "paid_in":{
                "name": "ITAÚ UNIBANCO S.A.",
                "code_number": 341,
                "ispb": 60701190
            }
    },
}
```

## Appendix

### Field descriptions {#paid_method}

|Field                                  | Type              | Description     |
|-------------------------------------- |------             |-----          |
|key                                    |UUID               |debt identifier key (credit_operation_key or DEBT_KEY)|
|installment_key                        |UUID               |installment identifier key|
|reference_date                         |Date               |Reference date for calculating the installment outstanding balance|            
|paid_at                                |DateTime           |Payment date|        
|paid_method_type                       |string             |Payment method, check the possible enumerators in the [Enumerators for paid_method_type](#paid_method) table|                
|installment_status                     |string             |Installment status, check the possible enumerators in the [Enumerators for installment_status](#installment_status) table|
|installment_payment_key                |UUID               |Unique payment key|                        
|paid_amount                            |decimal            |Amount paid|            
|total_amount                           |decimal            |Total installment amount, in case of partial payment it is updated with the outstanding amount|            
|present_total_amount                   |decimal            |Present value on the reference date (reference_date)|                    
|prefixed_interest_payment_amount       |decimal            |Payment amount referring to interest amortization|                    
|principal_amortization_payment_amount  |decimal            |Payment amount referring to principal amortization|                    
|resource_account_key                   |UUID               |Source account of the balance used in settlement|                    
|batch_renegotiation_proposal_key       |UUID               |Batch renegotiation key, if applicable|                                
|renegotiation_proposal_key             |UUID               |Renegotiation key, if applicable|                        
|refinancing_credit_operation_key       |UUID               |Refinancing operation key, if applicable|                        
|received_portability_key               |UUID               |Received portability key, if applicable|                        
|bank_slip_key                          |UUID               |Bank slip key registered with the installment, if applicable|                        
|pix_qrcode_key                         |UUID               |PIX QR code key registered with the installment, if applicable|                        
|paid_in                                |object             |Payer bank information, applicable in cases of PIX or bank slip payments|                        

:::warning Fine and late fee payment amount
The fine + late fee amount (fine_amount) of the payment can be identified through the formula:

fine_amount = paid_amount - prefixed_interest_payment_amount - principal_amortization_payment_amount.
:::

### Enumerators for paid_method_type {#paid_method}

| Enumerator            | Description       |
|-----------------------|--------           |
|bankslip               | Bank slip         |
|ted                    | TED               |
|pix                    | PIX               |
|refinancing            | refinancing       |
|portability            | portability       |
|unmonitored            | manual write-off  |
|collateral             | collateral        |

### Enumerators for installment_status {#installment_status}

| Enumerator                            | Description   |
|-----------------------                |--------     |
|created                                | open    |      
|opened                                 | open    |  
|waiting_payment                        | open waiting payment on due date |              
|paid_partial                           | partially paid |          
|paid                                   | paid |  
|paid_early                             | paid early |      
|overdue                                | overdue |      
|paid_partial_overdue                   | partially paid overdue |                  
|paid_overdue                           | paid overdue |          
|canceled                               | canceled |      
|unmonitored                            | open |          
|waiting_payment_confirmation           | waiting refinancing settlement |                          

:::warning Partially paid early
Note that there is no partially paid early status. In case of a partial write-off with a reference date prior to the installment due date, the previous status is maintained (unmonitored or opened).
:::

---

# Installment Webhooks

URL: /en/documentation/webhooks/parcelas

:::info Information
Our webhook response timeout is 10 seconds.
:::

:::danger Attention!
QI Tech's webhooks must not be mapped in a restricted manner
Additional fields may be included in our API webhook payloads.
:::

:::info Reenvio de Webhooks
You may consult and resend webhooks following the detailed guide [Resending Webhooks](/documentation/notificacoes/reenvio_de_notificacoes)
:::

This configuration may be enabled when QI Tech is the operation collection agent, with it you will receive status changes based for each installment.

The following status may be configured:
- **opened**
- **paid**
- **waiting_payment**
- **paid_early**
- **paid_partial**
- **overdue**
- **paid_partial_overdue**
- **paid_overdue**

----
### Example paid installment webhook

Body.json

```json
{
    "key": "92a05d9c-e457-4f28-9fa8-86be638ee2d0",
    "data": {
        "status": "paid",
        "installment": {
            "events": [{
                "amount": null,
                "created_at": "2022-08-27T10:55:41",
                "event_date": "2022-08-27T10:55:42",
                "old_due_date": null,
                "installment_event_type": {
                    "enumerator": "open",
                    "translation_path": "co.InstallmentEventType.open"
                },
                "installment_old_status": {
                    "enumerator": "created",
                    "translation_path": "co.InstallmentStatus.created"
                }
            }, {
                "amount": 1009.68,
                "created_at": "2022-09-27T07:03:35",
                "event_date": "2022-09-27T07:03:34",
                "old_due_date": null,
                "installment_event_type": {
                    "enumerator": "payment",
                    "translation_path": "co.InstallmentEventType.payment"
                },
                "installment_old_status": {
                    "enumerator": "opened",
                    "translation_path": "co.InstallmentStatus.opened"
                }
            }],
            "paid_at": "2022-09-27T07:03:34",
            "due_date": "2022-10-28",
            "workdays": 21,
            "created_at": "2022-08-27T10:54:18",
            "tax_amount": 5.11785875,
            "updated_at": "2022-09-27T07:03:35",
            "fine_amount": null,
            "paid_amount": 1009.68,
            "qr_code_key": "92a05d9c-e457-4f28-9fa8-86be638ee2d0",
            "qr_code_url": "https://qitech.com.br/",
            "due_interest": 0,
            "has_interest": true,
            "payment_type": {
                "enumerator": "bankslip",
                "translation_path": "co.PaymentType.bankslip"
            },
            "total_amount": 1009.68,
            "bank_slip_key": "92a05d9c-e457-4f28-9fa8-86be638ee2d0",
            "calendar_days": 30,
            "due_principal": 1006.66428708,
            "digitable_line": "32990001031000699917042000000200291520000100968",
            "installment_key": "92a05d9c-e457-4f28-9fa8-86be638ee2d0",
            "additional_costs": [],
            "installment_type": {
                "enumerator": "principal",
                "translation_path": "co.InstallmentType.principal"
            },
            "pre_fixed_amount": 3.02013568,
            "business_due_date": "2022-10-31",
            "cetip_settlements": [],
            "post_fixed_amount": 0,
            "total_paid_amount": 0,
            "installment_number": 3,
            "installment_status": {
                "enumerator": "paid",
                "translation_path": "co.InstallmentStatus.paid"
            },
            "installment_payment": [{
                "created_at": "2022-09-27T07:03:35",
                "paid_amount": 1009.68,
                "total_amount": 1009.68,
                "due_principal": 1006.66428708,
                "reference_date": "2022-09-27",
                "paid_method_type": {
                    "enumerator": "pix",
                    "translation_path": "co.PaymentType.pix"
                },
                "payment_data":{
                    "paid_in":{
                        "name": "ITAÚ UNIBANCO S.A.",
                        "code_number": 341,
                        "ispb": 60701190
                    }
                },
                "pre_fixed_amount": 3.02013568,
                "advanced_paid_amount": 0,
                "present_total_amount": 1009.68,
                "renegotiation_proposal_key": null,
                "principal_amortization_amount": 1006.65986432,
                "prefixed_interest_payment_amount": 3.02013568,
                "principal_amortization_payment_amount": 1006.65986432
            }],
            "advanced_paid_amount": 0,
            "total_accrual_amount": 0,
            "original_total_amount": 1009.68,
            "accrual_reference_date": "2022-09-27",
            "original_due_principal": 1006.66428708,
            "original_pre_fixed_amount": 3.02013568,
            "renegotiation_proposal_key": null,
            "principal_amortization_amount": 1006.65986432,
            "original_principal_amortization_amount": 1006.65986432
        },
        "is_finished": true
    },
    "webhook_type": "installment.status_change"
}

```

### Exemplo created bankslip webhook
Body.json

```json
{
    "key": "96015228-4905-42fc-bda6-e70e0e552b6b",
    "webhook_type": "installment.status_change",
    "data": {
        "status": "update",
        "installments": [
            {
                "installment_key": "bc60ad8e-4dc1-4edc-8c5b-6df1b5c9415d",
                "digitable_line": "32990001455000000000503007797909797660000100000",
                "qr_code_key": "7d20015e-c4ed-4290-b255-33c1c5b56362",
                "qr_code_url": "00020126580014br.gov.bcb.pix0136dc4a27db-2fe1-474d-aa02-88d6fffb8d0d5204000053039865802BR5921NeymarSportEMarketing6008saopaulo62070503***63040EB2",
                "principal_amortization_amount": 141.07452576,
                "pre_fixed_amount": 72.89547424,
                "bank_slip_key": "5f25e9fd-f612-47a3-acff-be9f29d87f6c",
                "due_date": "2024-07-17",
                "total_amount": 216.97
            },
            {
                "principal_amortization_amount": 144.84483469,
                "pre_fixed_amount": 65.12516531,
                "due_date": "2024-08-19",
                "digitable_line": "32990001454000000000627007797908997530000500000",
                "installment_key": "be3f0fde-24ac-42d2-82e9-4b0aa15bf01e",
                "qr_code_key": "4d696847-73a2-4dba-be9f-218084dff8e7",
                "qr_code_url": "00020126580014br.gov.bcb.pix0136dc4a27db-2fe1-474d-aa02-88d6fffb8d0d5204000053039865802BR5921NeymarSportEMarketing6008saopaulo62070503***63040EB2",
                "total_amount": 216.97,
                "bank_slip_key": "bc1cc18f-2db5-470d-8541-b944e53cb699"
            },
            {
                "qr_code_url": "00020126580014br.gov.bcb.pix0136dc4a27db-2fe1-474d-aa02-88d6fffb8d0d5204000053039865802BR5921NeymarSportEMarketing6008saopaulo62070503***63040EB2",
                "digitable_line": "32990001454000000000623007797907697530000500000",
                "bank_slip_key": "8a00a520-7d49-4f51-9293-9ea26e241338",
                "principal_amortization_amount": 164.37001228,
                "installment_key": "3d4b5f21-c0a3-4075-bac2-9086cd90b77e",
                "due_date": "2024-09-17",
                "qr_code_key": "4d47528a-167d-41aa-b9da-246d2030af75",
                "total_amount": 216.97,
                "pre_fixed_amount": 52.59998772
            }
        ]
    }
}

```

## Definitions

### Object Request Body
| Field              | Type   | Description         | Max. Caract. | 
|--------------------|--------|---------------------|--------------|
| **key** *          | object | Installment DEBT-KEY | -            | 
| **data** *         | object | Webhook Data        | -            |
| **webhook_type** * | object | Webhook Type        | -            |

### Object data
| Field             | Type     | Description                                        | Max. Caract. | 
|-------------------|----------|----------------------------------------------------|--------------|
| **status** *      | object   | Installment Status                                 | -            | 
| **installment** * | object   | Installment Data                                   | -            |
| **is_finished** * | booleano | Boolean field to signal if installment is finished | -            |

### Object installment
| Field            | Type   | Description                           | Max. Caract. | 
|------------------|--------|---------------------------------------|--------------|
| **events** *     | object | Installment Status                    | -            | 
| **paid_at** *    | object | Paid installment date                 | -            |
| **due_date** *   | string | Installment due date                  | -            |
| **workdays** *   | Int    | Days between disbursement and due date | -            |
| **created_at** * | string   | Installment created date              | -            |
| **tax_amount** * | Float  | Installment tax amount                | -            |
| **updated_at** * | string   | Installment update date               | -            |