Skip to Content
Droot Developers

The Approvals Page

The Approvals page's API: the list, its search, a type's columns, the side panel and Droot AI's brief.

The Approvals page (/approvals) lists every approval waiting on a person (or the ones they decided) in one table, and opens one beside it to review and decide. This guide is its API: the list, its search, the extra columns a record type shows, the side panel's read, and Droot AI's brief. Approval checks, which the list and the panel show, are in Approval Step Conditions.

The list

GET /api/inbox/approvals?view=waiting&tile=overdue&q=chair&modelKey=purchase.order&scopeEntityId=co1&sort=urgency&group=urgency&page=2&size=25&tz=Asia/Kolkata

A signed-in person only (never an API key). The list is exactly what that person's inbox holds: their roles in each company, their active delegations, and only records they can read. Nothing they can't read is listed, counted, totalled or searched.

Parameter Values Default
view waiting (approvals waiting on them), decided (what they approved or rejected) waiting
tile all, overdue, ready (they can decide it now and no check failed), delegated all
q a search (below), at most 200 characters none
modelKey one or more record types, comma-separated every type
scopeEntityId one or more of their companies (another company is a 403) every company
sort urgency, amount-desc, amount-asc, newest, oldest urgency (newest when decided)
group urgency, type, none (the decided view is never grouped) urgency
page, size a page from 1; size 25, 50 or 100 1, 25
tz the reader's IANA time zone, for "due today" the server's

The answer:

{ "view": "waiting", "total": 1240, "page": 2, "size": 25, "pages": 50, "capped": false,
  "rows": [ /* inbox approval entries, plus "urgency" and "match" */ ],
  "groups": [{ "key": "overdue", "label": "Overdue", "count": 62, "totals": [{ "currency": "USD", "amount": "182400.00" }] }],
  "tiles": { "waiting": 1240, "overdue": 62, "ready": 911, "delegated": 14, "decided": 380, "totals": [{ "currency": "USD", "amount": "4812933.50" }] },
  "types": [{ "modelKey": "purchase.order", "label": "Purchase Order", "count": 640 }] }
  • A row is the inbox's approval entry (GET /api/inbox), with urgency (overdue, today, week, later) and, after a search, match: where it was found when that is not a column the table shows ({ "label": "Comment", "text": "…" }). approval.checks is the rule's checks at a glance: { failed, blocking, signal: { text, tone } } (null without checks).
  • groups count and total the whole filtered list, not the page. Totals are exact decimal strings, one per currency; amounts that are plain numbers (not money) are not totalled.
  • capped is true when the person has more than 5,000 approvals: the list then holds the first 5,000.

Every term must match the same row:

Term Matches
chair any field, line, comment or file name holding it (case does not matter)
"north plant" the phrase
supplier:metro, cost-center:"line 3" that field only (its label, spaces and dashes ignored; a prefix is enough)
amount>10000, amount<=500 the row's amount, compared exactly

What is searched, read as the person in each record's company: the title, the requester, the type, the company, the fields their role may read (select labels, lookup titles, user names, table cells), the record's comments, and the names of files attached through a field they may read (or the timeline). Folder files linked to a record are not searched (they follow their folder's rules).

The Inbox (/inbox) uses the same search, for approvals and for tasks:

GET /api/inbox?tab…&q=supplier:metro amount>10000&limit=25&cursor=…

q takes the terms in the table above (at most 200 characters) and works with every other filter of the route (kind, modelKey, scopeEntityId, overdue, decided). The list stays a cursor list: the kernel reads the inbox in batches, newest first, keeps the rows that match and stops at a page of them (limit), and nextCursor continues right after the last row it took. One request reads at most 500 rows: when that holds fewer matches than a page, the answer carries those (maybe none) with a nextCursor, and the next request goes on from there. A task is searched by its text, its note and its assignee, then by the record it sits on, read as the person. A row found by a place its summary does not show carries match ({ "label": "Comment", "text": "…" }), as on the Approvals page. A blank q is the plain inbox.

Columns of one record type

When the list shows one record type, the table adds that type's own columns from its inbox layout (inbox.columns, up to 6 { field, label? }; a field of the record, a related field through lookups, or a total). Each row's summary.columns carries them, read as the person (a field they can't read is left out). Set them in Setup › Customize › Models › the model › Inbox Layout › Approvals Table Columns, or in the model's inbox:

{ "inbox": { "columns": [{ "field": "supplier" }, { "field": "costCenter", "label": "Cost Centre" }, { "field": "projectId.group" }] } }

The side panel's read

GET /api/inbox/approvals/:modelKey/records/:id

Every field the person's role may read in the record's company (fields: label and text), the record's lines with their columns (tables, up to 200 rows each, more beyond that) and its comments (comments, newest first). Read as the person, or through the approval when its rule opens the record to its approvers (review.grantRead). The decision itself uses the approval routes (/api/approvals/:modelKey/records/:id/decision, /set-back).

Droot AI's brief

GET  /api/assistant/approval-insights/:modelKey/records/:id[?refresh=1]
POST /api/assistant/approval-insights/:modelKey/feedback   { "rating": "up" | "down", "reason"?: "…" }

A brief for the approver: summary, suggestion (a suggested next step, or null when Setup › Droot AI › Safety › Suggest A Decision is off), pros and cons (each { text, refs }, where refs name the facts it rests on and sources says what each is), questions and drafts (approve, sendBack). Droot AI never decides. It reads only what the person may read, under the chat's rules: Droot AI on for their company, their Business Access policy (record data allowed, its apps, personal fields), their allowances. Sensitive fields go to the provider masked. A brief is kept per person, record version and policy for a week; refresh=1 asks again. A rating is a learning signal, like a chat answer's.

The facts are the side panel's read, written as the person sees them on the form: a whole number kept in smaller units by its scale as the number it stands for (a quantity's 16000 thousandths as 16), a percent with its sign, a duration in words, a line amount in the record's currency, a value the form works out (formCompute) when nothing stored it yet, a moment in the company's time zone, and never a record's id or an option's key. A removed field (hidden, or deprecated) is left out, as forms leave it out, and an encrypted field never goes to the provider, as in the chat.

Bulk actions

Ticking rows (one by one, or every row on the page) shows a bar in place of the filters:

  • Approve N (Waiting On Me only) sends the ticked requests to POST /api/approvals/bulk-decision, the Inbox's route: all of them are approved or none, each as the approver, with the rule's checks run again. The page leaves out what the kernel would refuse anyway (a failing blocking check, a request that isn't the reader's to decide) and says so in the confirmation, which lists the requests and their total and takes one optional comment. A step that asks for a signature or a reason can't be approved in bulk (the Inbox's rule): those are reviewed one by one.
  • Reject N (Waiting On Me only) takes every ticked request the reader decides (a failing check never stops a rejection), with one comment for them all, required when any of their rules requires one, and one reason when their rules share a reason list. A signed step, or rules with different reason lists, are rejected one by one (the Inbox's rule). The kernel rejects all of them or none.
  • Download N gives the ticked rows as one document (PDF, print, Word or Excel) through POST /api/inbox/download, laid out by the company's Inbox Summary layout (Setup › PDF Documents), as the Inbox's download is. Decided rows can be downloaded too.

A bulk Approve has no Undo hold: the confirmation is its check.