Quotes: queries, documents and delivery
List quotes for a picker
/a/Quotes_list
Return quote IDs, customer names, references, gross totals and creation dates for selection.
When to use this endpoint
Use for quote pickers and Job/Invoice linking. It returns all matches; use a table endpoint for paging.
Authentication and permissions
Authenticate with signed API-key fields or a CRM session. Requires Quotes View (pageQuotes_view); non-admin users blocked by legacy crm_access bit 32 are denied. Client administrators inherit page permissions.
Quote visibility follows the account’s department/account-manager customer filters for non-admin users, including signed keys. Export routes additionally require pageMain_exportTableData. Linked Jobs require Jobs View and their TeamAccess scope; invoice enrichment requires Invoices View and the legacy invoice access check.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | Integer-compatible customer or asset ID | No | Nonzero activates customer filtering according to customer_type; omitted/zero returns all active quotes. |
customer_type | Integer-compatible selector | No | 0 (default): customer ID; 1: asset owner/location lookup. Other values add no customer predicate. |
include_parent | Integer-compatible switch | No | Nonzero with customer_type=0 includes the selected customer and its immediate parent, not its children. Ignored for asset mode. |
order_by | String allowlist | No | id (default), cdate or quote_num. Unknown values use id. |
order_dir | String | No | asc/desc case-insensitively; default desc. ID is a same-direction secondary sort. |
job_count | Integer-compatible switch | No | Nonzero adds a distinct count of active permitted type-2 linked Jobs; duplicate, stale and other-type relations do not count. |
Example request
$choices = FM_api('Quotes_list', [
'customer_id'=>'1088','customer_type'=>'0',
'order_by'=>'cdate','order_dir'=>'desc',
]);
Example response
[{"id":"1042","name":"Example Site","quote_num":"QT-1042","total_gross":"120.00","cdate":"2026-11-02 09:30:00"}]
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"permission denied"} | Required Quotes/Export permission is absent or legacy access restrictions apply. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Lists active visible quotes with customer name, reference, gross total and creation date. No paging or hard limit. Order defaults to ID DESC; allowed order_by values id/cdate/quote_num use an ID tie-breaker and asc/desc direction.
- Customer mode uses the selected ID and optional immediate parent. Asset mode uses stored owner/location customer IDs; an unresolved asset mapping yields no matches rather than all quotes. Unsupported customer types fail.
- job_count counts distinct active permitted Jobs through type-2 relations only. Duplicate, stale and unrelated relation edges do not contribute.
- No direct caller for this endpoint was found in the mobile app or its m-service intermediary.
Side effects
- Reads active permitted records without quote cost, history, email or derived Job-cache writes.
See it in Fieldmotion
CRM1
Job linking, Invoice quote selection and generic Quote target pickers call Quotes_list; inspect optional customer and ordering parameters.
CRM2
Job-to-Quote link widgets and jobsLinkToQuote use Quotes_list. Purchase-related quote choices can request newest-first cdate ordering.
Related endpoints
Quotes_getDataTableprovides mapped paging and list enrichment.Quote_countLinkedJobscounts distinct active linked Jobs.