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

# Hareket eşleştirme kurallarını listele



## OpenAPI

````yaml /openapi/openapi.yaml get /banks/transaction-rules
openapi: 3.1.0
info:
  title: Tahsil API
  version: 1.0.0
  description: >-
    Tahsil banka bağlantıları, provider senkronizasyonu, değiştirilemez
    hareketler, zamanlamalar ve hareket otomasyonu için tenant-scoped public API
    sözleşmesi.
servers:
  - url: https://api.tahsil.dev
    description: Production
security:
  - apiKeyAuth: []
    apiSecretAuth: []
tags:
  - name: Sistem - Sağlık
    description: Servis canlılığı ve bağımlılık hazır olma kontrolleri.
  - name: Banka - Bağlantılar
    description: Banka bağlantısı, credential, setup, sync, health ve kullanım işlemleri.
  - name: Banka - Hareketler
    description: >-
      Provider senkronizasyonuyla oluşan değiştirilemez banka hareketleri ve CSV
      dışa aktarımı.
  - name: Banka - Otomasyon
    description: Hareket atamaları, kurallar, preview ve backfill çalışmaları.
  - name: Banka - Zamanlamalar
    description: Banka sorgularının zamanlama ve çalışma durumu yönetimi.
  - name: Banka - Analitik
    description: Tenant kapsamlı dashboard sorgu kataloğu ve analitik sonuçları.
  - name: Denetim - Connector Logları
    description: Maskelenmiş banka connector istek ve yanıt kayıtları.
paths:
  /banks/transaction-rules:
    get:
      tags:
        - Banka - Otomasyon
      summary: Hareket eşleştirme kurallarını listele
      operationId: getBanksTransactionRules
      parameters:
        - $ref: '#/components/parameters/XCompanyId'
        - $ref: '#/components/parameters/XCompanyIds'
        - name: status
          in: query
          description: Kural durumu.
          schema:
            type: string
            enum:
              - active
              - paused
              - archived
        - name: source
          in: query
          description: Harici referans kaynağı.
          schema:
            type: string
            maxLength: 64
        - name: entityType
          in: query
          description: Harici referans varlık türü.
          schema:
            type: string
            maxLength: 64
        - name: externalId
          in: query
          description: Harici referans kimliği.
          schema:
            type: string
            maxLength: 256
        - name: q
          in: query
          description: Kural adında metin araması.
          schema:
            type: string
            maxLength: 100
        - name: page
          in: query
          description: Sayfa numarası.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          description: Sayfadaki kayıt sayısı; en fazla 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          $ref: '#/components/responses/TransactionRuleListResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    XCompanyId:
      name: x-company-id
      in: header
      required: false
      schema:
        type: string
      description: >-
        Hedef firma kimliği. Müşteri banka endpointlerindeki yazma işlemleri
        için zorunludur.
    XCompanyIds:
      name: x-company-ids
      in: header
      required: false
      schema:
        type: string
      description: >-
        API credential tek firma kapsamlıdır; gönderilirse credential firmasıyla
        eşleşen tek kimlik içermelidir.
  responses:
    TransactionRuleListResponse:
      description: Sayfalanmış hareket kuralları.
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - result
              - paginate
            properties:
              status:
                type: boolean
                const: true
              result:
                type: array
                items:
                  $ref: '#/components/schemas/TransactionRule'
              paginate:
                $ref: '#/components/schemas/OffsetPagination'
            additionalProperties: false
    ErrorResponse:
      description: İstek başarısız oldu.
      content:
        application/json:
          schema:
            type: object
            required:
              - status
            properties:
              status:
                type: boolean
                const: false
              code:
                type: string
                description: >-
                  Kararlı hata kodu; kodlanmış domain ve güvenlik hatalarında
                  döner.
              message:
                type: string
                description: >-
                  İnsan tarafından okunabilir hata açıklaması; mevcutsa
                  entegrasyon kararı için kullanılmamalıdır.
              meta:
                type: object
                additionalProperties: true
              result:
                type: array
                deprecated: true
                description: Legacy Joi doğrulama hatalarında dönen alan listesi.
                items:
                  type: object
                  properties:
                    type:
                      type: string
                    joiType:
                      type: string
                    path:
                      type:
                        - string
                        - number
                    label:
                      type: string
                  additionalProperties: false
              description:
                type: string
            additionalProperties: false
          example:
            status: false
            code: TRANSACTION_AMOUNT_RANGE_INVALID
            message: minAmount, maxAmount değerinden büyük olamaz.
  schemas:
    TransactionRule:
      type: object
      required:
        - id
        - companies
        - name
        - status
        - version
        - conditions
        - actions
        - referenceKey
      properties:
        id:
          type: string
          description: MongoDB kaynak kimliği.
        companies:
          type: string
          description: MongoDB kaynak kimliği.
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - active
            - paused
            - archived
        version:
          type: integer
          minimum: 1
        snapshotHash:
          type: string
          readOnly: true
        effectiveFrom:
          type: string
          format: date-time
        conditions:
          $ref: '#/components/schemas/TransactionRuleConditionGroup'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRuleAction'
        referenceKey:
          type: string
          readOnly: true
        targetSource:
          type: string
        targetEntityType:
          type: string
        targetExternalId:
          type: string
        tags:
          type: array
          items:
            type: string
        archivedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdBy:
          type:
            - string
            - 'null'
        updatedBy:
          type:
            - string
            - 'null'
      additionalProperties: false
    OffsetPagination:
      type: object
      required:
        - total
        - size
        - page
        - totalPage
      properties:
        total:
          type: integer
          minimum: 0
        size:
          type: integer
          minimum: 1
          maximum: 250
        page:
          type: integer
          minimum: 1
        totalPage:
          type: integer
          minimum: 0
      additionalProperties: false
    TransactionRuleConditionGroup:
      type: object
      required:
        - combinator
        - children
      properties:
        combinator:
          type: string
          enum:
            - all
            - any
        children:
          type: array
          minItems: 1
          maxItems: 25
          items:
            oneOf:
              - $ref: '#/components/schemas/TransactionRuleCondition'
              - $ref: '#/components/schemas/TransactionRuleConditionGroup'
    TransactionRuleAction:
      oneOf:
        - type: object
          required:
            - type
            - reference
          properties:
            id:
              type: string
              readOnly: true
            type:
              const: attach_reference
            reference:
              $ref: '#/components/schemas/ExternalReference'
        - type: object
          required:
            - type
            - values
          properties:
            id:
              type: string
              readOnly: true
            type:
              const: add_tags
            values:
              type: array
              maxItems: 20
              items:
                type: string
                maxLength: 50
    TransactionRuleCondition:
      type: object
      required:
        - field
        - operator
        - value
      properties:
        field:
          type: string
          enum:
            - bankCode
            - accountId
            - subAccountKey
            - currency
            - incoming
            - amount
            - balance
            - description
            - nameSurname
            - iban
            - idNo
            - code
            - transactionDate
            - fetchedAt
        operator:
          type: string
          enum:
            - equals
            - not_equals
            - contains
            - not_contains
            - starts_with
            - ends_with
            - in
            - exists
            - gt
            - gte
            - lt
            - lte
            - between
        value: {}
    ExternalReference:
      type: object
      required:
        - source
        - entityType
        - externalId
      properties:
        source:
          type: string
          maxLength: 64
          pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
        entityType:
          type: string
          maxLength: 64
          pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
        externalId:
          type: string
          maxLength: 256
        label:
          type:
            - string
            - 'null'
          maxLength: 200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Tenant admin tarafından oluşturulan API anahtarının kimliği.
    apiSecretAuth:
      type: apiKey
      in: header
      name: x-api-secret
      description: >-
        Yalnız oluşturma anında gösterilen API anahtarı secret değeri. x-api-key
        ile aynı istekte gönderilir.

````