Cloud accounting and selective sync
Read cloud sync progress
/a/Accounting_progress
Poll the saved human-readable progress message without starting a sync.
When to use this endpoint
Poll while a cloud sync request is running. Use the sync response and logs to determine completion or failure; a saved message is not a running-worker guarantee.
Authentication and permissions
Use signed API-key authentication or a logged-in CRM session on the account’s routed host. API keys act as their owner; session requests require the dispatcher’s CSRF token where configured. Tenant rows and settings belong to that authenticated account.
These handlers add no accounting page or CRM2 role check. The dispatcher has no Accounting/DataSync object-scope mapping. Settings-screen access controls are separate from these shared API handlers; CRM2 screen roles are not a CRM1 API requirement.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
provider | String | Yes | Case-insensitive after trimming: quickbooks, xero, or microsoftbusinesscentral. Other names, including datasync, are rejected by the cloud facade. |
Example request
$result = FM_api('Accounting_progress', ['provider'=>'quickbooks']);
Example response
{
"ok": 1,
"progress": "Checking QuickBooks connection",
"provider": "quickbooks"
}
Database numeric values can be strings. Read the JSON error/warning fields as well as the HTTP status.
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":"missing or invalid parameter: provider"} | The provider is absent or outside the facade whitelist. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The facade appends provider and supplies ok:1 only when the returned array has no error or ok. Provider-specific fields remain intact; early provider validation errors have no provider field.
- Reads the provider-specific tenant progress setting: quickbooks_progress, xero_progress or the Business Central prefixed progress setting. The facade string-casts a missing result to an empty string.
- No percentage, execution ID, cursor, timestamp or completion flag is supplied. Old messages can remain after an earlier run. No pagination or object selection applies.
Side effects
- Reads saved progress; does not enqueue work, acquire the sync lock or query a remote provider for live progress.
See it in Fieldmotion
CRM1
Open Settings → Finances and the QuickBooks or Xero integration. Filter the browser Network panel for this Accounting route; these screens send provider explicitly. Provider-specific setup remains on the original provider routes. Start a sync and watch the separate progress polling request. Business Central has no CRM1 settings caller; its configuration UI is CRM2-only.
CRM2
Open Settings → Finances and the corresponding provider. The QuickBooks widget, Xero settings/background sync, and Business Central action wrapper call this facade with provider. Filter the browser Network panel for the endpoint name. Start a sync and watch the separate progress polling request.
Related endpoints
Accounting_sync— Execute cloud phases.Accounting_logsList— Select provider log IDs.Accounting_status— Check connection state.