POST
/reports/custom/{savedReport}/totals Count and sum a saved custom report's transactions
As POST /api/v1/transactions/search/totals for the report's filter, whatever its sort. It takes no body: any member sent is refused. A broken report is refused with INVALID_REFERENCE.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
savedReportrequired | path | string uuid |
Responses
200The totals
{
"success": true,
"data": {
"count": 0,
"total_amount": null
}
} 404Not this ledger's, or unknown
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 422INVALID_REFERENCE for a broken report; TOTALS_TOO_BROAD past the totals' timeout; a 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}/totals \
-H "Authorization: Bearer sk_xxxxxxxx_your_secret"