API Docs Início Documentação Referência de API Copiar para LLM
POST/v{version}/CreditNote/{id}/donePaymentRevision
Crédito · Operação de crédito

Criar Credit Note

Cria um novo registro de Credit Note.

Visão geral

Cria um novo registro de Credit Note.

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):

Request

Parâmetros

NomeEmTipoObrigatórioDescriçãoExemplo
idpathstring (uuid)obrigatório3fa85f64-5717-4562-b3fc-2c963f66afa6
versionpathstringobrigatório1

Corpo da requisição

Envie no formato application/json. Corpo opcional.

Campos

CampoTipoObrigatórioDescriçãoValoresExemplo
bankAccountobjetoopcionalobjeto — ver detalhe abaixo{ … }
changeBankAccountobjetoopcionalobjeto — ver detalhe abaixo{ … }

Detalhe de bankAccount

CampoTipoObrigatórioDescriçãoValoresExemplo
ownerUserobjetoopcionalobjeto — ver detalhe abaixo{ … }
ownerGroupobjetoopcionalobjeto — ver detalhe abaixo{ … }
idstring (uuid)opcional"3fa85f64-5717-4562-b3fc-2c963f66afa6"
bankCodeintegeropcional0
bankIspbinteger (int64)opcionalCódigo ISPB do banco0
accountstringopcional"texto"
accountDigitstringopcional"texto"
agencystringopcional"texto"
agencyDigitstringopcional"texto"
typestringopcionalNaturalCheckingAccount, NaturalSimpleAccount, LegalCheckingAccount, PublicEntities, FinancialInstitutionsDeposits, NaturalSavingsAccount, LegalSavingsAccount, RealEstateSavingsAccount, LotteryDeposits, EscrowAccount"NaturalCheckingAccount"
jointAccountbooleanopcionaltrue
operationTypeValuestringobrigatórioTransfer, Pix"Transfer"
pixKeyTypeValuestringopcionalNaturalRegistrationNumber, LegalRegistrationNumber, Phone, Email, Automatic, AgencyAndAccount"NaturalRegistrationNumber"
keyPixstringopcionalChave Pix"texto"

Detalhe de ownerUser

CampoTipoObrigatórioDescriçãoValoresExemplo
userIdstringobrigatório"3fa85f64-5717-4562-b3fc-2c963f66afa6"
tenantNamestringobrigatório"Fulano de Tal"

Detalhe de ownerGroup

CampoTipoObrigatórioDescriçãoValoresExemplo
groupIdstringobrigatório"3fa85f64-5717-4562-b3fc-2c963f66afa6"
tenantNamestringobrigatório"Fulano de Tal"

Exemplo de corpo

{
  "bankAccount": {
    "ownerUser": {
      "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "ownerGroup": {
      "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "bankCode": 0,
    "bankIspb": 0,
    "account": "texto",
    "accountDigit": "texto",
    "agency": "texto",
    "agencyDigit": "texto",
    "type": "NaturalCheckingAccount",
    "jointAccount": true,
    "operationTypeValue": "Transfer",
    "pixKeyTypeValue": "NaturalRegistrationNumber",
    "keyPix": "texto"
  },
  "changeBankAccount": {
    "ownerUser": {
      "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "ownerGroup": {
      "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "bankCode": 0,
    "bankIspb": 0,
    "account": "texto",
    "accountDigit": "texto",
    "agency": "texto",
    "agencyDigit": "texto",
    "type": "NaturalCheckingAccount",
    "jointAccount": true,
    "operationTypeValue": "Transfer",
    "pixKeyTypeValue": "NaturalRegistrationNumber",
    "keyPix": "texto"
  }
}

Response

Resposta 200 sem corpo (Success).

Códigos de retorno

CódigoSignificadoDetalhe do contrato
200Requisição bem-sucedida.Success

Exemplos

curl -X POST "{{baseUrl}}/v1/CreditNote/3fa85f64-5717-4562-b3fc-2c963f66afa6/donePaymentRevision" \
  -H "Authorization: Bearer {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "bankAccount": {
    "ownerUser": {
      "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "ownerGroup": {
      "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "bankCode": 0,
    "bankIspb": 0,
    "account": "texto",
    "accountDigit": "texto",
    "agency": "texto",
    "agencyDigit": "texto",
    "type": "NaturalCheckingAccount",
    "jointAccount": true,
    "operationTypeValue": "Transfer",
    "pixKeyTypeValue": "NaturalRegistrationNumber",
    "keyPix": "texto"
  },
  "changeBankAccount": {
    "ownerUser": {
      "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "ownerGroup": {
      "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "bankCode": 0,
    "bankIspb": 0,
    "account": "texto",
    "accountDigit": "texto",
    "agency": "texto",
    "agencyDigit": "texto",
    "type": "NaturalCheckingAccount",
    "jointAccount": true,
    "operationTypeValue": "Transfer",
    "pixKeyTypeValue": "NaturalRegistrationNumber",
    "keyPix": "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 = "/v1/CreditNote/3fa85f64-5717-4562-b3fc-2c963f66afa6/donePaymentRevision";

var corpo = new StringContent(
    """
    {
      "bankAccount": {
        "ownerUser": {
          "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "tenantName": "Fulano de Tal"
        },
        "ownerGroup": {
          "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "tenantName": "Fulano de Tal"
        },
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "bankCode": 0,
        "bankIspb": 0,
        "account": "texto",
        "accountDigit": "texto",
        "agency": "texto",
        "agencyDigit": "texto",
        "type": "NaturalCheckingAccount",
        "jointAccount": true,
        "operationTypeValue": "Transfer",
        "pixKeyTypeValue": "NaturalRegistrationNumber",
        "keyPix": "texto"
      },
      "changeBankAccount": {
        "ownerUser": {
          "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "tenantName": "Fulano de Tal"
        },
        "ownerGroup": {
          "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "tenantName": "Fulano de Tal"
        },
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "bankCode": 0,
        "bankIspb": 0,
        "account": "texto",
        "accountDigit": "texto",
        "agency": "texto",
        "agencyDigit": "texto",
        "type": "NaturalCheckingAccount",
        "jointAccount": true,
        "operationTypeValue": "Transfer",
        "pixKeyTypeValue": "NaturalRegistrationNumber",
        "keyPix": "texto"
      }
    }
    """,
    Encoding.UTF8, "application/json");

var resp = await http.PostAsync(rota, corpo);
resp.EnsureSuccessStatusCode();
// Sem corpo de resposta neste endpoint.
const baseUrl = '{{baseUrl}}';
const token   = '{{token}}';

const payload = {
  "bankAccount": {
    "ownerUser": {
      "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "ownerGroup": {
      "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "bankCode": 0,
    "bankIspb": 0,
    "account": "texto",
    "accountDigit": "texto",
    "agency": "texto",
    "agencyDigit": "texto",
    "type": "NaturalCheckingAccount",
    "jointAccount": true,
    "operationTypeValue": "Transfer",
    "pixKeyTypeValue": "NaturalRegistrationNumber",
    "keyPix": "texto"
  },
  "changeBankAccount": {
    "ownerUser": {
      "userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "ownerGroup": {
      "groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "tenantName": "Fulano de Tal"
    },
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "bankCode": 0,
    "bankIspb": 0,
    "account": "texto",
    "accountDigit": "texto",
    "agency": "texto",
    "agencyDigit": "texto",
    "type": "NaturalCheckingAccount",
    "jointAccount": true,
    "operationTypeValue": "Transfer",
    "pixKeyTypeValue": "NaturalRegistrationNumber",
    "keyPix": "texto"
  }
};

const resp = await fetch(`${baseUrl}/v1/CreditNote/3fa85f64-5717-4562-b3fc-2c963f66afa6/donePaymentRevision`, {
  method: 'POST',
  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