Saltar al contenido principal
GET
/
api
/
v1
/
spi
/
account-reports
/
{correlationId}
/
extract
Leer un extrato de Conta PI (resultado de lançamentos RCO camt.052)
curl --request GET \
  --url https://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract"

headers = {"Authorization": "Bearer <token>"}

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

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

fetch('https://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract', 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://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract",
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: Bearer <token>"
],
]);

$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://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract"

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

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spi.sandbox.lerian.net/api/v1/spi/account-reports/{correlationId}/extract")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "correlationId": "<string>",
  "countsMatch": true,
  "declaredEntryCount": 123,
  "entries": [
    {
      "columns": {},
      "lineNumber": 123
    }
  ],
  "integrityVerified": true,
  "parsedEntryCount": 123,
  "status": "<string>",
  "accountIspb": "<string>",
  "fileName": "<string>",
  "receivedAt": "2023-11-07T05:31:56Z",
  "reportKind": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Parámetros de ruta

correlationId
string
requerido

Correlation id returned by createAccountReportRequest (the camt.060 AppHdr BizMsgIdr)

Respuesta

OK

correlationId
string
requerido

camt.060 AppHdr BizMsgIdr correlating the request to its camt.052 extrato response

Ejemplo:

"M12345678Abc123Def456Ghi789Jkl0"

countsMatch
boolean
requerido

COUNT recon FLAG: declaredEntryCount == parsedEntryCount. A mismatch is operator-reviewable, never fatal

Ejemplo:

true

declaredEntryCount
integer<int64>
requerido

camt.052 NbOfNtries (quantidadeLancamentos) — the declared record count

Ejemplo:

16

entries
object[] | null
requerido

RCO lançamentos rows BACEN generated, projected verbatim. Empty while PENDING

integrityVerified
boolean
requerido

True when sha256(fetched file) == AddtlRptInf (integrity passed)

Ejemplo:

true

parsedEntryCount
integer<int64>
requerido

Number of RCO data rows parsed from the file

Ejemplo:

16

status
string
requerido

PENDING until the inbound camt.052 extrato is fetched + verified + projected; ANSWERED once it has been persisted

Ejemplo:

"ANSWERED"

accountIspb
string

8-digit ISPB of the Conta PI account the extrato addresses (Rpt/Acct/Id), verbatim. Empty while PENDING

Ejemplo:

"99999010"

fileName
string

AddtlRptInf file handle (== SHA-256 of the file content). Empty while PENDING

Ejemplo:

"0c71ebdc4736bf09a888457750aa22f7c895026afb64b40f8fbd94092c61c19b"

receivedAt
string<date-time>

RFC3339 UTC freshness timestamp the extrato was projected. Empty while PENDING

Ejemplo:

"2026-06-15T10:00:01Z"

reportKind
string

Detected RCO shape: DEMONST_RCO (saque-facilitator demonstrativo), TOTAL_RCO (per-account-pair totals), or UNKNOWN. Empty while PENDING

Ejemplo:

"DEMONST_RCO"