Pular para o conteúdo principal
GET
/
v1
/
schedules
/
{schedule_id}
Obter um agendamento Pix
curl --request GET \
  --url https://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Account-Id: <x-account-id>'
import requests

url = "https://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id}"

headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>"
}

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

print(response.text)
const options = {
method: 'GET',
headers: {'X-Account-Id': '<x-account-id>', Authorization: 'Bearer <token>'}
};

fetch('https://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id}', 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://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Account-Id: <x-account-id>"
],
]);

$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://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id}"

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

req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id}")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-indirect.api.lerian.net/v1/schedules/{schedule_id}")

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

request = Net::HTTP::Get.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "accountId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
  "amount": "100.50",
  "attemptCount": 0,
  "attempts": [
    {
      "attemptedAt": "2026-08-15T06:00:02Z",
      "endToEndId": "E1234567820260815060011111111111",
      "failureMessage": "Midaz error: balance below required (06:00 BRT attempt)",
      "failureReason": "INSUFFICIENT_FUNDS",
      "initiationId": "a1111111-1111-4111-8111-111111111111",
      "transferId": "f1a2b3c4-1111-4d5e-9f6a-7b8c9d0e1f23"
    }
  ],
  "cancelledAt": "2026-05-19T09:15:33Z",
  "createdAt": "2026-05-26T12:30:00Z",
  "description": "Recurring charge installment 03/12",
  "destination": {
    "account": {
      "branch": "0001",
      "number": "123456789",
      "participant": "12345678",
      "type": "CACC"
    },
    "key": "john.doe@example.com",
    "owner": {
      "document": "12345678901",
      "name": "John Doe",
      "tradeName": "John's Business"
    }
  },
  "endToEndId": "E1234567820260815060012345678901",
  "executedAt": "2026-08-15T06:00:04Z",
  "failedAt": "2026-08-15T06:00:04Z",
  "failureMessage": "<string>",
  "failureReason": "INSUFFICIENT_FUNDS",
  "firedAt": "2026-08-15T06:00:04Z",
  "id": "01989f9e-6508-79f8-9540-835be49fbd0d",
  "initiationId": "550e8400-e29b-41d4-a716-446655440010",
  "initiationType": "MANUAL",
  "maxAttempts": 2,
  "recurrenceId": "01988a7c-1234-7abc-8def-111122223333",
  "scheduledFor": "2026-08-15T09:00:00Z",
  "status": "SCHEDULED",
  "transferId": "c8d27e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
  "updatedAt": "2026-05-26T12:30:00Z"
}
{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Cabeçalhos

X-Account-Id
string
obrigatório

Identificador único da Conta do Ledger Midaz (formato UUID).

Parâmetros de caminho

schedule_id
string
obrigatório

ID do agendamento (UUID v7)

Resposta

OK

accountId
string

AccountID ecoa o AccountID de entrada para correlação de auditoria/log.

Exemplo:

"019cf6ef-e418-7ced-80c0-7b9816faa798"

amount
string

Amount é o valor em BRL com 2 casas decimais.

Exemplo:

"100.50"

attemptCount
integer

AttemptCount é o número de tentativas de disparo feitas até agora.

Exemplo:

0

attempts
object[]

Attempts é a lista cronológica de tentativas de disparo anteriores que falharam. A tentativa bem-sucedida não é incluída aqui; ela é registrada no próprio agendamento via TransferID e EndToEndID. Array vazio quando nenhuma falha foi registrada.

cancelledAt
string<date-time>

CancelledAt é o momento em que o agendamento chegou a CANCELLED. Ausente para registros que não estão em CANCELLED.

Exemplo:

"2026-05-19T09:15:33Z"

createdAt
string<date-time>

CreatedAt é a data/hora de persistência (ISO 8601 UTC).

Exemplo:

"2026-05-26T12:30:00Z"

description
string

Description é a mensagem legível opcional da transferência.

Exemplo:

"Recurring charge installment 03/12"

destination
object

Destination é o snapshot do destino capturado no agendamento.

endToEndId
string

EndToEndID é o identificador end-to-end do BACEN da transferência liquidada (resolvido via TransferID). Ausente para estados que não são EXECUTED.

Exemplo:

"E1234567820260815060012345678901"

executedAt
string<date-time>

ExecutedAt é o momento em que o agendamento chegou a EXECUTED. Ausente para registros que não estão em EXECUTED.

Exemplo:

"2026-08-15T06:00:04Z"

failedAt
string<date-time>

FailedAt é o momento em que o agendamento chegou ao estado terminal FAILED. Ausente para registros que não estão em FAILED. Simétrico a ExecutedAt / CancelledAt.

Exemplo:

"2026-08-15T06:00:04Z"

failureMessage
string

FailureMessage é a descrição de falha legível em texto livre (com PII sanitizada). Ausente para registros que não estão em FAILED.

failureReason
enum<string>

FailureReason categoriza uma falha terminal. Snapshot do FailureReason da entrada mais recente de Attempts[]. Ausente para registros que não estão em FAILED.

Opções disponíveis:
INSUFFICIENT_FUNDS,
BTG_REJECTED,
MIDAZ_REJECTED,
VALIDATION_FAILED,
SCHEDULE_STALE_TIMEOUT,
SCHEDULE_RETRIES_EXHAUSTED
Exemplo:

"INSUFFICIENT_FUNDS"

firedAt
string<date-time>

FiredAt é o instante de despacho mais recente. Ausente até que o agendamento inicie o processamento (PROCESSING / EXECUTED / FAILED).

Exemplo:

"2026-08-15T06:00:04Z"

id
string

ID é o identificador único do agendamento (UUID v7, gerado pela aplicação).

Exemplo:

"01989f9e-6508-79f8-9540-835be49fbd0d"

initiationId
string

InitiationID é a payment initiation referenciada no momento da criação (âncora de auditoria). Nunca é reutilizada no momento do disparo; cada tentativa de disparo usa sua própria initiation, exposta por tentativa como Attempts[].InitiationID.

Exemplo:

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

initiationType
enum<string>

InitiationType registra como o destino foi capturado (MANUAL, KEY, QR_CODE).

Opções disponíveis:
MANUAL,
KEY,
QR_CODE
Exemplo:

"MANUAL"

maxAttempts
integer

MaxAttempts é o limite de retentativas por registro aceito no momento da criação.

Exemplo:

2

recurrenceId
string

RecurrenceID ecoa a âncora da recorrência pai quando o agendamento foi criado a partir de um fluxo recorrente. Vazio para chamadas diretas de POST /v1/schedules.

Exemplo:

"01988a7c-1234-7abc-8def-111122223333"

scheduledFor
string<date-time>

ScheduledFor é o momento de disparo em horário de relógio (ISO 8601 UTC).

Exemplo:

"2026-08-15T09:00:00Z"

status
enum<string>

Status é o status do ciclo de vida do agendamento. Sempre SCHEDULED na criação. Ciclo de vida: SCHEDULED -> PROCESSING -> EXECUTED | FAILED | CANCELLED.

Opções disponíveis:
SCHEDULED,
PROCESSING,
EXECUTED,
FAILED,
CANCELLED
Exemplo:

"SCHEDULED"

transferId
string

TransferID é o identificador da transferência liquidada. Preenchido apenas em EXECUTED.

Exemplo:

"c8d27e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"

updatedAt
string<date-time>

UpdatedAt é a data/hora da última transição de status (ISO 8601 UTC).

Exemplo:

"2026-05-26T12:30:00Z"