Skip to main content
POST
/
v1
/
str
/
operations
/
liquidity-transfers
Create Conta-PI liquidity transfer
curl --request POST \
  --url https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>",
  "direction": "<string>",
  "accountType": "<string>",
  "contaPiISPB": "<string>"
}
'
import requests

url = "https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers"

payload = {
    "amount": "<string>",
    "direction": "<string>",
    "accountType": "<string>",
    "contaPiISPB": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    amount: '<string>',
    direction: '<string>',
    accountType: '<string>',
    contaPiISPB: '<string>'
  })
};

fetch('https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers', 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/operations/liquidity-transfers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'amount' => '<string>',
    'direction' => '<string>',
    'accountType' => '<string>',
    'contaPiISPB' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

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

curl_close($curl);

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

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

func main() {

	url := "https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers"

	payload := strings.NewReader("{\n  \"amount\": \"<string>\",\n  \"direction\": \"<string>\",\n  \"accountType\": \"<string>\",\n  \"contaPiISPB\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"amount\": \"<string>\",\n  \"direction\": \"<string>\",\n  \"accountType\": \"<string>\",\n  \"contaPiISPB\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"amount\": \"<string>\",\n  \"direction\": \"<string>\",\n  \"accountType\": \"<string>\",\n  \"contaPiISPB\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "wireCode": "<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.

Headers

Authorization
string

Bearer JWT token.

X-Idempotency
string

Idempotency key (canonical; legacy alias X-Idempotency-Key).

X-Idempotency-Key
string

Idempotency key (legacy alias).

X-TTL
string

Idempotency key TTL in seconds.

Body

application/json
amount
string
required

Movement amount as a decimal-reais string, forwarded verbatim into the LPI submit — Lerian SPB performs NO arithmetic on it.

Pattern: ^[0-9]+(\.[0-9]+)?$
Example:

"1500.25"

direction
string
required

Operator-facing movement direction: aporte funds the FI's Conta PI; resgate recalls funds from Conta PI.

Example:

"aporte"

accountType
string

Counterparty account type. RB_CL = Reservas Bancárias / Conta de Liquidação ((aporte,RB_CL)->LPI0001, (resgate,RB_CL)->LPI0003); CCME = Conta Correspondente a Moeda Eletrônica, own-account only ((aporte,CCME)->LPI0002, (resgate,CCME)->LPI0004). Empty defaults to RB_CL.

Example:

"RB_CL"

contaPiISPB
string

Optional Conta-PI owner ISPB (8 digits). Empty means the FI's OWN Conta PI (own-account path); a value differing from the issuer ISPB is the liquidante-funded path (RB_CL only). For CCME it must be empty or equal the issuer ISPB — CCME is own-account only.

Pattern: ^[0-9]{8}$
Example:

38166

Response

Accepted

operationId
string<uuid>
required

Server-assigned operation UUID to poll on GET /v1/str/operations/liquidity-transfers/{operationId}.

Example:

"7c8b3a2e-9f1d-4a55-9b8e-1e1234567890"

status
string
required

Projection lifecycle status; PENDING on accept (awaiting the STR R-leg settlement confirmation).

Example:

"PENDING"

wireCode
string
required

LPI wire code derived server-side from (direction, accountType): (aporte,RB_CL)=LPI0001, (aporte,CCME)=LPI0002, (resgate,RB_CL)=LPI0003, (resgate,CCME)=LPI0004.

Example:

"LPI0001"