> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get connection status

> Returns the connection status of Quickbooks for a business. To create new connections, use Quickbooks connection component. Businesses who have not connected a Quickbooks account will have a response with `is_connected` set to false.



## OpenAPI

````yaml get /v1/businesses/{businessId}/quickbooks/connection-status
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/quickbooks/connection-status:
    get:
      tags: []
      summary: Get connection status
      description: >-
        Returns the connection status of Quickbooks for a business. To create
        new connections, use Quickbooks connection component. Businesses who
        have not connected a Quickbooks account will have a response with
        `is_connected` set to false.
      operationId: business.quickbooks.connection-status.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to get Quickbooks connection status for.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuickbooksConnectionStatus'
              example:
                is_connected: true
                last_synced_at: '2025-07-14T09:00:00Z'
                last_sync_status: SYNC_SUCCESS
                is_syncing: false
        '404':
          description: >-
            Business id is not found. This indicates the business id is invalid
            or the business has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    QuickbooksConnectionStatus:
      type: object
      properties:
        is_connected:
          type: boolean
          description: Whether Quickbooks is connected for the business.
        last_synced_at:
          type: string
          format: date-time
          description: The last time Quickbooks was synced for the business.
        last_sync_status:
          $ref: '#/components/schemas/QuickbooksSyncStatus'
          description: The status of the last Quickbooks sync for the business.
        is_syncing:
          type: boolean
          description: Whether Quickbooks is currently syncing for the business.
        sync_failure_reason:
          type: string
          enum:
            - 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
          description: >-
            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.
        is_retryable_failure:
          type: boolean
          description: >-
            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).
    ApiError:
      type: object
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - description
    QuickbooksSyncStatus:
      type: string
      enum:
        - SYNC_SUCCESS
        - SYNC_FAILURE
      description: The status of a Quickbooks sync.
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementParserError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````