Search
Search finds things across the whole organisation from one box: customers, invoices, subscriptions, products, plans, quotes.
In the dashboard it is the command palette. Press ⌘K anywhere, type, and go. It also lists a direct keyboard shortcut beside each destination, so a route you use daily becomes two keystrokes.
Two endpoints
| Endpoint | Returns |
|---|---|
GET /v1/search | Matches across entity types |
GET /v1/search/customer-overview | Everything attached to one customer |
customer-overview is the support query. Instead of four requests for a
customer's subscriptions, invoices, payments and wallets, it answers in one,
which is what you want behind a support tool.
Search versus listing
They are different tools and it is worth being deliberate.
Search is for find the thing I am thinking of: fuzzy, ranked, across types. List endpoints are for give me every X matching these filters: exact, paginated, sortable, and the right choice for anything you will page through or export.
If you are building a table, use the list endpoint. If you are building a box a human types into, use search.
Reference
| Topic | When you need it |
|---|---|
| Customers | The customer record customer-overview summarises |
| Pagination | Paging through list endpoints instead |
| Search API | Parameters, ranking and response shape |