Search
One search across customers, vendors, items and every sales and purchase document.
GET
/api/v1/searchSearch everything
Public — no scope required
Up to five matches per type, grouped. Types: customer, vendor, item, invoice, bill, quote, salesOrder, purchaseOrder, creditNote, debitNote, paymentReceived, paymentMade. A type appears only when the token and the member's role can both read it, and only when it has matches. Queries shorter than 2 characters return no groups. `href` is the web app path of the match.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | Optional | Name, number, GSTIN, phone, SKU or reference to look for. |
Example request
curl "https://invoice.avscorp.in/api/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"groups": [
{
"type": "customer",
"label": "Customers",
"results": [
{
"id": "cus_01",
"title": "Ravi Traders",
"subtitle": "9876543210 · GSTIN 33ABCDE1234F1Z5",
"href": "/sales/customers/cus_01"
}
]
},
{
"type": "invoice",
"label": "Invoices",
"results": [
{
"id": "inv_01",
"title": "INV-0042 · Ravi Traders",
"subtitle": "SENT · ₹11,800 · due ₹11,800",
"href": "/sales/invoices/inv_01"
}
]
}
]
}Possible errors: unauthorized