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

# Update recorded transaction

> Update a one-off expense or another transaction not recorded in an existing bank feed. Receipts can be included.



## OpenAPI

````yaml patch /v1/businesses/{businessId}/custom-accounts/{customAccountId}/transactions/{transactionId}/record
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/custom-accounts/{customAccountId}/transactions/{transactionId}/record:
    patch:
      tags: []
      summary: Update recorded transaction
      description: >-
        Update a one-off expense or another transaction not recorded in an
        existing bank feed. Receipts can be included.
      operationId: business.custom-accounts.transactions.transaction.record.patch
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business.
          required: true
          schema:
            type: string
            format: uuid
        - name: customAccountId
          in: path
          description: The UUID of the custom account containing the transaction.
          required: true
          schema:
            type: string
            format: uuid
        - name: transactionId
          in: path
          description: The UUID of the recorded transaction to update.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        description: >-
          Provide at least one transaction field, document_ids, tags, or receipt
          file.
        content:
          multipart/form-data:
            schema:
              type: object
              minProperties: 1
              properties:
                transaction:
                  type: object
                  minProperties: 1
                  description: >-
                    Fields to update, sent as JSON in the transaction multipart
                    field. Omitted fields are unchanged.
                  properties:
                    amount:
                      type: integer
                      format: int64
                      description: Transaction amount in cents.
                    direction:
                      $ref: '#/components/schemas/BankTransactionDirection'
                    date:
                      type: string
                      description: Transaction date as YYYY-MM-DD or an ISO 8601 timestamp.
                    description:
                      type: string
                    merchant_name:
                      type: string
                      nullable: true
                    memo:
                      type: string
                      nullable: true
                    metadata:
                      $ref: '#/components/schemas/PlatformDefinedJson'
                    reference_number:
                      type: string
                      nullable: true
                    customer_id:
                      type: string
                      format: uuid
                      nullable: true
                    customer_external_id:
                      type: string
                      nullable: true
                    vendor_id:
                      type: string
                      format: uuid
                      nullable: true
                    vendor_external_id:
                      type: string
                      nullable: true
                    categorization:
                      $ref: '#/components/schemas/Category'
                    document_ids:
                      type: array
                      description: >-
                        Existing receipt document IDs to keep; existing
                        documents not listed are archived.
                      items:
                        type: string
                        format: uuid
                    tags:
                      type: array
                      items:
                        $ref: '#/components/schemas/TagKeyValue'
                files:
                  type: array
                  minItems: 1
                  description: >-
                    Optional new receipt files (up to five); each file must have
                    a unique filename.
                  items:
                    type: string
                    format: binary
            encoding:
              transaction:
                contentType: application/json
      responses:
        '200':
          description: Updated transaction.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ApiBankTransaction'
                required:
                  - data
        '400':
          description: Invalid transaction or multipart request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Business, custom account, or recorded transaction not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    BankTransactionDirection:
      type: string
      enum:
        - CREDIT
        - DEBIT
      example: DEBIT
    PlatformDefinedJson:
      type: object
      description: Arbitrary JSON data defined by the caller, with a 1KB size constraint.
      additionalProperties: true
      example:
        custom_field: value
        any valid json: below 1kb
        nested:
          meaning of life: 42
          array: []
    Category:
      type: object
      description: Single-category categorization payload.
      required:
        - type
        - category
      properties:
        type:
          type: string
          enum:
            - Category
          description: Discriminator for a single-category payload.
        category:
          $ref: '#/components/schemas/BankTransactionClassification'
          description: >-
            A single-category classification to apply to the full transaction
            amount.
        tax_code:
          type: string
          nullable: true
          description: >-
            Tax code to apply to the categorization. Currently only supported
            for businesses incorporated in Canada (`country` is `CA`) and cannot
            be used with an `Exclusion` category. Use a `code` from
            `tax_options` on the [Bank
            Transaction](/api-reference/bank-transaction/bank-transaction)
            object that is valid for the transaction's date.
          example: GST_PST_BC
    TagKeyValue:
      type: object
      description: >-
        A TagKeyValue holds key=value data related to a tag. This is used when
        creating or updating taggable entities (transactions, invoices, etc.).
      properties:
        key:
          type: string
          description: The tag dimension key (e.g., "department", "project", "location").
          example: department
        dimension_display_name:
          type: string
          nullable: true
          description: >-
            If the TagDimension doesn't exist, providing this value specifies
            the display name upon database insertion. Otherwise, it is left as
            null on the TagDimension.
          example: Department
        value:
          type: string
          description: The tag value (e.g., "sales", "marketing", "engineering").
          example: sales
        value_display_name:
          type: string
          nullable: true
          description: >-
            If the TagValueDefinition doesn't exist, providing this value
            specifies the display name upon database insertion. Otherwise, it is
            left as null on the TagValueDefinition.
          example: Sales Department
      required:
        - key
        - value
    ApiBankTransaction:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `Bank_Transaction`.
          example: Bank_Transaction
        id:
          type: string
          format: uuid
          description: Unique identifier of the bank transaction.
        business_id:
          type: string
          format: uuid
          description: >-
            Unique identifier of the business the bank transaction is associated
            with.
        source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the transaction.
        source_transaction_id:
          type: string
          description: >-
            External transaction ID from the source platform (e.g, Plaid
            transaction ID).
          example: g4DlKyjXqGH3Kp5XlaWMtwLRrE4Z9AiE8B4Ko
        source_account_id:
          type: string
          description: >-
            External account ID from the source platform (e.g, Plaid account
            ID).
          example: Aaoy8G7VXZHVeqNoL1GvcmkPdqpLRWi9NArdG
        external_account_id:
          type: string
          format: uuid
          description: >-
            Layer's internal UUID for the linked external account. This is
            distinct from source_account_id, which is the provider's identifier
            (e.g., Plaid or Stripe account ID).
        imported_at:
          type: string
          format: date-time
          description: Timestamp when the transaction was imported.
        date:
          type: string
          format: date-time
          description: Date of the transaction.
        direction:
          $ref: '#/components/schemas/BankTransactionDirection'
          description: Direction of the transaction.
        amount:
          type: integer
          format: int64
          description: Transaction amount in cents.
        counterparty_name:
          type: string
          nullable: true
          description: Name of the transaction counterparty.
          example: WeWork
        description:
          type: string
          nullable: true
          description: Description of the transaction.
          example: WeWork monthly rent payment
        account_name:
          type: string
          nullable: true
          description: Name of the bank account.
          example: Plaid Checking
        categorizationStatus:
          $ref: '#/components/schemas/CategorizationStatus'
          description: The status of the transaction’s categorization in Layer’s systems.
        category:
          $ref: '#/components/schemas/ApiCategorization'
          description: >-
            The category assigned to the transaction. Only populated for
            transactions that have a finalized category.
        categorization_method:
          $ref: '#/components/schemas/ClassifierAgent'
          description: The method used to classify the transaction.
        tax_code:
          type: string
          nullable: true
          description: >-
            Tax code applied to the transaction's categorization. Currently only
            supported for businesses incorporated in Canada (`country` is `CA`).
            See `tax_options` for the codes available for this transaction's
            date.
          example: GST_PST_BC
        tax_options:
          $ref: '#/components/schemas/ApiBankTransactionTaxOptions'
          nullable: true
          description: >-
            Tax codes available for categorizing this transaction, scoped to the
            business's country and the transaction's date. Currently only
            populated for businesses incorporated in Canada (`country` is `CA`);
            `null` otherwise.
        projected_income_category:
          $ref: '#/components/schemas/ProjectedIncomeCategory'
        suggested_matches:
          type: array
          items:
            $ref: '#/components/schemas/ApiSuggestedMatch'
        match:
          $ref: '#/components/schemas/ApiMatch'
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the bank
            transaction (for example, to display to end users).
        metadata:
          $ref: '#/components/schemas/PlatformDefinedJson'
          nullable: true
          description: Arbitrary custom metadata in JSON format with a size limit of 1KB.
        reference_number:
          type: string
          nullable: true
          description: >-
            Any (typically user-visible) identifier you would like to associate
            with the bank transaction. Can be used to filter when listing bank
            transactions.
    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
    BankTransactionClassification:
      discriminator:
        propertyName: type
        mapping:
          AccountId:
            $ref: '#/components/schemas/AccountId'
          StableName:
            $ref: '#/components/schemas/AccountStableName'
          Exclusion:
            $ref: '#/components/schemas/Exclusion'
      oneOf:
        - $ref: '#/components/schemas/AccountId'
          title: Account ID
        - $ref: '#/components/schemas/AccountStableName'
          title: Account Stable Name
        - $ref: '#/components/schemas/Exclusion'
          title: Exclusion
    TransactionSource:
      type: string
      enum:
        - UNIT
        - PLAID
        - API
        - STRIPE
        - CUSTOM
      example: PLAID
    CategorizationStatus:
      type: string
      enum:
        - PENDING
        - READY_FOR_INPUT
        - CATEGORIZED
        - SPLIT
        - LAYER_REVIEW
        - JOURNALING
        - MATCHED
      example: CATEGORIZED
    ApiCategorization:
      description: Base schema for categorization of API entities.
      oneOf:
        - $ref: '#/components/schemas/AccountCategorization'
          title: Account
        - $ref: '#/components/schemas/ExclusionCategorization'
          title: Exclusion
        - $ref: '#/components/schemas/SplitCategorization'
          title: Split
      discriminator:
        propertyName: type
        mapping:
          Account:
            $ref: '#/components/schemas/AccountCategorization'
          Exclusion:
            $ref: '#/components/schemas/ExclusionCategorization'
          Split_Categorization:
            $ref: '#/components/schemas/SplitCategorization'
    ClassifierAgent:
      type: string
      enum:
        - SMS
        - API
        - LAYER_AUTO
        - LAYER_MANUAL
      example: API
    ApiBankTransactionTaxOptions:
      type: object
      description: >-
        Tax codes available for a transaction, grouped by country. Currently
        only populated for Canada.
      properties:
        canada:
          type: array
          items:
            $ref: '#/components/schemas/ApiCanadaTaxOption'
      required:
        - canada
    ProjectedIncomeCategory:
      type: string
      enum:
        - REVENUE
        - EXPENSE
        - EXCLUDE
      example: REVENUE
    ApiSuggestedMatch:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Layer's identifier for the suggested match.
        matchType:
          $ref: '#/components/schemas/MatchType'
          description: Type of the matched object.
        details:
          $ref: '#/components/schemas/ApiMatchDetails'
          description: Details of the suggested match.
    ApiMatch:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `Match`.
          example: Match
        id:
          type: string
          format: uuid
          description: Layer's UUID for the match.
        match_type:
          $ref: '#/components/schemas/MatchType'
          description: Type of the object to match.
        bank_transaction:
          $ref: '#/components/schemas/ApiBankTransactionInterface'
        details:
          $ref: '#/components/schemas/ApiMatchDetails'
    ApiTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID for the tag.
        key:
          type: string
          description: Key for the tag.
          example: ExampleTagKey
        dimension_display_name:
          type: string
          nullable: true
          description: Display name for the tag dimension.
        value:
          type: string
          description: Value for the tag.
          example: ExampleTagValue
        value_display_name:
          type: string
          nullable: true
          description: Display name for the tag value definition.
        dimension_id:
          type: string
          format: uuid
          description: ID of the tag dimension this tag belongs to.
        definition_id:
          type: string
          format: uuid
          description: ID of the tag value definition.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: When the tag was archived.
      required:
        - id
        - key
        - value
        - dimension_id
        - definition_id
    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
        - ReadOnlyBusiness
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
      example: InvalidPayload
    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.
    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.
    Exclusion:
      type: object
      properties:
        type:
          type: string
          enum:
            - Exclusion
          description: Resource type. Value will be `Exclusion`.
        exclusion_type:
          $ref: '#/components/schemas/ExclusionType'
      required:
        - type
        - exclusion_type
    AccountCategorization:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The ID of the Account.
        stable_name:
          type: string
          nullable: true
          description: The stable name for the account.
          example: RENT
        category:
          type: string
          description: The account ID or stable name, whichever is present.
          example: RENT
        display_name:
          type: string
          description: The display name for the account.
          example: Rent
      required:
        - id
        - category
        - display_name
    ExclusionCategorization:
      type: object
      properties:
        id:
          type: string
          description: The ID of the exclusion type.
          enum:
            - PERSONAL_EXPENSES
            - PERSONAL_INFLOWS
            - DUPLICATE_TRANSACTION
            - OTHER_EXCLUSION
          example: PERSONAL_EXPENSES
        category:
          type: string
          description: The category of the exclusion type.
          enum:
            - PERSONAL_EXPENSES
            - PERSONAL_INFLOWS
            - DUPLICATE_TRANSACTION
            - OTHER_EXCLUSION
          example: PERSONAL_EXPENSES
        display_name:
          type: string
          description: The display name of the exclusion type.
          enum:
            - Personal spending
            - Personal income sources
            - Duplicate transaction
            - Other exclusion
          example: Personal spending
      required:
        - id
        - category
        - display_name
    SplitCategorization:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/SplitCategorizationEntry'
      required:
        - entries
    ApiCanadaTaxOption:
      type: object
      description: >-
        A Canada Revenue Agency tax code that can be applied to a transaction's
        `tax_code` field.
      properties:
        code:
          type: string
          description: The tax code value to send in `tax_code` when categorizing.
          example: GST_PST_BC
        display_name:
          type: string
          description: Human-readable, locale-aware name for the tax code.
          example: GST/PST BC
        type:
          $ref: '#/components/schemas/CanadaTaxType'
        province:
          $ref: '#/components/schemas/CanadianProvince'
          nullable: true
          description: >-
            The Canadian province this tax code applies to, if
            province-specific.
        total_rate:
          type: string
          description: Sum of all component rates for this tax code, as a percentage.
          example: '12.000'
        effective_from:
          type: string
          format: date
          nullable: true
          description: >-
            Date this tax code became effective. `null` if there is no lower
            bound.
        effective_to:
          type: string
          format: date
          nullable: true
          description: >-
            Last date this tax code is effective. `null` if there is no upper
            bound.
        components:
          type: array
          items:
            $ref: '#/components/schemas/ApiCanadaTaxComponent'
      required:
        - code
        - display_name
        - type
        - total_rate
        - components
    MatchType:
      type: string
      enum:
        - TRANSFER
        - INVOICE_PAYMENT
        - PAYOUT
      example: TRANSFER
    ApiMatchDetails:
      type: object
      required:
        - id
        - amount
        - date
      properties:
        id:
          type: string
          format: uuid
          description: Layer's ID for the match.
        amount:
          type: integer
          format: int64
          description: Monetary amount of the matched transaction, in cents.
        date:
          type: string
          format: date-time
          description: Date that the matched transaction occurred.
        description:
          type: string
          nullable: true
          description: Description of the match.
          example: Transfer from SavingsAccount to CheckingAccount
    ApiBankTransactionInterface:
      type: object
      required:
        - id
        - amount
        - date
      properties:
        id:
          type: string
          format: uuid
          description: Layer's UUID for the bank transaction.
        business_id:
          type: string
          format: uuid
          description: UUID of the business the transaction is for.
        source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the bank transaction.
        source_transaction_id:
          type: string
          description: >-
            External transaction ID from the source platform (e.g, Plaid
            transaction ID).
          example: g4DlKyjXqGH3Kp5XlaWMtwLRrE4Z9AiE8B4Ko
        source_account_id:
          type: string
          description: >-
            External account ID from the source platform (e.g, Plaid account
            ID).
          example: Aaoy8G7VXZHVeqNoL1GvcmkPdqpLRWi9NArdG
        external_account_id:
          type: string
          format: uuid
          description: >-
            Layer's internal UUID for the linked external account. This is
            distinct from source_account_id, which is the provider's identifier
            (e.g., Plaid or Stripe account ID).
        imported_at:
          type: string
          format: date-time
          description: Timestamp when the transaction was imported.
        date:
          type: string
          format: date-time
          description: Timestamp when the transaction was created.
        direction:
          $ref: '#/components/schemas/BankTransactionDirection'
          description: Direction of the transaction.
        amount:
          type: integer
          format: int64
          description: Amount of the transaction, in cents.
        counterparty_name:
          type: string
          nullable: true
          description: Name of the transaction counterparty.
          example: WeWork
        description:
          type: string
          nullable: true
          description: Description of the transaction.
          example: WeWork monthly rent payment
        account_name:
          type: string
          nullable: true
          description: Name of the bank account.
          example: Plaid Checking
        categorizationStatus:
          $ref: '#/components/schemas/CategorizationStatus'
          description: The status of the transaction’s categorization in Layer’s systems.
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the bank
            transaction (for example, to display to end users).
        metadata:
          $ref: '#/components/schemas/PlatformDefinedJson'
          nullable: true
          description: Arbitrary custom metadata in JSON format with a size limit of 1KB.
        reference_number:
          type: string
          nullable: true
          description: >-
            Any (typically user-visible) identifier you would like to associate
            with the bank transaction. Can be used to filter when listing bank
            transactions.
    ExclusionType:
      type: string
      description: Type of exclusion for a bank transaction.
      enum:
        - PERSONAL_EXPENSES
        - PERSONAL_INFLOWS
        - DUPLICATE_TRANSACTION
        - OTHER_EXCLUSION
      x-displayStrings:
        PERSONAL_EXPENSES: Personal transactions
        PERSONAL_INFLOWS: Personal income sources
        DUPLICATE_TRANSACTION: Duplicate transaction
        OTHER_EXCLUSION: Other exclusion
      example: PERSONAL_EXPENSES
    SplitCategorizationEntry:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: Amount of the parent transaction for this split entry.
        category:
          description: >-
            Category for this split entry. May be an account categorization or
            an exclusion categorization.
          oneOf:
            - $ref: '#/components/schemas/AccountCategorization'
              title: Account
            - $ref: '#/components/schemas/ExclusionCategorization'
              title: Exclusion
        tax_code:
          type: string
          nullable: true
          description: >-
            Tax code applied to this split entry. Currently only supported for
            businesses incorporated in Canada (`country` is `CA`).
    CanadaTaxType:
      type: string
      enum:
        - TAXABLE
        - EXEMPT
        - ZERO_RATED
        - OUT_OF_SCOPE
      example: TAXABLE
    CanadianProvince:
      type: string
      description: Canadian province or territory.
      enum:
        - ALBERTA
        - BRITISH_COLUMBIA
        - MANITOBA
        - NEW_BRUNSWICK
        - NEWFOUNDLAND_AND_LABRADOR
        - NORTHWEST_TERRITORIES
        - NOVA_SCOTIA
        - NUNAVUT
        - ONTARIO
        - PRINCE_EDWARD_ISLAND
        - QUEBEC
        - SASKATCHEWAN
        - YUKON
      example: BRITISH_COLUMBIA
    ApiCanadaTaxComponent:
      type: object
      description: A single tax component (e.g. GST, PST) that makes up a Canada tax code.
      properties:
        code:
          type: string
          example: PST_BC
        type:
          $ref: '#/components/schemas/CanadaTaxComponentType'
        province:
          $ref: '#/components/schemas/CanadianProvince'
          nullable: true
        rate:
          type: string
          description: Rate for this component, as a percentage.
          example: '7.000'
        recoverable:
          type: boolean
          description: >-
            Whether this tax component is recoverable (e.g. as an input tax
            credit).
      required:
        - code
        - type
        - rate
        - recoverable
    CanadaTaxComponentType:
      type: string
      enum:
        - GST
        - HST
        - PST
        - QST
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````