# Synchronize accounting data

Queues an on-demand accounting data synchronization for the merchant.
Synchronization runs in the background: a `200` response means the sync was queued, not that it has finished. Poll [Get accounting synchronization settings](#operation/getExternalSyncSettings) to follow its progress.
Rate limits are applied per accounting platform:
- Incremental syncs (`full_sync: false`, the default) - one request every five minutes.
- Full syncs (`full_sync: true`) - one request every hour.

Exceeding either limit returns `429` with a `Retry-After` header.

Endpoint: POST /external-syncs/{platform}/sync
Version: V5
Security: bearerAuth, basicAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `platform` (string, required)
    The connected accounting platform to synchronize.

## Request fields (application/json):

  - `full_sync` (boolean)
    Fetch all accounting data instead of only the changes since the last synchronization. Full syncs are rate limited more aggressively than incremental syncs.
    Example: false

## Request examples:

  - `Incremental sync (default)` (unknown)
    Fetches only records that changed since the last successful synchronization.

  - `Full sync` (unknown)
    Re-fetches all accounting data. Limited to one request per hour.

## Response 200:

  - `200` (unknown)
    The request was accepted.

## Response 200 fields (application/json):

  - `success` (boolean, required)
    Always `true` when the request was accepted.
    Enum: true

## Response 400:

  - `400` (unknown)
    The request cannot be completed.

## Response 400 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 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 429:

  - `429` (unknown)
    An incremental sync was requested in the last five minutes, or a full sync was requested in the last hour.

## Response 429 headers:

  - `Retry-After` (integer)
    Seconds until another sync request may be made.
    Example: 240

## Response 200 examples:

  - `Request accepted` (unknown)

## Response 400 examples:

  - `Unsupported accounting platform` (unknown)

  - `No accounting platform connected` (unknown)

## Response 403 examples:

  - `Missing permission` (unknown)

