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"
}
}Path Parameters
Query Parameters
Response
OK
Was this page helpful?

