When to use this endpoint

Use this for pickers, integration setup, and widgets that need a controlled subset of invoice fields.

Authentication and permissions

The request must use a logged-in CRM session or valid signed API credentials and is scoped to that tenant.

Users whose legacy crm_access mask contains bit 64 receive {"error":"no permission to access api"}. No record-owner check is made.

Parameters

ParameterTypeRequiredDescription
id / idsInteger / arrayNoSelect one invoice or a set of invoice IDs. Without either selector, every active invoice matching other mapped filters can be returned.
fieldsArrayNoNames from the invoice field map; omission defaults to every mapped field. rowsData is loaded from either line-item storage format; quoteIDs adds a quotes array of linked quote IDs.
Mapped field filtersMixedNoAny supplied mapped field is also an exact filter: text is case-insensitive and trimmed, while numeric fields are integer-normalized.

Example request

$rows = FM_api('Invoice_getRequestedDetails', [
	'ids' => [981, 982],
	'fields' => ['id', 'num', 'status'],
]);

Example response

[
  {"id": 981, "num": "INV-981", "status": 1}
]

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Results are unpaginated arrays and do not include placeholders for missing/deleted IDs. Unknown names in fields are silently omitted rather than rejected.
  • Nominal header fields are normalized into their canonical picker shape. Quote lookup includes direct and ancillary invoice job links, and excludes deleted invoices.

See it in Fieldmotion

CRM1

No direct production CRM1 caller was found for this route.

CRM2

The Send Email widget, Credit Notes allocation flow, and Xero finance settings request selected invoice details.

Related endpoints