# Get accounting synchronization settings

Returns the active accounting platform and its synchronization state.

Use this endpoint to check whether a platform is connected, whether a synchronization is currently running, and why the most recent synchronization failed.

Endpoint: GET /external-syncs/settings
Version: V5
Security: bearerAuth, basicAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `basicAuth` (unknown)
    http basic

## Response 200:

  - `200` (unknown)
    The connected accounting platform and its synchronization state.

## Response 200 fields (application/json):

  - `platform` (string, required)
    The connected accounting platform, or `null` when no platform is connected.
    Enum: "quickbooks_online", "netsuite", null

  - `status` (string, required)
    The current synchronization state:
- `disconnected` - no accounting platform is connected.
- `idle` - a platform is connected and no synchronization is running.
- `syncing` - a synchronization is currently in progress.
- `failed` - the most recent synchronization failed. See `error` for details.
    Enum: "disconnected", "idle", "syncing", "failed"

  - `last_sync_started_at` (string, required)
    When the most recent synchronization started, or `null` if none has run.
    Example: 2021-05-20T09:23:53+00:00

  - `last_sync_completed_at` (string, required)
    When the most recent synchronization finished, or `null` if none has completed.
    Example: 2021-05-20T09:31:07+00:00

  - `progress` (number, required)
    Percentage of the in-progress synchronization that has completed. Only reported for QuickBooks Online; `null` for other platforms.
    Example: 42

  - `error` (object, required)
    Details of the most recent failure. Only set when `status` is `failed`, otherwise `null`.

  - `error.message` (string, required)
    A short string describing why the synchronization failed.
    Example: The QuickBooks Online connection has expired. Reconnect the integration to resume syncing.

## Response 401:

  - `401` (unknown)
    Unauthorized error

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 403:

  - `403` (unknown)
    The access key lacks the permission required for this request.

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.code` (string)
    A short string identifying the error, when available.
    Example: INVALID_PARAM

  - `error.message` (string, required)
    A short string describing error details.
    Example: Unsupported accounting platform: xero

  - `error.type` (string)
    A short string describing error type, when available.
    Example: invalid_request_error

## Response 200 examples:

  - `Connected and idle` (unknown)

  - `Synchronization in progress` (unknown)
    `progress` is reported for QuickBooks Online while a sync is running.

  - `Most recent synchronization failed` (unknown)

  - `No accounting platform connected` (unknown)

## Response 403 examples:

  - `Missing permission` (unknown)

