> ## 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.

# List documents

> Returns a list of completed documents for the specified business, sorted newest first. Archived documents and documents whose upload has not completed are excluded. Documents can be filtered by document type and file type. Results will be paginated, see [Pagination](/api-details/pagination) for details.



## OpenAPI

````yaml get /v1/businesses/{businessId}/documents
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/documents:
    get:
      tags: []
      summary: List documents
      description: >-
        Returns a list of completed documents for the specified business, sorted
        newest first. Archived documents and documents whose upload has not
        completed are excluded. Documents can be filtered by document type and
        file type. Results will be paginated, see
        [Pagination](/api-details/pagination) for details.
      operationId: business.documents.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch documents for.
          required: true
          schema:
            type: string
            format: uuid
        - name: document_type
          in: query
          description: Filter documents by type.
          required: false
          schema:
            $ref: '#/components/schemas/DocumentType'
        - name: file_type
          in: query
          description: >-
            Filter documents by file MIME type (for example `application/pdf` or
            `image/png`).
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiS3Document'
                  meta:
                    $ref: '#/components/schemas/RequestMetadata'
                required:
                  - data
        '400':
          description: >-
            Invalid query or pagination parameters (for example an unsupported
            `document_type` or `sort_by`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Business not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    DocumentType:
      type: string
      enum:
        - RECEIPT
        - UNSTRUCTURED_BOOKKEEPING_CONTEXT
        - OTHER
      description: >-
        The type of document. RECEIPT is for receipts and invoices.
        UNSTRUCTURED_BOOKKEEPING_CONTEXT is for general bookkeeping context
        documents. OTHER is for any other document type.
    ApiS3Document:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `Document`.
          example: Document
        id:
          type: string
          format: uuid
          description: The unique identifier of the document.
        file_name:
          type: string
          description: The name of the uploaded file.
        file_type:
          type: string
          description: The MIME type of the file.
        document_type:
          $ref: '#/components/schemas/DocumentType'
          description: The type of document.
        presigned_url:
          type: string
          nullable: true
          description: A presigned URL for downloading the document, if available.
      required:
        - id
        - file_name
        - file_type
        - document_type
      description: A document stored in S3.
    RequestMetadata:
      type: object
      description: Request metadata. Present on paginated list responses.
      properties:
        type:
          type: string
          description: Metadata type discriminator. Value will be `request_metadata`.
          example: request_metadata
        pagination:
          $ref: '#/components/schemas/PaginationMetadata'
    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
    PaginationMetadata:
      type: object
      description: >-
        Cursor-based pagination metadata returned alongside paginated list
        responses.
      properties:
        sort_by:
          type: string
          nullable: true
          description: Field the result set is sorted by.
        sort_order:
          type: string
          enum:
            - ASC
            - DESC
          description: Sort direction applied to the result set.
        cursor:
          type: string
          nullable: true
          description: >-
            Opaque cursor to pass as `pagination_cursor` to fetch the next page.
            Null when there are no further pages.
        has_more:
          type: boolean
          description: Whether additional pages are available after the current one.
        total_count:
          type: integer
          format: int64
          nullable: true
          description: Total number of records across all pages, when available.
      required:
        - sort_by
        - sort_order
        - cursor
        - has_more
    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

````