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

# Uncategorize bank transaction

> Uncategorize a bank transaction. This will remove any categorization or match that has been applied to the transaction and reverse any ledger entries from the previous classification.



## OpenAPI

````yaml put /v1/businesses/{businessId}/bank-transactions/{transactionId}/uncategorize
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/bank-transactions/{transactionId}/uncategorize:
    put:
      tags: []
      summary: Uncategorize bank transaction
      description: >-
        Uncategorize a bank transaction. This will remove any categorization or
        match that has been applied to the transaction and reverse any ledger
        entries from the previous classification.
      operationId: business.bank-transactions.uncategorize.put
      parameters:
        - name: businessId
          in: path
          description: >-
            The UUID of the business that the transaction to uncategorize
            belongs to
          required: true
          schema:
            type: string
        - name: transactionId
          in: path
          description: The UUID of the bank transaction to uncategorize
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiBankTransaction'
        '404':
          description: >-
            Business or transaction id is not found. This indicates the
            transaction id is invalid or the transaction has been deleted, or
            the business is not found or has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiBankTransaction:
      type: object
      properties:
        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
        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.
        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
      properties: {}
      example: ''
      description: ''
    TransactionSource:
      type: string
      enum:
        - UNIT
        - PLAID
        - API
        - STRIPE
        - CUSTOM
    BankTransactionDirection:
      type: string
      enum:
        - CREDIT
        - DEBIT
    CategorizationStatus:
      type: string
      enum:
        - PENDING
        - READY_FOR_INPUT
        - CATEGORIZED
        - SPLIT
        - LAYER_REVIEW
        - JOURNALING
        - MATCHED
    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
        - $ref: '#/components/schemas/NestedApiCategorization'
      discriminator:
        propertyName: type
        mapping:
          Account: '#/components/schemas/AccountCategorization'
          Exclusion: '#/components/schemas/ExclusionCategorization'
          Split_Categorization: '#/components/schemas/SplitCategorization'
          AccountNested: '#/components/schemas/NestedAccountCategorization'
          OptionalAccountNested: '#/components/schemas/NestedOptionalCatetoryCategorization'
          ExclusionNested: '#/components/schemas/NestedExclusionCategorization'
    ClassifierAgent:
      type: string
      enum:
        - SMS
        - API
        - LAYER_AUTO
        - LAYER_MANUAL
    ProjectedIncomeCategory:
      type: string
      enum:
        - REVENUE
        - EXPENSE
        - EXCLUDE
    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:
        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
    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: []
    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
        display_name:
          type: string
          description: The display name of the exclusion type
      required:
        - id
        - category
        - display_name
    SplitCategorization:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/SplitCategorizationEntry'
      required:
        - entries
    NestedApiCategorization:
      type: object
      oneOf:
        - $ref: '#/components/schemas/NestedAccountCategorization'
          title: AccountNested
        - $ref: '#/components/schemas/NestedOptionalCatetoryCategorization'
          title: OptionalAccountNested
        - $ref: '#/components/schemas/NestedExclusionCategorization'
          title: ExclusionNested
    MatchType:
      type: string
      enum:
        - TRANSFER
        - INVOICE_PAYMENT
        - PAYOUT
    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
        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.
    SplitCategorizationEntry:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: Amount of the parent transaction for this split entry.
        category:
          $ref: '#/components/schemas/AccountCategorization'
          description: Category for this split entry.
    NestedAccountCategorization:
      type: object
      description: A category that exists
      properties:
        type:
          type: string
          description: Resource type. Value will be 'AccountNested'.
          example: AccountNested
        id:
          type: string
          format: uuid
          description: The ID of the account
        stable_name:
          type: string
          nullable: true
          description: The stable name of the account
          example: EXPENSES
        display_name:
          type: string
          description: The display name of the account
          example: Expenses
        subCategories:
          $ref: '#/components/schemas/NestedApiSubCategories'
          description: The subcategories of the account
    NestedOptionalCatetoryCategorization:
      type: object
      description: A category that is not created by default
      properties:
        type:
          type: string
          description: Resource type. Value will be 'OptionalAccountNested'.
          example: '''OptionalAccountNested'''
        stable_name:
          type: string
          description: The stable name of the optional account
        display_name:
          type: string
          description: The display name of the optional account
        subCategories:
          $ref: '#/components/schemas/NestedApiSubCategories'
          description: The subcategories of the account
    NestedExclusionCategorization:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be 'ExclusionNested'.
          example: ExclusionNested
        id:
          type: string
          description: The ID of the exclusion type
        display_name:
          type: string
          description: The display name of the exclusion type
    NestedApiSubCategories:
      type: array
      items:
        $ref: '#/components/schemas/NestedApiCategorization'
      nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````