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

# Bekleyen veya çalışan kural işini iptal et



## OpenAPI

````yaml /openapi/openapi.yaml post /banks/transaction-rule-runs/{id}/cancel
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-rule-runs/{id}/cancel:
    post:
      tags:
        - Banka - Otomasyon
      summary: Bekleyen veya çalışan kural işini iptal et
      operationId: postBanksTransactionRuleRunsByIdCancel
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XCompanyIdRequired'
      responses:
        '200':
          $ref: '#/components/responses/TransactionRuleRunResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
    XCompanyIdRequired:
      name: x-company-id
      in: header
      required: true
      schema:
        type: string
      description: Yazma işleminin hedef firma kimliği.
  responses:
    TransactionRuleRunResponse:
      description: Preview veya backfill çalışması.
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - result
            properties:
              status:
                type: boolean
                const: true
              result:
                $ref: '#/components/schemas/TransactionRuleRun'
            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:
    TransactionRuleRun:
      type: object
      required:
        - id
        - companies
        - ruleId
        - ruleVersion
        - type
        - status
        - scope
        - candidateCount
        - matchedCount
      properties:
        id:
          type: string
          description: MongoDB kaynak kimliği.
        companies:
          type: string
          description: MongoDB kaynak kimliği.
        ruleId:
          type: string
          description: MongoDB kaynak kimliği.
        ruleVersion:
          type: integer
          minimum: 1
        ruleSnapshotHash:
          type: string
        type:
          type: string
          enum:
            - preview
            - backfill
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - retry
            - dead
            - canceled
        scope:
          $ref: '#/components/schemas/TransactionRuleRunScope'
        previewRunId:
          type:
            - string
            - 'null'
        candidateCount:
          type: integer
          minimum: 0
        matchedCount:
          type: integer
          minimum: 0
        revokedCount:
          type: integer
          minimum: 0
        sampleTransactionIds:
          type: array
          items:
            type: string
            description: MongoDB kaynak kimliği.
        attempts:
          type: integer
          minimum: 0
        failureCount:
          type: integer
          minimum: 0
        lastError:
          type:
            - string
            - 'null'
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
        scopeHash:
          type: string
        snapshotMaxId:
          type:
            - string
            - 'null'
        cursorId:
          type:
            - string
            - 'null'
        nextAttemptAt:
          type:
            - string
            - 'null'
          format: date-time
        lockOwner:
          type:
            - string
            - 'null'
        lockUntil:
          type:
            - string
            - 'null'
          format: date-time
        createdBy:
          type:
            - string
            - 'null'
      additionalProperties: false
    TransactionRuleRunScope:
      type: object
      properties:
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
        accountIds:
          type: array
          maxItems: 100
          items:
            type: string
        bankCodes:
          type: array
          maxItems: 100
          items:
            type: string
  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.

````