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

# Import receipt

> Upload a single receipt for parsing on behalf of a business, such as an image or PDF submitted by a customer or platform. The uploaded file is run through Layer's receipt parsing pipeline, which proposes a vendor, amount, and line items that can be reviewed and turned into a bill. This endpoint expects a multipart upload.



## OpenAPI

````yaml post /v1/businesses/{businessId}/receipts/import
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/receipts/import:
    post:
      tags: []
      summary: Import receipt
      description: >-
        Upload a single receipt for parsing on behalf of a business, such as an
        image or PDF submitted by a customer or platform. The uploaded file is
        run through Layer's receipt parsing pipeline, which proposes a vendor,
        amount, and line items that can be reviewed and turned into a bill. This
        endpoint expects a multipart upload.
      operationId: business.receipts.import.post
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to import the receipt for.
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to multipart/form-data.
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    The receipt file. Images (jpg, png) and PDFs, including
                    multi-page PDFs, are supported.
                context:
                  type: string
                  description: >-
                    Optional contextual notes about the receipt to help guide
                    parsing, such as who the purchase was for or what it was
                    used for.
        required: true
      responses:
        '201':
          description: Receipt uploaded and parsed successfully.
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiReceiptParseResult'
                required:
                  - data
        '400':
          description: >-
            Bad request. Possible causes: no file uploaded, more than one file
            uploaded, unrecognized form fields, or an unsupported file type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '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:
    ApiReceiptParseResult:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `Receipt_Parse_Result`.
          example: Receipt_Parse_Result
        business_document_id:
          type: string
          format: uuid
          description: The UUID of the uploaded receipt document.
        source_s3_document_id:
          type: string
          format: uuid
          description: The UUID of the underlying stored document.
        source:
          $ref: '#/components/schemas/ReceiptParseResultSource'
        status:
          $ref: '#/components/schemas/ReceiptParseResultStatus'
        message_log_id:
          type: string
          format: uuid
          description: >-
            The UUID of the SMS message log associated with this receipt, if the
            receipt was ingested via SMS.
          nullable: true
        bill_id:
          type: string
          format: uuid
          description: >-
            The UUID of the bill created from this receipt, if one has been
            created.
          nullable: true
        proposed_paid_at:
          type: string
          format: date-time
          nullable: true
          description: The proposed date the receipt was paid.
        proposed_vendor_display:
          type: string
          nullable: true
          description: The proposed vendor name as parsed from the receipt.
        proposed_vendor_external_id:
          type: string
          nullable: true
          description: >-
            The external id of the proposed vendor, if a matching vendor was
            found.
        matched_vendor:
          $ref: '#/components/schemas/ReceiptParseResultMatchedVendor'
          nullable: true
          description: The vendor matched to this receipt, if any.
        proposed_amount_cents:
          type: integer
          format: int64
          nullable: true
          description: The proposed total amount of the receipt, in cents.
        proposed_line_items:
          type: array
          items:
            $ref: '#/components/schemas/ReceiptParseResultLineItem'
          description: The proposed line items parsed from the receipt.
        rejected_at:
          type: string
          format: date-time
          nullable: true
          description: When this receipt parse result was rejected, if it was rejected.
        created_at:
          type: string
          format: date-time
          description: When the receipt was uploaded.
        updated_at:
          type: string
          format: date-time
          description: When the receipt parse result was last updated.
      required:
        - business_document_id
        - source_s3_document_id
        - source
        - status
        - proposed_line_items
        - created_at
        - updated_at
    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
    ReceiptParseResultSource:
      type: string
      enum:
        - SMS
        - BOOKKEEPER_UPLOAD
      description: >-
        How the receipt was ingested. SMS indicates the receipt was received via
        text message. BOOKKEEPER_UPLOAD indicates the receipt was uploaded
        directly through the API.
      example: BOOKKEEPER_UPLOAD
    ReceiptParseResultStatus:
      type: string
      enum:
        - NON_RECEIPT
        - READY_FOR_BILL
        - NEEDS_REVIEW
        - MATCHED_NEEDS_REVIEW
      description: >-
        The current state of the parsed receipt. NON_RECEIPT indicates the
        uploaded document was not recognized as a receipt. READY_FOR_BILL
        indicates the receipt was parsed with enough confidence to create a
        bill. NEEDS_REVIEW indicates a bookkeeper must review the proposed
        values before a bill is created. MATCHED_NEEDS_REVIEW indicates the
        receipt was matched to an existing bill or expense that needs review.
      example: READY_FOR_BILL
    ReceiptParseResultMatchedVendor:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The UUID of the matched vendor.
        external_id:
          type: string
          nullable: true
          description: The external id of the matched vendor, if one was set.
        display_name:
          type: string
          description: The display name of the matched vendor.
      required:
        - id
        - display_name
      description: The vendor matched to this receipt, if any.
    ReceiptParseResultLineItem:
      type: object
      properties:
        description:
          type: string
          nullable: true
          description: The proposed line item description.
        proposed_amount_cents:
          type: integer
          format: int64
          nullable: true
          description: The proposed amount for this line item, in cents.
        proposed_account:
          $ref: '#/components/schemas/SingleApiChartAccount'
          nullable: true
          description: The proposed chart of account for this line item.
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
      example: InvalidParameters
    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
      example: InvalidPayload
    SingleApiChartAccount:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `Single_Chart_Account`.
          example: Single_Chart_Account
        id:
          $ref: '#/components/schemas/AccountIdentifier'
        name:
          type: string
          description: Name of the account.
          example: Current Assets
        account_number:
          type: string
          nullable: true
          description: Account number if configured.
          example: '4000'
        stable_name:
          $ref: '#/components/schemas/AccountStableName'
        normality:
          $ref: '#/components/schemas/BankTransactionDirection'
        account_type:
          $ref: '#/components/schemas/ApiLedgerAccountType'
        account_subtype:
          $ref: '#/components/schemas/ApiLedgerAccountSubtype'
      description: A single ledger account without nested children.
    AccountIdentifier:
      oneOf:
        - $ref: '#/components/schemas/AccountId'
          description: ID of the account.
          title: Account ID
        - $ref: '#/components/schemas/AccountStableName'
          description: Stable name associated with the account.
          title: Account Stable Name
    AccountStableName:
      type: object
      required:
        - type
        - stable_name
      properties:
        type:
          type: string
          enum:
            - StableName
          description: Resource type. Value will be `StableName`.
          example: StableName
        stable_name:
          type: string
          example: CURRENT_ASSETS
          description: Stable name of the account.
    BankTransactionDirection:
      type: string
      enum:
        - CREDIT
        - DEBIT
      example: DEBIT
    ApiLedgerAccountType:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/LedgerAccountType'
          description: Type of the account.
        display_name:
          type: string
          description: Display name of the account type.
          example: Asset
    ApiLedgerAccountSubtype:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/LedgerAccountSubtype'
        display_name:
          type: string
          description: Display name of the account subtype.
          example: Current Assets
    AccountId:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - AccountId
          description: Resource type. Value will be `AccountId`.
          example: AccountId
        id:
          type: string
          format: uuid
          description: ID of the account.
    LedgerAccountType:
      type: string
      enum:
        - ASSET
        - LIABILITY
        - EQUITY
        - REVENUE
        - EXPENSE
      example: ASSET
    LedgerAccountSubtype:
      type: string
      enum:
        - BANK_ACCOUNTS
        - ACCOUNTS_RECEIVABLE
        - INVENTORY
        - PAYMENT_PROCESSOR_CLEARING_ACCOUNT
        - FIXED_ASSET
        - ACCUMULATED_DEPRECIATION
        - CASH
        - UNDEPOSITED_FUNDS
        - CURRENT_ASSET
        - NON_CURRENT_ASSET
        - PREPAID_EXPENSES
        - DEVELOPMENT_COSTS
        - LOANS_RECEIVABLE
        - INTANGIBLE_ASSET
        - ACCOUNTS_PAYABLE
        - CREDIT_CARD
        - TAXES_PAYABLE
        - INCOME_TAXES_PAYABLE
        - SALES_TAXES_PAYABLE
        - OTHER_TAXES_PAYABLE
        - PAYROLL_TAXES_PAYABLE
        - UNEARNED_REVENUE
        - PAYROLL_LIABILITY
        - PAYROLL_CLEARING
        - LINE_OF_CREDIT
        - TIPS
        - REFUND_LIABILITIES
        - UNDEPOSITED_OUTFLOWS
        - OUTGOING_PAYMENT_CLEARING_ACCOUNT
        - OTHER_CURRENT_LIABILITY
        - LOANS_PAYABLE
        - NOTES_PAYABLE
        - SHAREHOLDER_LOAN
        - NON_CURRENT_LIABILITY
        - CONTRIBUTIONS
        - DISTRIBUTIONS
        - COMMON_STOCK
        - PREFERRED_STOCK
        - ADDITIONAL_PAID_IN_CAPITAL
        - RETAINED_EARNINGS
        - ACCUMULATED_ADJUSTMENTS
        - OPENING_BALANCE_EQUITY
        - OTHER_EQUITY
        - SALES
        - UNCATEGORIZED_REVENUE
        - RETURNS_ALLOWANCES
        - DIVIDEND_INCOME
        - INTEREST_INCOME
        - OTHER_INCOME
        - COGS
        - OPERATING_EXPENSES
        - PAYROLL
        - TAXES_LICENSES
        - UNCATEGORIZED_EXPENSE
        - CHARITABLE_CONTRIBUTIONS
        - LOAN_EXPENSES
        - FINANCE_COSTS
        - INTEREST_EXPENSES
        - DEPRECIATION
        - AMORTIZATION
        - BAD_DEBT
        - OTHER_EXPENSES
      example: BANK_ACCOUNTS
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````