Saltar al contenido principal
POST
/
v1
/
str
/
emission-approvals
/
{id}
/
deny
Denegar una emisión retenida
curl --request POST \
  --url https://spb.sandbox.lerian.net/v1/str/emission-approvals/{id}/deny \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
import requests

url = "https://spb.sandbox.lerian.net/v1/str/emission-approvals/{id}/deny"

payload = { "reason": "<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({reason: '<string>'})
};

fetch('https://spb.sandbox.lerian.net/v1/str/emission-approvals/{id}/deny', 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/emission-approvals/{id}/deny",
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([
'reason' => '<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/emission-approvals/{id}/deny"

payload := strings.NewReader("{\n \"reason\": \"<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/emission-approvals/{id}/deny")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spb.sandbox.lerian.net/v1/str/emission-approvals/{id}/deny")

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 \"reason\": \"<string>\"\n}"

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

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

Authorization
string

Bearer JWT token (the denier's actor subject is derived from it).

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.

Parámetros de ruta

id
string
requerido

Outbound message id of the parked emission to deny.

Cuerpo

application/json
reason
string

Optional denial rationale recorded on the failed emission. Defaults to "approval denied".

Ejemplo:

"out of policy"

Respuesta

OK

correlationId
string
requerido

Request-scoped correlation identifier echoing X-Request-ID.

Ejemplo:

"req-7a3f9c2e"

id
string
requerido

Outbound message id the action was applied to.

Ejemplo:

"6f2c..."

quorumReached
boolean
requerido

True when this signature met the required quorum and flipped the emission to SUBMITTED (approve only).

Ejemplo:

true

status
string
requerido

Post-action message status (SUBMITTED on quorum, PENDING_APPROVAL while awaiting more signers, FAILED on deny).

Ejemplo:

"SUBMITTED"