Ledga
POST /reports/custom/{savedReport}/run

Run a saved custom report

Runs the report's specification, its relative dates resolved afresh, as POST /api/v1/transactions/search would: a page of transactions and the next cursor. A report naming something no longer the ledger's is refused with INVALID_REFERENCE, its broken conditions under errors by path.

Parameters

NameInTypeDescription
savedReportrequired path string
uuid

Request body

FieldTypeDescription
limit integer
default: 25 · min: 1 · max: 100
cursor string
nullable
The previous page's next cursor

Responses

200A page of the report's transactions, as the search returns them
{
  "success": true,
  "meta": {
    "pagination": {
      "limit": 25,
      "has_more": true,
      "next_cursor": "eyJpZCI6IjAxOTk3YzFlLTRkMmEtN2MzZS05YTFiLTJmMGU4YzZkNGI1YSJ9",
      "previous_cursor": null
    }
  },
  "data": [
    {
      "id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
      "ledger_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
      "journal_id": null,
      "reference": "INV-001",
      "description": "Payment received",
      "effective_date": "2026-01-15T10:30:00Z",
      "date": "2026-01-15T10:30:00Z",
      "layer": "settled",
      "status": "posted",
      "total_amount": "100.00",
      "entry_count": 2,
      "hash": null,
      "previous_hash": null,
      "correlation_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
      "correlation_source_id": null,
      "correlation_type": null,
      "metadata": null,
      "attributes": {
        "customer_id": "C-123",
        "loan_id": "L-42"
      },
      "original_transaction_id": null,
      "reversal_reason": null,
      "voided_by": null,
      "voided_at": null,
      "void_reason": null,
      "entries": [
        {
          "id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
          "account_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
          "account_code": "1000",
          "account_name": "Cash",
          "amount": "100.00",
          "type": "debit",
          "description": null,
          "layer": "settled",
          "metadata": null
        }
      ],
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ]
}
404Not this ledger's, or unknown
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
422INVALID_REFERENCE for a broken report; SEARCH_TOO_BROAD, AMOUNT_NOT_READY or SEARCH_NOT_READY as for a search; a bad cursor or limit, or any other body member
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}
429The search's rate limit
{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR"
}

Examples

curl -X POST https://ledga.io/api/v1/reports/custom/{savedReport}/run \
  -H "Authorization: Bearer sk_xxxxxxxx_your_secret" \
  -H "Content-Type: application/json" \
  -d '{
  "limit": 25
}'

← All endpoints