group_by chooses the grouping, is_summary chooses the shape./owner/reports/advance_payments. Not paginated, and no {format} suffix.YYYY-MM-DD, zero-padded. The account's display format (as used on the report page) is refused with a 400.group_by defaults to client. Client groups are keyed on a name #number string and carry no id; staff groups carry an integer id; periodic groups (daily, weekly, monthly, yearly) carry period.start and period.end.invoice_type is advance_payment or credit_note; omit it for both. Credit notes appear with a negative amount and tax and zero unsettled figures.currency=-1 does not convert on this report. It is accepted, because the report page offers it, but the result is the same as omitting currency: one block per currency.unsettled_amount, tax and unsettled_tax; the rest have null there and continues_document: true. In a subtotal or total, amount sums all rows; the other three sum first rows only, so they count each document once.client_id, staff_id and branch_id are repeatable and accept positive integers only. If any value is not a positive integer, the whole list is refused with a 400 rather than partly applied. branch_id is available only when the Branches plugin is active.403; if the report is not enabled for the deployment the answer is 404.| Bound | Default | Applies to |
|---|---|---|
| Payment rows | 20,000 | is_summary=0 |
| Payment rows | 100,000 | is_summary=1 |
| Groups | 2,000 | both |
400 with a message saying which one and how to narrow the request (a shorter date range, a longer period, or is_summary=1).400 naming it. The 400 body carries validation_errors, one message per offending parameter.curl --location --globoff 'https://.daftara.com/api2/reports/advance_payments?group_by=client&is_summary=0&date_from=2026-02-01&date_to=2026-10-31¤cy=EGP&invoice_type=advance_payment&client_id=&payment_method=&staff_id=&branch_id=' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Content-Type: application/json'{
"result": "successful",
"code": 200,
"data": {
"report": {
"key": "advance_payments",
"group_by": "client",
"mode": "detailed",
"group_dimension": "client",
"title": "Advance Payments by Client"
},
"filters": {
"group_by": "client",
"is_summary": 0,
"date_from": "2020-01-01",
"date_to": "2026-10-12",
"currency": null,
"invoice_type": null,
"client_id": [],
"payment_method": null,
"staff_id": [],
"branch_id": []
},
"columns": [
{
"key": "amount",
"label": "Total Amount"
},
{
"key": "unsettled_amount",
"label": "Unsettled Amount"
},
{
"key": "tax",
"label": "Total Tax"
},
{
"key": "unsettled_tax",
"label": "Unsettled Tax"
}
],
"currencies": [
{
"currency": "AED",
"totals": {
"amount": 10948.85,
"unsettled_amount": 10948.85,
"tax": 1349.85,
"unsettled_tax": 1349.85
},
"groups": [
{
"key": "Urgent Client #123157",
"label": "Urgent Client #123157",
"subtotals": {
"amount": 10948.85,
"unsettled_amount": 10948.85,
"tax": 1349.85,
"unsettled_tax": 1349.85
},
"rows": [
{
"document": {
"id": 2267,
"no": "00003",
"type": "advance_payment",
"date": "2025-06-03",
"client": {
"id": 139,
"name": "123157"
},
"created_by": {
"id": 36,
"name": "#000036 Ikea ddd Back Office"
}
},
"continues_document": false,
"payment_method": "cash",
"payment_method_label": "Cash",
"amount": 10348.85,
"unsettled_amount": 10348.85,
"tax": 1349.85,
"unsettled_tax": 1349.85
}
]
}
]
}
],
"meta": {
"currency_count": 4,
"group_count": 24,
"row_count": 35,
"is_summary": false,
"page_columns": {
"client": false,
"date": true,
"created_by": true
}
}
}
}