Pular para o conteúdo principal
GET
/
v1
/
transfers
/
{id}
Ler uma transferência
curl --request GET \
  --url https://sta.sandbox.lerian.net/v1/transfers/{id} \
  --header 'Authorization: <api-key>'
import requests

url = "https://sta.sandbox.lerian.net/v1/transfers/{id}"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://sta.sandbox.lerian.net/v1/transfers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sta.sandbox.lerian.net/v1/transfers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sta.sandbox.lerian.net/v1/transfers/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sta.sandbox.lerian.net/v1/transfers/{id}")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sta.sandbox.lerian.net/v1/transfers/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "bytesDownloaded": 123,
  "bytesUploaded": 123,
  "createdAt": "<string>",
  "credentialId": "<string>",
  "currentState": "<string>",
  "currentStateCode": 123,
  "direction": "<string>",
  "documentType": "<string>",
  "downloadAttempts": 123,
  "errorCode": "<string>",
  "expired": true,
  "expiresAt": "<string>",
  "fileName": "<string>",
  "fileRef": "<string>",
  "fileSizeBytes": 123,
  "hashMismatchAttempts": 123,
  "id": "<string>",
  "lastTransitError": "<string>",
  "protocolGeneratedAt": "<string>",
  "protocolNumber": "<string>",
  "secondsRemaining": 123,
  "sourceProduct": "<string>",
  "transmissionAttempts": 123,
  "updatedAt": "<string>",
  "uploadAttempts": 123,
  "urgentRequestedAt": "<string>"
}
{}
{}
{}
{}

Autorizações

Authorization
string
header
obrigatório

Bearer token authentication (format: "Bearer {token}")

Parâmetros de caminho

id
string
obrigatório

Transfer UUID

Resposta

OK

bytesDownloaded
integer
bytesUploaded
integer
createdAt
string
credentialId
string
currentState
string
currentStateCode
integer
direction
string
documentType
string
downloadAttempts
integer

DownloadAttempts is the legacy aggregate counter; for inbound transfers, see hashMismatchAttempts + transmissionAttempts.

errorCode
string
expired
boolean
expiresAt
string

ExpiresAt / SecondsRemaining / Expired project the 44h BACEN protocol TTL directly onto the read view (the dedicated GET /:id/expiry endpoint was folded in here). ExpiresAt is nil — and SecondsRemaining 0, Expired false — until the transfer is assigned a protocol number (ProtocolGeneratedAt nil). Once assigned, ExpiresAt is ProtocolGeneratedAt + TTL; SecondsRemaining counts down to it at the handler clock and clamps to 0, at which point Expired flips true.

fileName
string
fileRef
string
fileSizeBytes
integer
hashMismatchAttempts
integer

HashMismatchAttempts is the inbound-only counter that drives the StateInconsistent terminal budget (HASH_MISMATCH). Always 0 for outbound transfers.

id
string
lastTransitError
string
protocolGeneratedAt
string
protocolNumber
string
secondsRemaining
integer
sourceProduct
string
transmissionAttempts
integer

TransmissionAttempts is the inbound-only counter that drives the StateCanceled / DOWNLOAD_FAILED terminal budget. Always 0 for outbound transfers.

updatedAt
string
uploadAttempts
integer
urgentRequestedAt
string

UrgentRequestedAt is the UTC timestamp at which an operator flagged this inbound transfer for urgent processing (mark-urgent). Nil (and omitted) for transfers that were never marked urgent.