Pular para o conteúdo principal
POST
/
v1
/
reservations
/
transaction
/
{transaction_id}
/
release
Liberar as reservas de uma transação
curl --request POST \
  --url https://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release \
  --header 'Content-Type: <content-type>' \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release"

headers = {
"Content-Type": "<content-type>",
"X-API-Key": "<api-key>"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', 'X-API-Key': '<api-key>'}
};

fetch('https://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release', 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://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-API-Key: <api-key>"
],
]);

$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://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release"

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

req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-API-Key", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release")
.header("Content-Type", "<content-type>")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://tracer.sandbox.lerian.net/v1/reservations/transaction/{transaction_id}/release")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "transactionId": "019c96a0-1071-7a0d-9916-a831221de252",
  "status": "RELEASED",
  "flipped": 2
}
{
"code": "TRC-0007",
"title": "Invalid Path Parameter",
"message": "The provided ID is not a valid UUID format. Please verify the ID and try again."
}
{
"code": "Unauthenticated",
"title": "Unauthorized",
"message": "API Key missing or invalid. Provide a valid API Key in the X-API-Key header."
}
{
"code": "TRC-0004",
"title": "Internal Server Error",
"message": "An unexpected error occurred. Please try again later or contact support if the issue persists."
}

Autorizações

X-API-Key
string
header
obrigatório

Autenticação por API Key. Usada por implantações single-tenant (MULTI_TENANT_ENABLED=false). Enviada em todas as requisições /v1/*.

Cabeçalhos

Content-Type
string
obrigatório

O tipo de mídia do recurso. Deve ser application/json.

X-API-Key
string
obrigatório

A chave de API para autenticação. Este header é obrigatório para todos os endpoints, exceto verificações de integridade.

X-Request-Id
string<uuid>

Um identificador único usado para rastrear cada requisição.

Parâmetros de caminho

transaction_id
string<uuid>
obrigatório

O ID de correlação da transação do ledger cujas reservas você deseja confirmar ou liberar.

Resposta

Indica que as reservas da transação foram liberadas.

Corpo devolvido pelos endpoints de confirmar e liberar por transação.

transactionId
string<uuid>
obrigatório

A transação do ledger cujas reservas foram transicionadas.

status
enum<string>
obrigatório

O estado terminal ao qual as reservas foram resolvidas.

Opções disponíveis:
CONFIRMED,
RELEASED
flipped
integer
obrigatório

Quantas reservas foram transicionadas. Um valor de 0 é uma operação nula válida e idempotente — a transação não retinha nenhuma reserva aberta.