List the fee debts of a ledger, oldest first
curl --request GET \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"assetCode": "BRL",
"createdAt": "2023-11-07T05:31:56Z",
"creditBalance": "@fees#default",
"debtorBalance": "@payer#default",
"entries": [
{
"amount": "30",
"appliedAt": "2023-11-07T05:31:56Z",
"kind": "settled",
"transactionId": "01920000-0000-7000-8000-000000000002",
"postingRef": "to:0:credit:collect"
}
],
"id": "01920000-0000-7000-8000-000000000001:from:1:debit",
"ledgerId": "01920000-0000-7000-8000-00000000000b",
"openedAmount": "70",
"organizationId": "01920000-0000-7000-8000-00000000000a",
"originTransactionId": "01920000-0000-7000-8000-000000000001",
"remaining": "40",
"seq": 3,
"updatedAt": "2023-11-07T05:31:56Z",
"feePackageId": "01920000-0000-7000-8000-0000000000cc",
"openedAt": "2023-11-07T05:31:56Z"
}
],
"limit": 10,
"next_cursor": "eyJpZCI6IjAxOTI...",
"openTotal": "25",
"prev_cursor": "eyJpZCI6IjAxOTE..."
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}List the fee debts of a ledger, oldest first
GET
/
v2
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
fee-debts
List the fee debts of a ledger, oldest first
curl --request GET \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/fee-debts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"assetCode": "BRL",
"createdAt": "2023-11-07T05:31:56Z",
"creditBalance": "@fees#default",
"debtorBalance": "@payer#default",
"entries": [
{
"amount": "30",
"appliedAt": "2023-11-07T05:31:56Z",
"kind": "settled",
"transactionId": "01920000-0000-7000-8000-000000000002",
"postingRef": "to:0:credit:collect"
}
],
"id": "01920000-0000-7000-8000-000000000001:from:1:debit",
"ledgerId": "01920000-0000-7000-8000-00000000000b",
"openedAmount": "70",
"organizationId": "01920000-0000-7000-8000-00000000000a",
"originTransactionId": "01920000-0000-7000-8000-000000000001",
"remaining": "40",
"seq": 3,
"updatedAt": "2023-11-07T05:31:56Z",
"feePackageId": "01920000-0000-7000-8000-0000000000cc",
"openedAt": "2023-11-07T05:31:56Z"
}
],
"limit": 10,
"next_cursor": "eyJpZCI6IjAxOTI...",
"openTotal": "25",
"prev_cursor": "eyJpZCI6IjAxOTE..."
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Parámetros de ruta
Organization ID (UUID)
Ledger ID (UUID)
Parámetros de consulta
Only the debts of this debtor account, in settlement order
Debtor balance key; requires account_alias (default "default")
open: remaining above zero; settled: the rest. Absent lists both
Number of items per page (default 10, max 100)
Opaque cursor from a previous page
Respuesta
OK
Show child attributes
Show child attributes
Ejemplo:
10
Ejemplo:
"eyJpZCI6IjAxOTI..."
What this debtor balance (account_alias and balance_key) owes over all its open debts, not only this page, each counting at most its opened amount; present only with account_alias
Ejemplo:
"25"
Ejemplo:
"eyJpZCI6IjAxOTE..."
¿Esta página le ayudó?

