Pular para o conteúdo principal
POST
/
v1
/
str
/
operations
/
auto-transfer-config
Configurar a transferência automática da Conta-PI
curl --request POST \
  --url https://spb.sandbox.lerian.net/v1/str/operations/auto-transfer-config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ccmePercent": "<string>",
  "ccmeValue": "<string>",
  "rbClPercent": "<string>",
  "rbClValue": "<string>"
}
'
import requests

url = "https://spb.sandbox.lerian.net/v1/str/operations/auto-transfer-config"

payload = {
    "ccmePercent": "<string>",
    "ccmeValue": "<string>",
    "rbClPercent": "<string>",
    "rbClValue": "<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({
    ccmePercent: '<string>',
    ccmeValue: '<string>',
    rbClPercent: '<string>',
    rbClValue: '<string>'
  })
};

fetch('https://spb.sandbox.lerian.net/v1/str/operations/auto-transfer-config', 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/auto-transfer-config",
  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([
    'ccmePercent' => '<string>',
    'ccmeValue' => '<string>',
    'rbClPercent' => '<string>',
    'rbClValue' => '<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/auto-transfer-config"

	payload := strings.NewReader("{\n  \"ccmePercent\": \"<string>\",\n  \"ccmeValue\": \"<string>\",\n  \"rbClPercent\": \"<string>\",\n  \"rbClValue\": \"<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/auto-transfer-config")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ccmePercent\": \"<string>\",\n  \"ccmeValue\": \"<string>\",\n  \"rbClPercent\": \"<string>\",\n  \"rbClValue\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://spb.sandbox.lerian.net/v1/str/operations/auto-transfer-config")

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  \"ccmePercent\": \"<string>\",\n  \"ccmeValue\": \"<string>\",\n  \"rbClPercent\": \"<string>\",\n  \"rbClValue\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "<string>",
  "wireCode": "<string>",
  "nuOp": "<string>"
}
{
  "code": "<string>",
  "detail": "<string>",
  "errors": [
    {
      "location": "<string>",
      "message": "<string>",
      "value": "<unknown>"
    }
  ],
  "instance": "<string>",
  "status": 123,
  "title": "<string>",
  "type": "about:blank"
}

Autorizações

Authorization
string
header
obrigatório

JWT bearer token issued by the identity provider.

Cabeçalhos

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.

Corpo

application/json
ccmePercent
string

CCME class: percentage of the CCME balance to auto-transfer. Set exactly one of ccmePercent or ccmeValue. '0' disables auto-transfer for this class.

Exemplo:

"25"

ccmeValue
string

CCME class: fixed decimal-reais amount to auto-transfer. Set exactly one of ccmePercent or ccmeValue. '0.00' disables auto-transfer for this class.

Exemplo:

"300.00"

rbClPercent
string

RB/CL class: percentage of the reserve/settlement balance to auto-transfer. Set exactly one of rbClPercent or rbClValue. '0' disables auto-transfer for this class.

Exemplo:

"50"

rbClValue
string

RB/CL class: fixed decimal-reais amount to auto-transfer. Set exactly one of rbClPercent or rbClValue. '0.00' disables auto-transfer for this class.

Exemplo:

"1500.25"

Resposta

Accepted

status
string
obrigatório

Submit status: dispatch was accepted (the STR ACK arrives asynchronously as LPI0005R1).

Exemplo:

"SUBMITTED"

wireCode
string
obrigatório

LPI wire code of the auto-transfer config-set (always LPI0005).

Exemplo:

"LPI0005"

nuOp
string

SFN operation number stamped on the transmitted LPI0005 frame; the LPI0005R1 ACK correlates back to it.

Exemplo:

"12345678202606190000005"