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

# Banka kullanım ve kalan limitlerini getir

> x-company-id zorunludur. Opsiyonel bankCode, bankaya özel hareket metriğini özete ekler.



## OpenAPI

````yaml /openapi/openapi.yaml get /banks/usage
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/usage:
    get:
      tags:
        - Banka - Bağlantılar
      summary: Banka kullanım ve kalan limitlerini getir
      description: >-
        x-company-id zorunludur. Opsiyonel bankCode, bankaya özel hareket
        metriğini özete ekler.
      operationId: getBanksUsage
      parameters:
        - name: x-company-id
          in: header
          required: true
          schema:
            type: string
        - name: bankCode
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/BankUsageResponse'
        '402':
          $ref: '#/components/responses/ErrorResponse'
        '503':
          $ref: '#/components/responses/ErrorResponse'
components:
  responses:
    BankUsageResponse:
      description: Banka kullanım ve limit özeti.
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - result
            properties:
              status:
                type: boolean
                const: true
              result:
                $ref: '#/components/schemas/BankUsageSummary'
            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:
    BankUsageSummary:
      type: object
      required:
        - enforced
        - metrics
      properties:
        enforced:
          type: boolean
        product:
          type: object
          additionalProperties: true
        plan:
          type: object
          additionalProperties: true
        subscription:
          type: object
          additionalProperties: true
        period:
          type: object
          additionalProperties: true
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/UsageMetric'
      additionalProperties: false
    UsageMetric:
      type: object
      required:
        - metric
        - scope
        - used
        - limit
        - remaining
        - isUnlimited
        - source
      properties:
        metric:
          type: string
        scope:
          type: string
        bankCode:
          type:
            - string
            - 'null'
        used:
          type: integer
          minimum: 0
        limit:
          type:
            - integer
            - 'null'
          minimum: 0
        remaining:
          type:
            - integer
            - 'null'
          minimum: 0
        isUnlimited:
          type: boolean
        source:
          type: string
      additionalProperties: false
  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.

````