Skip to content

Dashboard API

The index module builds the client area dashboard. Its one call returns everything the dashboard shows in a single request. See The client area for the page itself.

POST /api/client/index/get_dashboard

Returns the signed-in client’s dashboard: the profile, counts of tickets, invoices and orders, and the five most recently updated orders and tickets.

No parameters.

Returns: An object: profile (the client’s details as profile get returns them, without billing_email and po_number), tickets (total, open, on_hold, closed; null while tickets are turned off), invoices (total, paid, unpaid, counting approved invoices), orders (total, active, and expiring: active orders due to be invoiced within the days set to issue renewal invoices before expiry, with no unpaid invoice yet), recent_orders (up to 5 orders, each as order get returns it) and recent_tickets (up to 5 tickets; empty while tickets are turned off).

An authorized user (not the account owner) gets a trimmed result: without the View and open support tickets permission tickets is null and recent_tickets empty; without View and pay invoices invoices is null; without View services orders is null and recent_orders empty; without Change the account details the profile keeps only id, first_name, last_name, company, currency, lang, timezone, status and created_at (plus balance with the invoices permission).

Example

Request parameters:

{}

result:

{
"profile": {
"id": 12,
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"company": "Example Hosting",
"currency": "USD",
"balance": 0
},
"tickets": {
"total": 3,
"open": 1,
"on_hold": 0,
"closed": 2
},
"invoices": {
"total": 14,
"paid": 13,
"unpaid": 1
},
"orders": {
"total": 2,
"active": 2,
"expiring": 1
},
"recent_orders": [],
"recent_tickets": []
}