List orders
list_ordersRetrieve sales orders and invoices with filters for customer, status, dates, and amount due. Identify unpaid or overdue orders quickly.
Instructions
Sales orders, which in Breww are also the invoices: number, customer, issue and due dates, order and payment status, value, total and amount due. Filter by customer, status, payment status, dates, amount due, number, PO number or source. Good for 'what is unpaid and overdue?' (payment_status unpaid/part_paid, due_before today). Uses GET /orders/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | API page to start from (use next_page from a previous call, with the same max_results) | |
| number | No | Exact order/invoice number (API parameter `number`) | |
| source | No | Only orders from these sources (API parameter `source__in`) | |
| ordering | No | Sort order (API parameter `ordering`): a field name, - in front for descending, several separated by commas. The API's default is ascending id. | |
| issued_to | No | Issue date on or before (API parameter `issue_date__lte`) | |
| due_before | No | Due date before this date (API parameter `due_date__lt`) | |
| customer_id | No | Only this customer's orders (API parameter `customer`) | |
| issued_from | No | Issue date on or after (API parameter `issue_date__gte`) | |
| max_results | No | Most records to return in this call; whole API pages only (up to 200 per page), so fewer may come back with a next_page to continue from | |
| order_status | No | Only these order statuses (API parameter `order_status__in`) | |
| payment_status | No | Only these payment statuses (API parameter `payment_status__in`) | |
| amount_due_over | No | Amount due greater than this (API parameter `amount_due__gt`) | |
| po_number_contains | No | Part of the customer's PO number (API parameter `po_number__contains`) | |
| include_contact_details | No | Include customer names as stored (without redacting emails and phone numbers typed into them). Off by default. |