Pular para o conteúdo principal
POST
/
api
/
v1
/
core
/
operations
/
Orquestrar operação Core
curl --request POST \
  --url https://spi.sandbox.lerian.net/api/v1/core/operations/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 123,
  "commissionAmount": 123,
  "endToEndId": "<string>",
  "feeAmount": 123,
  "operationId": "<string>",
  "senderISPB": "<string>",
  "commissionRecipientISPB": "<string>",
  "feePayerISPB": "<string>"
}
'
import requests

url = "https://spi.sandbox.lerian.net/api/v1/core/operations/"

payload = {
"amount": 123,
"commissionAmount": 123,
"endToEndId": "<string>",
"feeAmount": 123,
"operationId": "<string>",
"senderISPB": "<string>",
"commissionRecipientISPB": "<string>",
"feePayerISPB": "<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: 123,
commissionAmount: 123,
endToEndId: '<string>',
feeAmount: 123,
operationId: '<string>',
senderISPB: '<string>',
commissionRecipientISPB: '<string>',
feePayerISPB: '<string>'
})
};

fetch('https://spi.sandbox.lerian.net/api/v1/core/operations/', 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/core/operations/",
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' => 123,
'commissionAmount' => 123,
'endToEndId' => '<string>',
'feeAmount' => 123,
'operationId' => '<string>',
'senderISPB' => '<string>',
'commissionRecipientISPB' => '<string>',
'feePayerISPB' => '<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://spi.sandbox.lerian.net/api/v1/core/operations/"

payload := strings.NewReader("{\n \"amount\": 123,\n \"commissionAmount\": 123,\n \"endToEndId\": \"<string>\",\n \"feeAmount\": 123,\n \"operationId\": \"<string>\",\n \"senderISPB\": \"<string>\",\n \"commissionRecipientISPB\": \"<string>\",\n \"feePayerISPB\": \"<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://spi.sandbox.lerian.net/api/v1/core/operations/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"commissionAmount\": 123,\n \"endToEndId\": \"<string>\",\n \"feeAmount\": 123,\n \"operationId\": \"<string>\",\n \"senderISPB\": \"<string>\",\n \"commissionRecipientISPB\": \"<string>\",\n \"feePayerISPB\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spi.sandbox.lerian.net/api/v1/core/operations/")

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\": 123,\n \"commissionAmount\": 123,\n \"endToEndId\": \"<string>\",\n \"feeAmount\": 123,\n \"operationId\": \"<string>\",\n \"senderISPB\": \"<string>\",\n \"commissionRecipientISPB\": \"<string>\",\n \"feePayerISPB\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "commissionAmount": 123,
  "feeAmount": 123,
  "feeAttributionId": "<string>",
  "operationId": "<string>",
  "routingDecision": {
    "isDirect": true,
    "quotaConsumed": 123,
    "indirectISPB": "<string>",
    "sponsorISPB": "<string>"
  },
  "sagaId": "<string>",
  "sagaStatus": "<string>",
  "settlementId": "<string>",
  "settlementStatus": "<string>",
  "commissionRecipientISPB": "<string>",
  "feePayerISPB": "<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

Idempotency-Key
string

Idempotency key, max 255 characters

Corpo

application/json
amount
integer<int64>
obrigatório

Transaction amount in centavos (BRL minor units); must be greater than zero.

Exemplo:

15000

commissionAmount
integer<int64>
obrigatório

Commission amount in centavos (BRL minor units); zero or positive.

Exemplo:

10

endToEndId
string
obrigatório

PIX EndToEndID of the transaction, format E{ISPB}{YYYYMMDD}{uniqueID}.

Exemplo:

"E12345678202604281234ABCDE123456"

feeAmount
integer<int64>
obrigatório

Fee amount in centavos (BRL minor units); zero or positive.

Exemplo:

25

operationId
string
obrigatório

Caller-assigned idempotency/business identifier for the operation, max 128 characters.

Exemplo:

"op-20260428-0001"

senderISPB
string
obrigatório

ISPB of the sending participant, exactly 8 numeric digits.

Exemplo:

"12345678"

commissionRecipientISPB
string

ISPB of the participant receiving the commission (8 numeric digits); optional.

Exemplo:

"87654321"

feePayerISPB
string

ISPB of the participant charged the fee (8 numeric digits); optional.

Exemplo:

"12345678"

Resposta

OK

commissionAmount
integer<int64>
obrigatório

Commission amount applied, in centavos (BRL minor units).

Exemplo:

10

feeAmount
integer<int64>
obrigatório

Fee amount applied, in centavos (BRL minor units).

Exemplo:

25

feeAttributionId
string
obrigatório

UUID of the fee attribution record; empty when no fee attribution was created.

Exemplo:

"550e8400-e29b-41d4-a716-446655440000"

operationId
string
obrigatório

Caller-assigned identifier echoed from the request.

Exemplo:

"op-20260428-0001"

routingDecision
object
obrigatório

Routing snapshot showing how the operation was directed through sponsor/indirect participants.

sagaId
string
obrigatório

UUID of the orchestration saga coordinating the operation.

Exemplo:

"550e8400-e29b-41d4-a716-446655440000"

sagaStatus
string
obrigatório

Current state of the orchestration saga (e.g. COMPLETED).

Exemplo:

"COMPLETED"

settlementId
string
obrigatório

UUID of the settlement created for this operation.

Exemplo:

"550e8400-e29b-41d4-a716-446655440000"

settlementStatus
string
obrigatório

Current state of the settlement (e.g. PENDING).

Exemplo:

"PENDING"

commissionRecipientISPB
string

ISPB of the participant receiving the commission (8 numeric digits); omitted when no fee attribution applies.

Exemplo:

"87654321"

feePayerISPB
string

ISPB of the participant charged the fee (8 numeric digits); omitted when no fee attribution applies.

Exemplo:

"12345678"