Saltar al contenido principal
PATCH
/
v1
/
str
/
settings
Actualizar ajustes de canal
curl --request PATCH \
  --url https://spb.sandbox.lerian.net/v1/str/settings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deliveryMode": "<string>",
  "ispb": "<string>",
  "metadata": {}
}
'
import requests

url = "https://spb.sandbox.lerian.net/v1/str/settings"

payload = {
    "deliveryMode": "<string>",
    "ispb": "<string>",
    "metadata": {}
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({deliveryMode: '<string>', ispb: '<string>', metadata: {}})
};

fetch('https://spb.sandbox.lerian.net/v1/str/settings', 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/settings",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'deliveryMode' => '<string>',
    'ispb' => '<string>',
    'metadata' => [
        
    ]
  ]),
  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/settings"

	payload := strings.NewReader("{\n  \"deliveryMode\": \"<string>\",\n  \"ispb\": \"<string>\",\n  \"metadata\": {}\n}")

	req, _ := http.NewRequest("PATCH", 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.patch("https://spb.sandbox.lerian.net/v1/str/settings")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"deliveryMode\": \"<string>\",\n  \"ispb\": \"<string>\",\n  \"metadata\": {}\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://spb.sandbox.lerian.net/v1/str/settings")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"deliveryMode\": \"<string>\",\n  \"ispb\": \"<string>\",\n  \"metadata\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "channelStatus": "<string>",
  "deliveryMode": "<string>",
  "ispb": "<string>",
  "webhooks": [
    {
      "createdAt": "2023-11-07T05:31:56Z",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "isActive": true,
      "messageTypes": [
        "<string>"
      ],
      "url": "<string>",
      "metadata": {}
    }
  ],
  "certDaysRemaining": 123,
  "certificateExpiresAt": "2023-11-07T05:31:56Z",
  "metadata": {},
  "readiness": {
    "blockers": [
      "<string>"
    ],
    "status": "<string>",
    "warnings": [
      "<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

X-Idempotency
string

Idempotency key (primary).

X-Idempotency-Key
string

Idempotency key (legacy alias for X-Idempotency).

X-TTL
string

Idempotency key TTL in seconds (overrides the configured default).

Cuerpo

application/json
deliveryMode
string

Optional notification delivery mode to set: WEBHOOK, EVENT (streaming), or BOTH; left unchanged when omitted.

Ejemplo:

"WEBHOOK"

ispb
string

Optional participant ISPB to set, the 8-digit BACEN institution identifier; left unchanged when omitted.

Required string length: 8
Pattern: ^[0-9]{8}$
Ejemplo:

"12345678"

metadata
object

Optional client-supplied settings metadata to merge; sensitive keys are redacted on read.

Respuesta

OK

channelStatus
string
requerido

SPB channel connectivity status: CONNECTED or PENDING_CONFIGURATION.

Ejemplo:

"CONNECTED"

deliveryMode
string
requerido

Notification delivery mode: WEBHOOK, EVENT (streaming), or BOTH.

Ejemplo:

"WEBHOOK"

ispb
string
requerido

Participant ISPB the settings belong to, the 8-digit BACEN institution identifier.

Required string length: 8
Pattern: ^[0-9]{8}$
Ejemplo:

"12345678"

webhooks
object[] | null
requerido

Configured webhook endpoints that receive STR notifications.

certDaysRemaining
integer<int64>

Whole days remaining until the active certificate expires; absent when no certificate is configured.

Ejemplo:

365

certificateExpiresAt
string<date-time>

UTC RFC 3339 expiry timestamp of the active ICP-Brasil certificate; absent when no certificate is configured.

Ejemplo:

"2027-05-04T18:30:00Z"

metadata
object

Client-supplied settings metadata; sensitive keys and values are redacted before being returned.

readiness
object

Embedded readiness summary; present only when the readiness summary is available.