search_vouchers
Search invoices, credit notes, quotations, and bookkeeping vouchers to get their IDs for use with other tools. Filter by type, status, date, or contact to narrow results.
Instructions
Find invoices, credit notes, quotations and bookkeeping vouchers.
One API call per page. The only way to turn a question about the books
into the ids get_voucher, get_payments and the document tools
need. Starting from a customer name, get the contact id from
search_contacts first and pass it here.
Rows carry id, type, status, number, dates, contact name, total and
open amount. A row marked archived is filed away.
Narrow voucher_type and voucher_status to keep the answer small.
voucher_status 'open' or 'overdue' answers "what is still
outstanding" without paging through everything.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_vouchers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Zero-based page number. Read the `page` block of the previous result before asking for another one, rather than paging blindly. | |
| size | No | Rows per page. A larger page costs the same single API call but more of the answer's token budget, so raise it only when the whole list is genuinely needed. | |
| sort | No | Ordering. Newest voucher date first by default. createdDate and updatedDate are when it was entered or last changed. | voucherDate,DESC |
| date_to | No | Latest voucher date, as YYYY-MM-DD. | |
| archived | No | Set true to look at archived documents, false for active ones. Left unset, both are returned. | |
| date_from | No | Earliest voucher date, as YYYY-MM-DD. This is the date on the document, not the date it was entered. | |
| contact_id | No | Only documents for this contact, by id from search_contacts. | |
| voucher_type | No | Which kind of document to look for. 'any' covers all of them. 'invoice' means a sales document, 'salesinvoice' and 'purchaseinvoice' are the bookkeeping records. Dunnings cannot be found here at all. | any |
| voucher_number | No | The document number, for example 'RE0001', matched in full and ignoring case. Not a prefix. | |
| voucher_status | No | Which state to look for. 'any' covers all of them. 'open' is everything unpaid, overdue included, 'overdue' only what is past its due date. 'paid' is settled, 'draft' is not finalized, 'voided' is cancelled. | any |