When to use this endpoint

Use this to populate accounting-sync badges without loading full invoice records.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.

The handler performs no additional invoice page, record-owner, or department permission check unless stated below.

Parameters

ParameterTypeRequiredDescription
idsArray, JSON array, or comma-separated stringNoInvoice IDs. Positive values are deduplicated; zero and nonnumeric values are discarded. Omission is treated as an empty list.

Example request

$providers = FM_api('Invoices_getSyncProvidersByIds', ['ids' => ['981', '982']]);

Example response

{
  "981": ["quickbooks", "businesscentral"],
  "982": []
}

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.
{"error":"missing or invalid parameter: ids"}The value is neither an array nor a parseable string form.

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

Behaviour and edge cases

  • Every valid requested ID is present even when it has no supported provider. Unknown invoice IDs therefore appear with empty arrays.
  • Both invoice and credit sync records are considered. Providers normalize to quickbooks, xero, businesscentral, sage, or gnucash.
  • DataSync links are resolved through the referenced DataSync configuration’s sync_type. Provider order follows database row order and is not guaranteed.

See it in Fieldmotion

CRM1

The main invoice page requests badges for visible invoice IDs.

CRM2

The invoice module requests badges in bulk for its current rows.

Related endpoints