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

# Geri ödeme planını kısmi güncelle

> Geri ödeme planının yalnızca gönderilen alanlarını değiştirir.

Gövdede **yalnızca değiştirmek istediğiniz alanları** gönderirsiniz; gönderilmeyen alanlar mevcut değerleriyle kalır. Kural ve örnekler: [kısmi güncelleme](/tr/v1/guides/partial-update).

* Gönderilmeyen alan değişmez, `null` gönderilen alan temizlenir.
* Listeler birleştirilmez: `CommissionRates` gönderilirse bütün komisyon oranlarını değiştirir, gönderilmezse mevcutlar olduğu gibi kalır.
* Doğrulama birleştirilmiş kaydın tamamı üzerinde çalışır; zorunlu bir alanı `null` yaparsanız istek reddedilir.

## Hata kodları

Bu endpoint'in dönebileceği kodlar. Her endpoint için geçerli olan [genel hatalar](/tr/v1/guides/result-codes) (kimlik doğrulama, yetki, istek header'ları, günlük limit) burada tekrarlanmaz.

| Kod    | HTTP | Anlamı                                                                                                                                                       |
| ------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `0002` | 400  | İstek gövdesi okunamadı (bozuk JSON, alan tipi uyumsuz)                                                                                                      |
| `0003` | 400  | Alan azami uzunluğu aşıyor (mesajda alan adı ve sınır yazar)                                                                                                 |
| `0580` | 400  | Metinle verilen değer (kod ya da ad) birden fazla kayıtla eşleşiyor; hangisi olduğunu ayırt edecek bilgiyi ekleyin (ör. ilçe için `City`, il için `Country`) |
| `8010` | 404  | Banka hesabı bulunamadı                                                                                                                                      |
| `8020` | 404  | Geri ödeme planı bulunamadı                                                                                                                                  |
| `8021` | 400  | Geri ödeme planı `Name` zorunlu                                                                                                                              |
| `8022` | 400  | Geri ödeme planı adı bu banka hesabında kullanılıyor                                                                                                         |
| `8023` | 400  | `DayCount` negatif olamaz                                                                                                                                    |
| `8024` | 400  | Geri ödeme planı yalnızca POS hesabına (AccountType 3) eklenebilir                                                                                           |
| `8031` | 400  | Komisyon oranı `Name` zorunlu                                                                                                                                |
| `8032` | 400  | Komisyon oranı adı aynı geri ödeme planında birden fazla kullanılıyor                                                                                        |
| `8033` | 400  | `Rate` 0-100 arasında olmalı                                                                                                                                 |
| `8034` | 400  | `ExpenseCode` zorunlu                                                                                                                                        |
| `8035` | 400  | `ExpenseCode` bulunamadı                                                                                                                                     |


## OpenAPI

````yaml api-reference/openapi.tr.json PATCH /api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans/{repaymentPlanId}
openapi: 3.1.1
info:
  title: Noyax API
  description: Server-to-server API for integrations to access Noyax data.
  version: '1.0'
servers:
  - url: https://dev.noyax.com/services/noyax_api
security:
  - Bearer: []
tags:
  - name: Sections
  - name: Warehouses
  - name: Quotes
  - name: Product Critical Stock
  - name: Product groups
  - name: Product Parameter Definitions
  - name: Product Parameters
  - name: Product Prices
  - name: Products
  - name: Orders
  - name: Bank Accounts
  - name: Bank Internal Transfers
  - name: Bank Openings
  - name: Banks
  - name: Bank Transfers
  - name: Credit Card Collections
  - name: Repayment Plans
  - name: Despatches
  - name: Cities
  - name: Countries
  - name: Currencies
  - name: Districts
  - name: Line Groups
  - name: Shipment Definitions
  - name: Units
  - name: VAT rates
  - name: Customer Addresses
  - name: Customer Bank Accounts
  - name: Customer Definitions
  - name: Customer Group Members
  - name: Customer Links
  - name: Customer Parameters
  - name: Customer Representatives
  - name: Customers
  - name: Customer Statement
  - name: Customer Telephones
paths:
  /api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans/{repaymentPlanId}:
    patch:
      tags:
        - Repayment Plans
      summary: Geri ödeme planını kısmi güncelle
      description: >-
        Yalnızca gövdede gönderilen alanları değiştirir (JSON Merge Patch).
        Gönderilmeyen alanlar mevcut değerleriyle kalır; null gönderilen alan
        temizlenir. Listeler birleştirilmez: CommissionRates gönderilirse bütün
        komisyon oranlarını değiştirir, gönderilmezse mevcutlar olduğu gibi
        kalır.
      parameters:
        - name: bankAccountId
          in: path
          description: Banka hesabı ID'si.
          required: true
          schema:
            type: string
            format: uuid
        - name: repaymentPlanId
          in: path
          description: Geri ödeme planı ID'si.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-UserID
          in: header
          description: >-
            İsteğin adına yapıldığı Noyax kullanıcısının ID'si. Oluşturulan,
            güncellenen ve silinen kayıtların denetim alanlarına yazılır.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-CompanyID
          in: header
          description: >-
            Şirketin ID'si. Kullanıcı bu şirkete tanımlı olmalıdır. Bütün okuma
            ve yazma işlemleri bu şirketle sınırlıdır.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-PeriodID
          in: header
          description: >-
            Muhasebe döneminin ID'si. Cari endpoint'lerinde isteğe bağlıdır;
            gönderilirse oluşturulan kayıtlara yazılır.
          schema:
            minimum: 1
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepaymentPlanRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/RepaymentPlanRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RepaymentPlanRequestDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResultOfRepaymentPlanDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0201'
                Message: X-UserID header is required.
                Errors:
                  - Code: '0201'
                    Message: X-UserID header is required.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0102'
                Message: Token has expired. Obtain a new token using the refresh token.
                Errors:
                  - Code: '0102'
                    Message: >-
                      Token has expired. Obtain a new token using the refresh
                      token.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0110'
                Message: You do not have permission for this operation.
                Errors:
                  - Code: '0110'
                    Message: You do not have permission for this operation.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '8010'
                Message: Bank account not found.
                Errors:
                  - Code: '8010'
                    Message: Bank account not found.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0120'
                Message: Daily request limit (10000) exceeded.
                Errors:
                  - Code: '0120'
                    Message: Daily request limit (10000) exceeded.
components:
  schemas:
    RepaymentPlanRequestDto:
      type: object
      properties:
        Name:
          type:
            - 'null'
            - string
          description: Zorunlu. Banka hesabı içinde benzersiz. En fazla 100 karakter.
          example: 3 Taksit
        DayCount:
          type: integer
          description: Zorunlu. Gün sayısı, negatif olamaz.
          format: int32
          example: 90
        CommissionRates:
          type: array
          items:
            $ref: '#/components/schemas/CommissionRateRequestDto'
          description: >-
            Bu geri ödeme planının komisyon oranları. Güncellemede bu liste
            mevcutların tamamının yerini alır.
    DataResultOfRepaymentPlanDto:
      required:
        - Success
        - ResultCode
        - Data
      type: object
      properties:
        Success:
          type: boolean
          description: İşlemin başarılı olup olmadığı.
          example: true
        ResultCode:
          type: string
          description: >-
            Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors
            içinde listelenir.
          example: '0000'
        Message:
          type:
            - 'null'
            - string
          description: >-
            Success false olduğunda hata mesajı. Bütün hataların mesajları tek
            metinde birleştirilir.
        Data:
          $ref: '#/components/schemas/RepaymentPlanDto'
    ErrorResult:
      type: object
      properties:
        Success:
          type: boolean
          description: İşlemin başarılı olup olmadığı.
          example: false
        ResultCode:
          type:
            - 'null'
            - string
          description: >-
            Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors
            içinde listelenir.
        Message:
          type:
            - 'null'
            - string
          description: >-
            Success false olduğunda hata mesajı. Bütün hataların mesajları tek
            metinde birleştirilir.
        Errors:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ResultError'
          description: >-
            Kodlarıyla birlikte bütün hatalar. Yalnızca Success false olduğunda
            bulunur.
    CommissionRateRequestDto:
      type: object
      properties:
        Name:
          type:
            - 'null'
            - string
          description: Zorunlu. Geri ödeme planı içinde benzersiz. En fazla 100 karakter.
          example: 3 Taksit
        Rate:
          type: number
          description: Zorunlu. Komisyon yüzdesi, 0-100 arası.
          format: double
          example: 2.5
        ExpenseCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Masraf ürün kodu (ProductType değeri 6 olan, ürün
            endpoint'lerinden erişilemeyen bir ürün).
          example: MSR-0001
    RepaymentPlanDto:
      type: object
      properties:
        Id:
          type: string
          description: Geri ödeme planı ID'si.
          format: uuid
        Name:
          type:
            - 'null'
            - string
          description: Zorunlu. Banka hesabı içinde benzersiz. En fazla 100 karakter.
          example: 3 Taksit
        DayCount:
          type: integer
          description: Zorunlu. Gün sayısı, negatif olamaz.
          format: int32
          example: 90
        CommissionRates:
          type: array
          items:
            $ref: '#/components/schemas/CommissionRateRequestDto'
          description: >-
            Bu geri ödeme planının komisyon oranları. Güncellemede bu liste
            mevcutların tamamının yerini alır.
    ResultError:
      required:
        - Code
        - Message
      type: object
      properties:
        Code:
          type: string
          description: Hata kodu. Tam liste için sonuç kodları sayfasına bakın.
        Message:
          type: string
          description: Hata açıklaması.
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````