SautiDesk
SautiDesk API
Sales

Count leads and value by pipeline stage

GET
/v1/desk/leads/summary

Returns one row per pipeline stage, in board order (open stages, then won, then lost), with how many leads it holds and their total value. It takes the same filters as the lead list and counts only leads the key's person may see; status defaults to all here, so the won and lost rows count closed leads. Leads in a currency other than the workspace's are counted in other_currency_leads, not in value_minor. Answers 403 desk.sales_off while Sales is switched off.

Requires: desk.read scope, Converse or Contacts licence, Pro plan.

Authorization

bearerAuth
AuthorizationBearer <token>

A SautiDesk API key. An owner or admin makes it under Settings in SautiDesk for a named person and picks the scopes. The key is shown once. Send it as Authorization: Bearer <key>. It acts as that person and as nobody else.

In: header

Query Parameters

stage?string

Only leads at this stage: its id (a UUID).

queue?string

Only leads in this queue: its id (a UUID).

tag?string

Only leads carrying this tag: its id (a UUID).

source?string

Only leads from this source: its id (a UUID).

contact?string

Only this contact's leads: their id (a UUID). With status=open and limit=1 it returns the contact's open lead.

status?string

all (default here), open, won, lost or closed (won or lost).

temperature?string

Only leads at this temperature: hot, warm or cold.

view?string

mine (leads the key's person owns), unassigned (in a queue with no owner), queue (one queue: pass queue too) or all (default, every lead the person may see).

next_step?string

overdue (the next follow-up is past due), today (it is due before the end of today on the workspace's clock) or none (open leads with no follow-up booked).

sort?string

Has no effect here: the rows always come in board order.

owner?string

Only leads owned by this person: their id (a UUID), me for the key's own person, or none for unowned leads.

Response

OK

Example

{  "data": [    {      "stage_id": "bfed4519-9865-4baf-930a-0ac87c16a093",      "name": "Amina Wanjiru",      "kind": "billing",      "position": 1,      "leads": 1,      "value_minor": 1,      "currency": "KES",      "other_currency_leads": 1    }  ]}
FieldTypeDescription
datarequiredobject[]
stage_idrequiredstring (uuid)
namerequiredstringA name for it.
kindrequiredstringWhat kind it is.
positionrequiredintegerWhere it sits in the list, starting at 0.
leadsrequiredinteger
value_minorrequiredinteger
currencyrequiredstringThe currency code of the money in this report, for example KES. Write money figures with it. Left out when the report has no money.
other_currency_leadsrequiredinteger
curl -X GET "https://api.sautidesk.com/v1/desk/leads/summary"