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

# Retrieves the bank rules.



## OpenAPI

````yaml api-reference/openapi.json get /api/banking/rules
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/banking/rules:
    get:
      tags:
        - Bank Rules
      summary: Retrieves the bank rules.
      operationId: BankRulesController_getBankRules
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The bank rules have been successfully retrieved.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankRuleResponseDto'
components:
  schemas:
    BankRuleResponseDto:
      type: object
      properties:
        id:
          type: number
          description: The unique identifier of the bank rule
          example: 1
        name:
          type: string
          description: The name of the bank rule
          example: Monthly Salary
        order:
          type: number
          description: The order in which the rule should be applied
          example: 1
        applyIfAccountId:
          type: number
          description: The account ID to apply the rule if
          example: 1
        applyIfTransactionType:
          type: string
          description: The transaction type to apply the rule if
          example: deposit
          enum:
            - deposit
            - withdrawal
        conditionsType:
          type: string
          description: The conditions type to apply the rule if
          example: and
          enum:
            - and
            - or
        conditions:
          description: The conditions to apply the rule if
          example:
            - id: 1
              field: description
              comparator: contains
              value: Salary
          type: array
          items:
            $ref: '#/components/schemas/BankRuleConditionResponseDto'
        assignCategory:
          type: string
          description: The category to assign the rule if
          example: InterestIncome
          enum:
            - InterestIncome
            - OtherIncome
            - Deposit
            - Expense
            - OwnerDrawings
        assignAccountId:
          type: number
          description: The account ID to assign the rule if
          example: 1
        assignPayee:
          type: string
          description: The payee to assign the rule if
          example: Employer Inc.
        assignMemo:
          type: string
          description: The memo to assign the rule if
          example: Monthly Salary
        createdAt:
          type: string
          description: The creation timestamp of the bank rule
          example: '2024-03-20T10:00:00Z'
        updatedAt:
          type: string
          description: The last update timestamp of the bank rule
          example: '2024-03-20T10:00:00Z'
      required:
        - id
        - name
        - order
        - applyIfAccountId
        - applyIfTransactionType
        - conditionsType
        - conditions
        - assignCategory
        - assignAccountId
        - createdAt
        - updatedAt
    BankRuleConditionResponseDto:
      type: object
      properties:
        id:
          type: number
          description: The unique identifier of the bank rule condition
          example: 1
        field:
          type: string
          description: The field to check in the condition
          example: description
          enum:
            - description
            - amount
        comparator:
          type: string
          description: The comparison operator to use
          example: contains
          enum:
            - equals
            - equal
            - contains
            - not_contain
            - bigger
            - bigger_or_equal
            - smaller
            - smaller_or_equal
        value:
          type: string
          description: The value to compare against
          example: Salary
      required:
        - id
        - field
        - comparator
        - value

````