/api/v1/Billing/{referenceId}Método de atualização de uma cobrança específica
Atualiza parcialmente um registro de api.
Visão geral
Método de atualização de uma cobrança específica.
Autenticação e pré-requisitos
Requer autenticação. Envie o token no header Authorization: Bearer {{token}} (JWT do AWS Cognito). Integrações servidor-a-servidor podem usar X-Api-Key. Todo tráfego é HTTPS e a credencial nunca vai na URL nem em query string.
Pré-requisitos: a rota exige identificador(es) de recurso já existente(s):
referenceId— —
Request
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|---|
referenceId | path | string | obrigatório | — | 3fa85f64-5717-4562-b3fc-2c963f66afa6 |
UseExternalIdAsReference | query | boolean | opcional | — | true |
Corpo da requisição
Envie no formato application/json. Corpo obrigatório.
Campos
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
documentNumber | string | opcional | — | — | "texto" |
amount | integer (int64) | opcional | — | — | 0 |
description | string | opcional | — | — | "texto" |
dueDate | string | opcional | — | — | "texto" |
discount | integer | opcional | — | — | 0 |
discountLimitDate | string | opcional | — | — | "texto" |
discount2 | integer | opcional | — | — | 0 |
discountLimitDate2 | string | opcional | — | — | "texto" |
discount3 | integer | opcional | — | — | 0 |
discountLimitDate3 | string | opcional | — | — | "texto" |
billingSettingId | string | opcional | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
communicationSettingId | string | opcional | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
tags | array de string | opcional | — | — | [ … ] |
payer | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
guarantor | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
firstInstructionDebtCollection | string | opcional | — | — | "texto" |
secondInstructionDebtCollection | integer | opcional | — | — | 0 |
settings | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
ourNumber | integer (int64) | opcional | — | — | 0 |
ourNumberDigit | string | opcional | — | — | "texto" |
walletNumber | integer | opcional | — | — | 0 |
numberPayments | integer | opcional | — | — | 0 |
deduction | integer | opcional | — | — | 0 |
latePaymentInterestAmountPerDay | integer | opcional | — | — | 0 |
creditTypeValue | string | opcional | — | — | "texto" |
conditionForIssuingBillingSlip | string | opcional | — | — | "texto" |
directDebitAgency | string | opcional | — | — | "texto" |
directDebitAgencyDigit | string | opcional | — | — | "texto" |
directDebitAccount | string | opcional | — | — | "texto" |
directDebitAccountDigit | string | opcional | — | — | "texto" |
directDebitReason | string | opcional | — | — | "texto" |
bonusDiscountDay | string | opcional | — | — | "texto" |
addressingAutomaticDebitNotification | string | opcional | — | — | "texto" |
identificationBillingSlipIssuance | string | opcional | — | — | "texto" |
acceptanceIdentification | string | opcional | — | — | "01310930" |
depositoryAgency | string | opcional | — | — | "texto" |
billingBankCharge | string | opcional | — | — | "texto" |
bankCode | string | opcional | — | — | "texto" |
iof | string | opcional | — | — | "texto" |
bankingOperationIdentification | string | opcional | — | — | "texto" |
creditDistributionIdentification | string | opcional | — | — | "texto" |
participantControlNumber | string | opcional | — | — | "texto" |
Exemplo de corpo
{
"documentNumber": "texto",
"amount": 0,
"description": "texto",
"dueDate": "texto",
"discount": 0,
"discountLimitDate": "texto",
"discount2": 0,
"discountLimitDate2": "texto",
"discount3": 0,
"discountLimitDate3": "texto",
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tags": [
"texto"
],
"payer": {
"name": "Fulano de Tal",
"personTypeValue": "texto",
"registrationNumber": "12345678909",
"zipCode": "01310930",
"addressName": "Fulano de Tal",
"addressNumber": "texto",
"addressComplement": "texto",
"email": "cliente@exemplo.com.br"
},
"guarantor": {
"name": "Fulano de Tal",
"registrationNumber": "12345678909"
},
"firstInstructionDebtCollection": "texto",
"secondInstructionDebtCollection": 0,
"settings": {
"interestTypeValue": "texto",
"interestAmount": 1000,
"fineTypeValue": "texto",
"fineAmount": 1000,
"interestCodeValue": "texto"
},
"ourNumber": 0,
"ourNumberDigit": "texto",
"walletNumber": 0,
"numberPayments": 0,
"deduction": 0,
"latePaymentInterestAmountPerDay": 0,
"creditTypeValue": "texto",
"conditionForIssuingBillingSlip": "texto",
"directDebitAgency": "texto",
"directDebitAgencyDigit": "texto",
"directDebitAccount": "texto",
"directDebitAccountDigit": "texto",
"directDebitReason": "texto",
"bonusDiscountDay": "texto",
"addressingAutomaticDebitNotification": "texto",
"identificationBillingSlipIssuance": "texto",
"acceptanceIdentification": "01310930",
"depositoryAgency": "texto",
"billingBankCharge": "texto",
"bankCode": "texto",
"iof": "texto",
"bankingOperationIdentification": "texto",
"creditDistributionIdentification": "texto",
"participantControlNumber": "texto"
}Response
Resposta 204 sem corpo (—).
Códigos de retorno
| Código | Significado | Detalhe do contrato |
|---|---|---|
204 | Sucesso sem corpo de resposta. | — |
401 | Não autenticado — token ausente, inválido ou expirado. | — |
Exemplos
curl -X PATCH "{{baseUrl}}/api/v1/Billing/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer {{token}}" \
-H "Content-Type: application/json" \
-d '{
"documentNumber": "texto",
"amount": 0,
"description": "texto",
"dueDate": "texto",
"discount": 0,
"discountLimitDate": "texto",
"discount2": 0,
"discountLimitDate2": "texto",
"discount3": 0,
"discountLimitDate3": "texto",
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tags": [
"texto"
],
"payer": {
"name": "Fulano de Tal",
"personTypeValue": "texto",
"registrationNumber": "12345678909",
"zipCode": "01310930",
"addressName": "Fulano de Tal",
"addressNumber": "texto",
"addressComplement": "texto",
"email": "cliente@exemplo.com.br"
},
"guarantor": {
"name": "Fulano de Tal",
"registrationNumber": "12345678909"
},
"firstInstructionDebtCollection": "texto",
"secondInstructionDebtCollection": 0,
"settings": {
"interestTypeValue": "texto",
"interestAmount": 1000,
"fineTypeValue": "texto",
"fineAmount": 1000,
"interestCodeValue": "texto"
},
"ourNumber": 0,
"ourNumberDigit": "texto",
"walletNumber": 0,
"numberPayments": 0,
"deduction": 0,
"latePaymentInterestAmountPerDay": 0,
"creditTypeValue": "texto",
"conditionForIssuingBillingSlip": "texto",
"directDebitAgency": "texto",
"directDebitAgencyDigit": "texto",
"directDebitAccount": "texto",
"directDebitAccountDigit": "texto",
"directDebitReason": "texto",
"bonusDiscountDay": "texto",
"addressingAutomaticDebitNotification": "texto",
"identificationBillingSlipIssuance": "texto",
"acceptanceIdentification": "01310930",
"depositoryAgency": "texto",
"billingBankCharge": "texto",
"bankCode": "texto",
"iof": "texto",
"bankingOperationIdentification": "texto",
"creditDistributionIdentification": "texto",
"participantControlNumber": "texto"
}'var baseUrl = "{{baseUrl}}";
var token = "{{token}}";
using var http = new HttpClient { BaseAddress = new Uri(baseUrl) };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
var rota = "/api/v1/Billing/3fa85f64-5717-4562-b3fc-2c963f66afa6";
var corpo = new StringContent(
"""
{
"documentNumber": "texto",
"amount": 0,
"description": "texto",
"dueDate": "texto",
"discount": 0,
"discountLimitDate": "texto",
"discount2": 0,
"discountLimitDate2": "texto",
"discount3": 0,
"discountLimitDate3": "texto",
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tags": [
"texto"
],
"payer": {
"name": "Fulano de Tal",
"personTypeValue": "texto",
"registrationNumber": "12345678909",
"zipCode": "01310930",
"addressName": "Fulano de Tal",
"addressNumber": "texto",
"addressComplement": "texto",
"email": "cliente@exemplo.com.br"
},
"guarantor": {
"name": "Fulano de Tal",
"registrationNumber": "12345678909"
},
"firstInstructionDebtCollection": "texto",
"secondInstructionDebtCollection": 0,
"settings": {
"interestTypeValue": "texto",
"interestAmount": 1000,
"fineTypeValue": "texto",
"fineAmount": 1000,
"interestCodeValue": "texto"
},
"ourNumber": 0,
"ourNumberDigit": "texto",
"walletNumber": 0,
"numberPayments": 0,
"deduction": 0,
"latePaymentInterestAmountPerDay": 0,
"creditTypeValue": "texto",
"conditionForIssuingBillingSlip": "texto",
"directDebitAgency": "texto",
"directDebitAgencyDigit": "texto",
"directDebitAccount": "texto",
"directDebitAccountDigit": "texto",
"directDebitReason": "texto",
"bonusDiscountDay": "texto",
"addressingAutomaticDebitNotification": "texto",
"identificationBillingSlipIssuance": "texto",
"acceptanceIdentification": "01310930",
"depositoryAgency": "texto",
"billingBankCharge": "texto",
"bankCode": "texto",
"iof": "texto",
"bankingOperationIdentification": "texto",
"creditDistributionIdentification": "texto",
"participantControlNumber": "texto"
}
""",
Encoding.UTF8, "application/json");
var resp = await http.PatchAsync(rota, corpo);
resp.EnsureSuccessStatusCode();
// Sem corpo de resposta neste endpoint.const baseUrl = '{{baseUrl}}';
const token = '{{token}}';
const payload = {
"documentNumber": "texto",
"amount": 0,
"description": "texto",
"dueDate": "texto",
"discount": 0,
"discountLimitDate": "texto",
"discount2": 0,
"discountLimitDate2": "texto",
"discount3": 0,
"discountLimitDate3": "texto",
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tags": [
"texto"
],
"payer": {
"name": "Fulano de Tal",
"personTypeValue": "texto",
"registrationNumber": "12345678909",
"zipCode": "01310930",
"addressName": "Fulano de Tal",
"addressNumber": "texto",
"addressComplement": "texto",
"email": "cliente@exemplo.com.br"
},
"guarantor": {
"name": "Fulano de Tal",
"registrationNumber": "12345678909"
},
"firstInstructionDebtCollection": "texto",
"secondInstructionDebtCollection": 0,
"settings": {
"interestTypeValue": "texto",
"interestAmount": 1000,
"fineTypeValue": "texto",
"fineAmount": 1000,
"interestCodeValue": "texto"
},
"ourNumber": 0,
"ourNumberDigit": "texto",
"walletNumber": 0,
"numberPayments": 0,
"deduction": 0,
"latePaymentInterestAmountPerDay": 0,
"creditTypeValue": "texto",
"conditionForIssuingBillingSlip": "texto",
"directDebitAgency": "texto",
"directDebitAgencyDigit": "texto",
"directDebitAccount": "texto",
"directDebitAccountDigit": "texto",
"directDebitReason": "texto",
"bonusDiscountDay": "texto",
"addressingAutomaticDebitNotification": "texto",
"identificationBillingSlipIssuance": "texto",
"acceptanceIdentification": "01310930",
"depositoryAgency": "texto",
"billingBankCharge": "texto",
"bankCode": "texto",
"iof": "texto",
"bankingOperationIdentification": "texto",
"creditDistributionIdentification": "texto",
"participantControlNumber": "texto"
};
const resp = await fetch(`${baseUrl}/api/v1/Billing/3fa85f64-5717-4562-b3fc-2c963f66afa6`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
// Sem corpo de resposta neste endpoint.Troque apenas {{baseUrl}} e {{token}}. No Postman, defina-os como variáveis de environment; o cURL importa em Import > Raw text.
Downloads
Este endpoint já vem configurado nas collections abaixo, na pasta da etapa correspondente.
Guia de importação: Como importar no Postman · Todos os downloads: Downloads