Skip to main content
GET
/
v1
/
str
/
messages
/
{nuOp}
Get STR message detail
curl --request GET \
  --url https://spb.sandbox.lerian.net/v1/str/messages/{nuOp} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://spb.sandbox.lerian.net/v1/str/messages/{nuOp}"

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

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

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

fetch('https://spb.sandbox.lerian.net/v1/str/messages/{nuOp}', 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://spb.sandbox.lerian.net/v1/str/messages/{nuOp}",
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://spb.sandbox.lerian.net/v1/str/messages/{nuOp}"

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://spb.sandbox.lerian.net/v1/str/messages/{nuOp}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spb.sandbox.lerian.net/v1/str/messages/{nuOp}")

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
{
  "message": {
    "createdAt": "2023-11-07T05:31:56Z",
    "direction": "<string>",
    "messageType": "<string>",
    "nuOp": "<string>",
    "amount": "<string>",
    "confirmedAt": "2023-11-07T05:31:56Z",
    "controlNumber": "<string>",
    "description": "<string>",
    "mqMessageId": "<string>",
    "originalControlNumber": "<string>",
    "originalNuOp": "<string>",
    "purposeCode": "<string>",
    "recipientIspb": "<string>",
    "resolvedAt": "2023-11-07T05:31:56Z",
    "senderIspb": "<string>",
    "status": "<string>",
    "strRejectReason": "<string>",
    "strStatus": "<string>",
    "submittedAt": "2023-11-07T05:31:56Z"
  },
  "payload": {},
  "payloadFormat": "<string>",
  "correspondent": {
    "createdAt": "2023-11-07T05:31:56Z",
    "direction": "<string>",
    "messageType": "<string>",
    "nuOp": "<string>",
    "status": "<string>",
    "amount": "<string>",
    "controlNumber": "<string>",
    "strStatus": "<string>"
  },
  "reconstructedXml": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Path Parameters

nuOp
string
required

Message NUOp (23 digits: ISPB[8]+DATE[8]+SEQ[7]).

Required string length: 23
Pattern: ^[0-9]{23}$

Response

OK

message
object
required

The message's status projection (identifiers, lifecycle, BACEN-receipt fields).

payload
object
required

The structured payload_json persisted for this message (parsed STR fields). Always present.

payloadFormat
string
required

How the payload is presented: 'reconstructed' when reconstructedXml carries the persisted on-wire bytes decoded to XML, 'structured' when only the payload fields are available.

Example:

"reconstructed"

correspondent
object

The resolved original<->correspondent counterpart: for an outbound, the inbound response BACEN sent back; for an inbound, the outbound it answers. Absent when no counterpart has been correlated yet.

reconstructedXml
string

The persisted on-wire STR payload decoded to UTF-8 XML, labeled reconstructed (the literal sent bytes are not separately retained). Omitted when payloadFormat is 'structured'.