Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GET /api/debito/{NSU}

Endpoint responsável obter um Débito em Conta pelo NSU cadastrado.

...

Campo

Tipo

Descrição

Tamanho Máximo

Obrigatório

idDebito

Long

ID que identifica o Débito.

-

Sim

nsu

Int32

Número Sequencial Único que identifica a Débito em Conta a ser buscado

-

Sim

idDebitoAutorizacao

Long

ID que identifica a Autorização registrada para o Débito na conta em questão.

-

Sim

idDebitoStatus

Int32

ID que identifica o status do Débito em Conta;

-

Sim

valor

Decimal

Valor da Transação para Débito.

-

Sim

dataProcessamento

Date

Data prevista para Processamento deste Débito

-

Sim

liquidado

Boolean

Boolean que identifica se o Débito em Conta foi Liquidado ou não.

-

Sim

dataHoraInsercao

DateTime

Data e Hora que o Débito em Conta foi Registrado

-

Sim

 

JSON:
{
“idDebito“: 2,

Code Block
{
    "idDebito": 15,
    "idDebitoAutorizacao":

...

 

Exemplos de Implementação:

C#

Code Block
var client = new RestClient("https://localhost:44380/api/debito");

var request = new RestRequest(Method.GET);

request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6ImNhaW8uZm9udGVzIiwianRpIjoiZDVkMmQ4ZmVlMDgwNDk2MWE3ZjQ3NWY2MjRiMTkxYmQiLCJOZXRDb3JlVXNlcklkIjoiNjdjNjVhMDQtOTM0NC00MzE0LTYwYzgtMDhkN2RjMGNkMmI2IiwiUm9sZUxldmVsIjoiMCIsIklkRXN0YWJlbGVjaW1lbnRvIjoiMCIsIklkRXN0YWJlbGVjaW1lbnRvT3BlcmFkb3IiOiIwIiwiSWRDbGllbnRlQnJva2VyIjpbIjAiLCIwIl0sInJvbGUiOiJFc3RhYmVsZWNpbWVudG8iLCJuYmYiOjE1OTIyNTk1ODcsImV4cCI6MTU5MjI2MzE4NywiaWF0IjoxNTkyMjU5NTkyLCJpc3MiOiJTc29BdWRpZW5jZSIsImF1ZCI6IlNzb0F1ZGllbmNlIn0.ktfw3Hooj022BX0A_Vhyv7qq0led91t71oSrTBkA3OU");

request.AddParameter("application/json,text/plain",  ParameterType.RequestBody);

IRestResponse response = client.Execute(request);

Console.WriteLine(response.Content);

PHP

Code Block
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://localhost:44380/api/debito",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Content-Type: application/json",
    "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6ImNhaW8uZm9udGVzIiwianRpIjoiZDVkMmQ4ZmVlMDgwNDk2MWE3ZjQ3NWY2MjRiMTkxYmQiLCJOZXRDb3JlVXNlcklkIjoiNjdjNjVhMDQtOTM0NC00MzE0LTYwYzgtMDhkN2RjMGNkMmI2IiwiUm9sZUxldmVsIjoiMCIsIklkRXN0YWJlbGVjaW1lbnRvIjoiMCIsIklkRXN0YWJlbGVjaW1lbnRvT3BlcmFkb3IiOiIwIiwiSWRDbGllbnRlQnJva2VyIjpbIjAiLCIwIl0sInJvbGUiOiJFc3RhYmVsZWNpbWVudG8iLCJuYmYiOjE1OTIyNTk1ODcsImV4cCI6MTU5MjI2MzE4NywiaWF0IjoxNTkyMjU5NTkyLCJpc3MiOiJTc29BdWRpZW5jZSIsImF1ZCI6IlNzb0F1ZGllbmNlIn0.ktfw3Hooj022BX0A_Vhyv7qq0led91t71oSrTBkA3OU"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response; 10,
    "idDebitoStatus": 2,
    "descricaoStatus": "Processado",
    "nsu": 21,
    "valor": 7.50,
    "dataHoraProcessamento": "2020-10-26T21:58:52.65",
    "dataHoraInsercao": "2020-10-26T20:58:42.2566667"
}