Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
quickbooks
/
connection-status
Get connection status
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/quickbooks/connection-status \
  --header 'Authorization: Bearer <token>'
{
  "is_connected": true,
  "last_synced_at": "2025-07-14T09:00:00Z",
  "last_sync_status": "SYNC_SUCCESS",
  "is_syncing": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

businessId
string
required

The UUID of the business to get Quickbooks connection status for.

Response

is_connected
boolean

Whether Quickbooks is connected for the business.

last_synced_at
string<date-time>

The last time Quickbooks was synced for the business.

last_sync_status
enum<string>

The status of the last Quickbooks sync for the business.

Available options:
SYNC_SUCCESS,
SYNC_FAILURE
is_syncing
boolean

Whether Quickbooks is currently syncing for the business.

sync_failure_reason
enum<string>

The specific reason for sync failure when last_sync_status is SYNC_FAILURE.

Provides detailed categorization of the failure type to help with troubleshooting and determining appropriate next steps.

Detailed categorization of QuickBooks sync failure reasons:

  • QUICKBOOKS_AUTHENTICATION_FAILURE: The OAuth token used to connect to QuickBooks is expired or invalid. Retryable after re-authentication.
  • QUICKBOOKS_AUTHORIZATION_FAILURE: The QuickBooks app is not authorized by the user or organization. Retryable after reauthorization.
  • QUICKBOOKS_SERVICE_UNAVAILABLE: QuickBooks service is temporarily unavailable (e.g., 503 error). Retryable with backoff.
  • QUICKBOOKS_INTERNAL_SERVER_ERROR: Internal error occurred within QuickBooks (e.g., 500 response). Retryable temporary issue.
  • QUICKBOOKS_GENERAL_SERVICE_FAILURE: A general SDK-level failure not covered by specific categories. May be retryable depending on context.
  • QUICKBOOKS_VALIDATION_ERROR: Request rejected by QuickBooks due to validation constraints (e.g., field format). Not retryable.
  • QUICKBOOKS_BAD_REQUEST: Malformed or structurally invalid request sent to QuickBooks. Not retryable; requires code fix.
  • QUICKBOOKS_INVALID_REQUEST_STATE: Request is logically valid but not allowed in current QuickBooks state (e.g., closed period). Not retryable.
  • QUICKBOOKS_INVALID_CREDENTIALS: Credentials were revoked or permanently rejected. Not retryable; requires new connection.
  • QUICKBOOKS_CONFIGURATION_ERROR: Integration is misconfigured (e.g., missing realm ID or base URL). Not retryable until corrected.
  • QUICKBOOKS_UNKNOWN_EXCEPTION: An unknown or unclassified error occurred during QuickBooks sync. Not retryable until corrected.
  • INTERNAL_SERVER_ERROR: A generic internal failure occurred within Layer’s infrastructure during sync. Not retryable until corrected.
Available options:
QUICKBOOKS_AUTHENTICATION_FAILURE,
QUICKBOOKS_AUTHORIZATION_FAILURE,
QUICKBOOKS_SERVICE_UNAVAILABLE,
QUICKBOOKS_INTERNAL_SERVER_ERROR,
QUICKBOOKS_GENERAL_SERVICE_FAILURE,
QUICKBOOKS_VALIDATION_ERROR,
QUICKBOOKS_BAD_REQUEST,
QUICKBOOKS_INVALID_REQUEST_STATE,
QUICKBOOKS_INVALID_CREDENTIALS,
QUICKBOOKS_CONFIGURATION_ERROR,
QUICKBOOKS_UNKNOWN_EXCEPTION,
INTERNAL_SERVER_ERROR
is_retryable_failure
boolean

Indicates whether the sync can be retried after SYNC_FAILURE. When true, the failure may be temporary (e.g., network issues, service unavailable) and retrying the sync operation may succeed. When false, the failure requires manual intervention (e.g., invalid credentials, configuration errors).

I