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

# List the Tenant's Classification Rules

> List the tenant's classification rules, newest first.

**Scopes:** `tenant:read`



## OpenAPI

````yaml /api-reference/openapi.json get /v0/tenant/rules/classifications
openapi: 3.1.0
info:
  title: Asset API
  version: '0.1'
servers:
  - url: https://api.sandbox.getasset.com
    description: Sandbox
  - url: https://api.getasset.com
    description: Production
security: []
paths:
  /v0/tenant/rules/classifications:
    get:
      tags:
        - Classification Rules
      summary: List the Tenant's Classification Rules
      description: |-
        List the tenant's classification rules, newest first.

        **Scopes:** `tenant:read`
      operationId: list_tenant_classification_rules_v0_tenant_rules_classifications_get
      parameters:
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter rules by active status.
            title: Is Active
          description: Filter rules by active status.
        - name: page_token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                description: The page token to for the next or previous page
              - type: 'null'
            title: Page Token
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 100
            title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantTxnClassificationRulesPaginated'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - OAuth2PasswordBearer:
            - tenant:read
components:
  schemas:
    TenantTxnClassificationRulesPaginated:
      properties:
        data:
          items:
            $ref: '#/components/schemas/TenantTxnClassificationRulePublic'
          type: array
          title: Data
          description: List of classification rules
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
          description: Pagination information
      type: object
      required:
        - data
        - pagination
      title: TenantTxnClassificationRulesPaginated
    ErrorResponse:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: A description of the error
        data:
          title: Data
          description: Data associated with the error
      type: object
      required:
        - error
        - data
      title: ErrorResponse
    TenantTxnClassificationRulePublic:
      properties:
        merchant:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Merchant
          description: >-
            Case-insensitive exact merchant name to match. Mutually exclusive
            with the description criterion; exactly one of the two is required.
          examples:
            - Starbucks
        description_match_type:
          anyOf:
            - $ref: '#/components/schemas/DescriptionMatchType'
            - type: 'null'
          description: How to match the transaction description.
        description_value:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Description Value
          description: Description text to match, case-insensitive.
          examples:
            - MONTHLY SOFTWARE SUBSCRIPTION
        id:
          type: string
          format: clr_string
          title: Id
          description: The id of the classification rule
          examples:
            - clr_GA6EG2qFxA97NZHtxeLPUy
        classifications:
          items:
            $ref: '#/components/schemas/TenantTxnClassificationPublic'
          type: array
          title: Classifications
          description: >-
            Classifications evaluated in order. Categorization applies the first
            one whose conditions match and whose ledger name the business has;
            tagging applies the tags of every one whose conditions match.
        auto_confirm:
          type: boolean
          title: Auto Confirm
        is_active:
          type: boolean
          title: Is Active
          description: Whether the rule takes part in categorization and tagging.
        match_count:
          type: integer
          title: Match Count
          description: Number of transactions the rule has matched.
        last_matched_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Matched At
          description: When the rule last matched a transaction.
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - classifications
        - auto_confirm
        - is_active
        - match_count
        - created_at
      title: TenantTxnClassificationRulePublic
    PaginationResponse:
      properties:
        next_page_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Page Token
          description: The next page token
        previous_page_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Page Token
          description: The previous page token
      type: object
      title: PaginationResponse
    DescriptionMatchType:
      type: string
      enum:
        - contains
        - not_contains
        - equals
      title: DescriptionMatchType
    TenantTxnClassificationPublic:
      properties:
        conditions:
          $ref: '#/components/schemas/TxnClassificationConditionsSchema-Output'
          description: >-
            Conditions the transaction must satisfy for this classification to
            apply.
        target_ledger_name:
          type: string
          title: Target Ledger Name
          description: >-
            The ledger name to categorize the transaction into, resolved against
            each business's chart of accounts.
        tags:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Tags
          description: Tag field name to the values applied.
      type: object
      required:
        - conditions
        - target_ledger_name
        - tags
      title: TenantTxnClassificationPublic
    TxnClassificationConditionsSchema-Output:
      properties:
        amount:
          anyOf:
            - $ref: '#/components/schemas/AmountPredicate-Output'
            - type: 'null'
          description: Amount constraint; omit to match any amount.
        direction:
          anyOf:
            - $ref: '#/components/schemas/TransactionDirection'
            - type: 'null'
          description: >-
            Match money in (positive amounts) or money out (negative amounts).
            Zero-amount transactions match neither. Omit to match either.
        date:
          anyOf:
            - $ref: '#/components/schemas/DatePredicate'
            - type: 'null'
          description: Date constraint; omit to match any date.
      type: object
      title: TxnClassificationConditionsSchema
    AmountPredicate-Output:
      properties:
        operator:
          $ref: '#/components/schemas/AmountMatchType'
          description: How to compare the transaction amount.
        value:
          type: number
          title: Value
          description: >-
            Absolute home-currency amount to compare against; the inclusive
            lower bound when operator is between.
          examples:
            - 100
        max_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Value
          description: Inclusive upper bound, set only when operator is between.
          examples:
            - 250
      type: object
      required:
        - operator
        - value
      title: AmountPredicate
    TransactionDirection:
      type: string
      enum:
        - money_in
        - money_out
      title: TransactionDirection
    DatePredicate:
      properties:
        operator:
          $ref: '#/components/schemas/DateMatchType'
          description: How to compare the transaction date (UTC calendar date).
        value:
          type: string
          format: date
          title: Value
          description: >-
            Date to compare against; the inclusive lower bound when operator is
            between.
        max_value:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Max Value
          description: Inclusive upper bound, set only when operator is between.
      type: object
      required:
        - operator
        - value
      title: DatePredicate
    AmountMatchType:
      type: string
      enum:
        - equals
        - greater_than
        - less_than
        - between
      title: AmountMatchType
    DateMatchType:
      type: string
      enum:
        - equals
        - before
        - after
        - between
      title: DateMatchType
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /v0/auth/token

````