Daftra API
All Endpoints
Daftra PartnersDevelopers Portal
All Endpoints
Daftra PartnersDevelopers Portal
  1. Advance Payments Report
  • Welcome
  • Getting Started
  • Authorization
    • How To Authorize
    • Generate Access Token
  • Endpoints
    • Site
      • GET Site Info
    • Sales
      • Validation Errors
      • Invoices
        • GET All Invoices
        • GET Single Invoice
        • Edit Invoice
        • Delete Invoice
        • Add New Invoice
        • Bulk Add Invoices
        • Edit Invoice Draft Status
        • Assign Work Order to Invoice
        • Add Shipping to Invoice
        • Convert Sales Order to Invoice
        • Delete Sales Order
      • Subsciptions
        • List Subscriptions
        • View Subscription
        • Create Subscription
        • Edit Subscription
        • Delete Subscription
      • Estimates
        • GET All Estimates
        • GET Single Estimate
        • Add New Estimate
        • Edit Estimate
        • Delete Estimate
      • Credit Notes
        • GET All Credit Notes
        • GET Single Credit Note
        • Add New Credit Note
        • Edit Credit Notes
        • Delete Credit Notes
      • Refund Receipts
        • GET All Refund Receipts
        • GET Single Refund Receipt
        • Add New Refund Receipt
        • Edit Refund Receipts
        • Delete Refund Receipts
        • Bulk Add Refund Receipts
      • Invoice Payments
        • GET All Invoice Payments
        • GET Single Invoice Payment
        • Add New Invoice Payment
        • Edit Invoice Payments
        • Delete Invoice Payments
      • Invoice Appointments
        • GET All Invoice Appointments
        • GET Single Invoice Appointment
        • Add New Invoice Appointment
        • Edit Invoice Appointments
        • Delete Invoice Appointments
      • Advance Payment Invoices
        • GET All Advance payment
        • GET Single Advance payment
        • Add Advance Payment
      • Estimate Appointments
        • GET All Estimate Appointments
        • GET Single Estimate Appointment
        • Add New Estimate Appointment
        • Edit Estimate Appointments
        • Delete Estimate Appointments
        • Update Estimate Appointment (POST alias)
      • Shipping Options
        • List Shipping Options
      • POS
        • Get POS Shift Session
      • Follow-Up Status
        • Get All Follow-Up Statuses by type
        • Get Single Follow-Up Status
        • Delete Follow-Up Status
        • Get All Follow-Up Statuses
        • Add New Follow-Up Status
    • Clients
      • Clients
        • GET All Clients
        • GET Single Client
        • Add New Client
        • Edit Clients
        • Delete Clients
        • Assign Staff To Client
        • Client Loyalty Points
        • Bulk Add Clients
        • Client Has Membership
        • Client Attendance By Barcode
      • Client Appointments
        • GET All Client Appointments
        • GET Single Client Appointment
        • Add New Client Appointment
        • Edit Client Appointments
        • Delete Client Appointments
      • Client Payments
        • GET All Client Payments
        • GET Single Client Payment
        • Add New Client Payment
        • Edit Client Payments
        • Delete Client Payments
      • Client Attendance Log
        • Get All Client Attendance Logs
        • Get Single Client Attendance Log
        • Add New Client Attendance Log
        • Edit Client Attendance Log
        • Delete Client Attendance Log
      • Notes
        • GET All Notes
        • GET Single Note
        • Add New Note
        • Edit Notes
        • Delete Notes
      • Follow-Up Action
        • Get All Follow-Up Actions
        • Get Single Follow-Up Action
        • Delete Follow-Up Action
    • Bookings
      • Booking (Classic version)
        • Get All Bookings
        • Get Single Booking
        • Add new Booking
        • Delete booking
        • Change Booking Status
        • Convert booking to Invoice
      • Booking (Beta version)
        • Get All Bookings
        • Get Single Booking
        • Add new Booking
        • Delete booking
        • Change Booking Status
    • Work Orders
      • Work Order Appointments
        • GET All Work Order Appointments
        • GET Single Work Order Appointment
        • Add New Work Order Appointment
        • Edit Work Order Appointments
        • Delete Work Order Appointments
        • Update Work Order Appointment (POST alias)
      • Work Orders
        • GET All Work Orders
        • GET Single Work Order
        • Add New Work Order
        • Edit Work Orders
        • Delete Work Orders
    • Inventory
      • Products
        • GET All Products
        • GET Single Product
        • Add New Product
        • Edit Products
        • Delete Products
        • List Brands
      • Requsitions
        • GET All Requisitions
        • GET single Requisition
        • Add New Requisition
        • Edit Requisitions
        • Delete Requisitions
        • Trigger Requisition Update
      • Product Categories
        • GET All Product Categories
        • GET Single Product Category
        • Add New Product Category
        • Edit Product Category
        • Delete Product Category
        • Update Category Display Order
        • Update Category Items
      • Stores
        • GET All Stores
        • GET Single Store
        • Add New Store
        • Edit Stores
        • Delete Stores
      • Stock Transactions
        • GET All Stock Transactions
        • GET Single Stock Transaction
        • Add New Stock Transaction
        • Edit Stock Transactions
        • Delete Stock Transactions
      • Product Bundles
        • Add Product bundle
      • Brands
        • Get All Brands
        • Get Single Brand
        • Add New Brand
        • Edit brand
        • Delete brand
      • Unit Templates
        • Get All Unit Templates
        • Get Single Unit Template
        • Add Unit Template
        • Edit Unit Template
    • Accounting
      • Journals
        • Delete Journals
        • Edit Journals
        • GET All Journals
        • GET Single Journal
        • Add New Journal
      • Journal Accounts
        • GET All Journal Accounts
        • GET Single Journal Account
        • Add New Journal Account
        • Edit Journal Accounts
        • Delete Journal Accounts
      • Journal Cats
        • GET All Journal Cats
        • GET Single Journal Cat
        • Delete Journal Cats
        • Edit Journal Cats
        • Add New Journal Cat
      • Cost Centers
        • Get All Cost Centers
        • Get Single Cost Center
        • Add New Cost Center
        • Edit Cost Center
        • Delete Cost Center
    • Finance
      • Treasuries
        • GET All Treasuries
        • GET Single Treasury
        • Add New Treasury
        • Edit Treasuries
        • Delete Treasuries
      • Expenses
        • GET All Expenses
        • GET Single Expens
        • Add New Expens
        • Edit Expenses
        • Delete Expenses
      • Incomes
        • GET All Incomes
        • GET Single Income
        • Add New Income
        • Edit Incomes
        • Delete Incomes
    • Taxes
      • GET All Taxes
      • GET Single Taxe
      • Add New Taxe
      • Edit Taxes
      • Delete Taxes
    • Purchases
      • Purchase Refunds
        • GET All Purchase Refunds
        • GET Single Purchase Refund
        • Add New Purchase Refund
        • Edit Purchase Refunds
        • Delete Purchase Refunds
      • Purchase Invoices
        • GET All Purchase Invoices
        • GET Single Purchase Invoice
        • Add New Purchase Invoice
        • Edit Purchase Invoices
        • Delete Purchase Invoices
      • Purchase Orders
        • GET All Purchase Orders
        • GET Single Purchase Order
        • Add New Purchase Order
        • Edit Purchase Order
        • Delete Purchase Order
      • Purchase Debit Note
        • Purchase Debit Note
        • Purchase Debit Note
    • Suppliers
      • GET All Suppliers
      • GET Single Supplier
      • Add New Supplier
      • Edit Suppliers
      • Delete Suppliers
    • Staff
      • GET All Staff
      • GET Single Staff
      • Add New Staff
      • DELETE Staff
      • GET Send Staff Login Details
    • Time Tracking
      • GET All Time Tracking
      • GET Single Time Tracking
      • Add New Time Tracking
      • Edit Time Tracking
      • Delete Time Tracking
    • General Listing
      • GET General Listing
    • HR
      • Leave Application
        • Get All Leave Applications
        • Get Single Leave Applications
        • Add Leave Application
        • Edit Leave Application
      • Attendance Logs
        • Get All Attendance Logs
        • Get Single Attendance Log
        • Add Attendance Log
      • Employee Asset
        • Asset Type
          • Get All Types
          • Get Single Type
          • Add New Type
          • Edit Type
        • Asset Location
          • Get All Locations
          • Get Single Location
          • Add New Location
          • Edit Location
        • Asset Storage
          • Get All Storages
          • Get Single Storage
          • Add New Storage
          • Edit Storage
        • Asset
          • Get All Assets
          • Get Single Asset
          • Add New Asset
          • Edit Asset
      • Organizational Structure
        • Designation
          • Get All Designations
          • Get Single Designation
          • Add New Designation
          • Edit Designation
        • Department
          • Get All Departments
          • Get Single Department
          • Add New Department
          • Edit Department
        • Employment Type
          • Get All Employment Types
          • Get Single Employment Type
          • Add New Employment Type
          • Edit Employment Type
    • Branches
      • Get All Branches
      • Get Single Branch
      • Add New Branch
      • Edit Branch
      • Delete Branch
    • Payment Gateways
      • Get All Payment Methods
      • Get Single Payment Method
      • Add Payment Method
      • Add Payment Method Copy
    • Points & Credits
      • Credit Charges
        • Get All Credit Charges
        • Get Single Credit Charge
        • Add New Credit Charge
        • Edit Credit Charge
      • Credit Usage
        • Get All Credit Usage
        • Get Single Credit Usage
        • Add New Credit Usage
        • Edit Credit Usage
        • Get All Credit Usage Amount
        • Get Single Credit Usage Amount
        • Add Credit Usage Amount
        • Edit Credit Usage Amount
      • Credit Types
        • Get All Credit types
        • Get Single Credit type
        • Add New Credit type
        • Edit Credit type
      • Packages
        • Get All Packages
        • Get Single Package
        • Add New Package
        • Edit Package
      • Packages Credit Types
        • Get All Package Credit Types
        • Get Single Package Credit Type
        • Add Package Credit Type
        • Edit Package Credit Type
    • Workflow
      • Get All Records
      • Get Single Record
      • Add New Record
      • Edit Record
    • Multi Entity Request
      • Overview
      • Multi Entity Request
    • Follow-Up Statuses
      • Get All Follow-Up Statuses
      • Get Single Follow-Up Status
      • Add New Follow-Up Status
      • Delete Follow-Up Status
    • Entities
      • List entity records
      • View entity record
      • Create entity record
      • Update entity record
      • Delete entity record
    • Reports
      • Sales Revenue Report
        • Sales Revenue report
      • Product Sales Report
        • Product Sales report
      • Payments Report
        • Payments report
      • Profit & Loss (Accrual) Report
        • Profit & Loss (Accrual) report
      • Advance Payments Report
        • Advance Payments report
          GET
      • Invoice-Returns Cross-Reference Report
        • Invoice-Returns Cross-Reference report
      • Invoice Net Position Report
        • Invoice Net Position report
      • ZATCA Submission Report
        • ZATCA Submission report
  • Advanced Filtering
    • API Improvements
    • Filtering
    • Endpoints Structure
    • Using API v2
      • Data Fetching — Filtered
  • Developers Portal
    • Introduction & Getting Started
    • Dashboard, Earnings & Withdrawals
    • Creating a New App
    • App Configuration
    • Managing Your App
    • Entities: Modeling Your Data
    • The Entity Builder
    • Buttons & Page Scripts
    • Integrations: Webhooks
    • Invitations, Publishing & Reviews
    • Developers Portal Endpoints
      • Activate / Deactivate App
      • Lock / Unlock Entity Record
      • Check App Status
  1. Advance Payments Report

Advance Payments report

Production
https://{{subdomain}}.daftara.com
Production
https://{{subdomain}}.daftara.com
GET
https://{{subdomain}}.daftara.com
/api2/reports/advance_payments
OperationId:get_api2_reports_advance_payments
The Advance Payments report: advance-payment invoices (For KSA Clients Only) and the credit notes issued against them, with their payments and unsettled balances. group_by chooses the grouping, is_summary chooses the shape.
Mirrors /owner/reports/advance_payments. Not paginated, and no {format} suffix.
Dates are ISO YYYY-MM-DD, zero-padded. The account's display format (as used on the report page) is refused with a 400.
Grouping. 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.
Document types. 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.
Documents with several payments. A document paid in several payments spans several rows (detailed mode). Only the first row carries 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.
Id lists. 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.
Access. A caller whose credentials are not permitted to read this report gets 403; if the report is not enabled for the deployment the answer is 404.

Size ceilings#

BoundDefaultApplies to
Payment rows20,000is_summary=0
Payment rows100,000is_summary=1
Groups2,000both
Defaults are per-deployment configuration and can differ between accounts. The endpoint refuses rather than truncates: above a ceiling it answers 400 with a message saying which one and how to narrow the request (a shorter date range, a longer period, or is_summary=1).
Anything not documented above is a 400 naming it. The 400 body carries validation_errors, one message per offending parameter.

Request

Query Params

Header Params

Responses

🟢200
application/json
The report.
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
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&currency=EGP&invoice_type=advance_payment&client_id=&payment_method=&staff_id=&branch_id=' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Content-Type: application/json'
Response Response Example
Detailed, grouped by client (excerpt)
{
    "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
            }
        }
    }
}
Previous
Profit & Loss (Accrual) report
Next
Invoice-Returns Cross-Reference report