> ## 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.

# Cari güncelle

> Carinin ana alanlarını günceller.

Tek tek alan değiştirecekseniz [kısmi güncellemeyi](/tr/v1/guides/partial-update) kullanın: `PATCH` yalnızca gönderdiğiniz alanları değiştirir.

Sadece ana cari alanları güncellenir; `Addresses`, `Telephones` gibi alt kayıtlar bu endpoint ile değişmez, kendi endpoint'leri kullanılır.

<Warning>Güncelleme **tam değiştirme** (replace) şeklinde çalışır: gönderilmeyen alanlar boş ya da varsayılan değere döner. Önce [cari detayını](/tr/v1/customers/get) okuyup değiştirmek istediğiniz alanları düzenleyerek gönderin.</Warning>

`CustomerCode` güncellemede `"Next"` olamaz.


## OpenAPI

````yaml api-reference/openapi.tr.json PUT /api/v1/customers/{customerId}
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://api.noyax.com
security:
  - Bearer: []
tags:
  - name: Sections
  - name: Warehouses
  - name: Product Critical Stock
  - name: Product groups
  - name: Product Parameter Definitions
  - name: Product Parameters
  - name: Product Prices
  - name: Products
  - name: Cities
  - name: Countries
  - name: Currencies
  - name: Districts
  - 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/customers/{customerId}:
    put:
      tags:
        - Customers
      summary: Cariyi güncelle
      description: >-
        Carinin ana alanlarını değiştirir. Alt kayıtlar değişmez; onlar için
        kendi endpoint'lerini kullanın.
      parameters:
        - name: customerId
          in: path
          description: Cari 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/CustomerUpdateRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CustomerUpdateRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CustomerUpdateRequestDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResultOfCustomerDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '1002'
                Message: CustomerCode '0000382026' is already used in this company.
                Errors:
                  - Code: '1002'
                    Message: CustomerCode '0000382026' is already used in this company.
        '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: '1000'
                Message: Customer not found.
                Errors:
                  - Code: '1000'
                    Message: Customer 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:
    CustomerUpdateRequestDto:
      type: object
      properties:
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Şirket içinde benzersizdir. Oluştururken "Next"
            gönderirseniz kod, şirketin cari numarası serisinden üretilir.
          example: '0000382026'
        Name:
          type:
            - 'null'
            - string
          description: Zorunlu. Cari adı.
          example: Örnek Ticaret A.Ş.
        TaxNumber:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Yalnızca rakam: 10 haneli vergi kimlik numarası (VKN) ya da
            11 haneli T.C. kimlik numarası (TCKN).
          example: '1234567890'
        TaxOffice:
          type:
            - 'null'
            - string
          description: Vergi dairesi adı.
          example: Kadıköy
        InvoiceTitle:
          type:
            - 'null'
            - string
          description: Faturalarda kullanılan ünvan. Boş bırakılırsa Name alanı kullanılır.
          example: Örnek Ticaret Anonim Şirketi
        Note:
          type:
            - 'null'
            - string
          description: >-
            Serbest metin not. ShowNoteOn* alanlarından biri true ise
            zorunludur.
          example: Deliveries on weekdays only.
        DueDays:
          type: integer
          description: Gün olarak vade. 0'dan küçük olamaz.
          format: int32
          example: 30
        DiscountRate:
          type: number
          description: Varsayılan iskonto oranı (%), 0 ile 100 arasında.
          format: double
          example: 5
        Blacklisted:
          type: boolean
          description: Cariyi kara listeye alır.
          example: false
        MovementType:
          type: integer
          description: >-
            1: Satıcı, 2: Alıcı, 3: Satıcı ve alıcı. 0 gönderilirse 1 olarak
            kaydedilir.
          format: int32
          example: 2
        RiskLimit:
          type: number
          description: Risk limiti tutarı. 0'dan küçük olamaz. 0, risk limiti yok demektir.
          format: double
          example: 250000
        RiskControl:
          type: integer
          description: >-
            Risk limitinin nasıl kontrol edileceği. 1: Mevcut bakiye, 2: Satış
            tutarı. RiskLimit 0'dan büyükse 1 ya da 2 olmalıdır.
          format: int32
          example: 1
        RiskAction:
          type: integer
          description: >-
            Risk limiti aşıldığında ne olacağı. 0: Devam et, 1: Kullanıcıyı
            uyar, 2: İşlemi durdur.
          format: int32
          example: 1
        EInvoiceUser:
          type: boolean
          description: Carinin e-fatura mükellefi olup olmadığı.
          example: true
        EInvoiceScenario:
          type: integer
          description: >-
            E-fatura senaryosu. EInvoiceUser true ise 1-9, değilse 0 olmalıdır.
            1: Ticari, 2: Temel, 3: İhracat, 4: Kamu, 5: HKS, 6: Enerji, 7:
            İlaç/Tıbbi cihaz, 8: Yatırım teşvik, 9: IDIS.
          format: int32
          example: 1
        ShipmentDefinitionId:
          type:
            - 'null'
            - string
          description: >-
            GET /api/v1/definitions/shipment-definitions ile dönen bir sevkiyat
            tanımının ID'si.
          format: uuid
        SharingCodeId:
          type:
            - 'null'
            - string
          description: >-
            Cariyi kimlerin görebileceğini sınırlayan paylaşım kodu. Boş
            bırakılırsa herkes görür; doldurulursa kullanıcının paylaşım
            kodlarından biri olmalıdır.
          format: uuid
        ShowNoteOnQuote:
          type: boolean
          description: Notu tekliflerde göster.
          example: false
        ShowNoteOnOrder:
          type: boolean
          description: Notu siparişlerde göster.
          example: false
        ShowNoteOnWaybill:
          type: boolean
          description: Notu irsaliyelerde göster.
          example: true
        ShowNoteOnInvoice:
          type: boolean
          description: Notu faturalarda göster.
          example: false
        IdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/IdentitySchemeDto'
          description: >-
            Ek kimlik numaraları (ör. MERSISNO). Her SchemeID yalnızca bir kez
            gönderilebilir.
    DataResultOfCustomerDto:
      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/CustomerDto'
    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.
    IdentitySchemeDto:
      type: object
      properties:
        SchemeID:
          type:
            - 'null'
            - string
          description: UBL kimlik şeması kodu, ör. MERSISNO, TICARETSICILNO, MUSTERINO.
          example: MERSISNO
        Value:
          type:
            - 'null'
            - string
          description: Zorunlu. Kimlik numarasının değeri.
          example: '0123456789000015'
    CustomerDto:
      type: object
      properties:
        Id:
          type: string
          description: Cari ID'si.
          format: uuid
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Şirket içinde benzersizdir. Oluştururken "Next"
            gönderirseniz kod, şirketin cari numarası serisinden üretilir.
          example: '0000382026'
        Name:
          type:
            - 'null'
            - string
          description: Zorunlu. Cari adı.
          example: Örnek Ticaret A.Ş.
        TaxNumber:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. Yalnızca rakam: 10 haneli vergi kimlik numarası (VKN) ya da
            11 haneli T.C. kimlik numarası (TCKN).
          example: '1234567890'
        TaxOffice:
          type:
            - 'null'
            - string
          description: Vergi dairesi adı.
          example: Kadıköy
        InvoiceTitle:
          type:
            - 'null'
            - string
          description: Faturalarda kullanılan ünvan. Boş bırakılırsa Name alanı kullanılır.
          example: Örnek Ticaret Anonim Şirketi
        Note:
          type:
            - 'null'
            - string
          description: >-
            Serbest metin not. ShowNoteOn* alanlarından biri true ise
            zorunludur.
          example: Deliveries on weekdays only.
        DueDays:
          type: integer
          description: Gün olarak vade. 0'dan küçük olamaz.
          format: int32
          example: 30
        DiscountRate:
          type: number
          description: Varsayılan iskonto oranı (%), 0 ile 100 arasında.
          format: double
          example: 5
        Blacklisted:
          type: boolean
          description: Cariyi kara listeye alır.
          example: false
        MovementType:
          type: integer
          description: >-
            1: Satıcı, 2: Alıcı, 3: Satıcı ve alıcı. 0 gönderilirse 1 olarak
            kaydedilir.
          format: int32
          example: 2
        RiskLimit:
          type: number
          description: Risk limiti tutarı. 0'dan küçük olamaz. 0, risk limiti yok demektir.
          format: double
          example: 250000
        RiskControl:
          type: integer
          description: >-
            Risk limitinin nasıl kontrol edileceği. 1: Mevcut bakiye, 2: Satış
            tutarı. RiskLimit 0'dan büyükse 1 ya da 2 olmalıdır.
          format: int32
          example: 1
        RiskAction:
          type: integer
          description: >-
            Risk limiti aşıldığında ne olacağı. 0: Devam et, 1: Kullanıcıyı
            uyar, 2: İşlemi durdur.
          format: int32
          example: 1
        EInvoiceUser:
          type: boolean
          description: Carinin e-fatura mükellefi olup olmadığı.
          example: true
        EInvoiceScenario:
          type: integer
          description: >-
            E-fatura senaryosu. EInvoiceUser true ise 1-9, değilse 0 olmalıdır.
            1: Ticari, 2: Temel, 3: İhracat, 4: Kamu, 5: HKS, 6: Enerji, 7:
            İlaç/Tıbbi cihaz, 8: Yatırım teşvik, 9: IDIS.
          format: int32
          example: 1
        ShipmentDefinitionId:
          type:
            - 'null'
            - string
          description: >-
            GET /api/v1/definitions/shipment-definitions ile dönen bir sevkiyat
            tanımının ID'si.
          format: uuid
        SharingCodeId:
          type:
            - 'null'
            - string
          description: >-
            Cariyi kimlerin görebileceğini sınırlayan paylaşım kodu. Boş
            bırakılırsa herkes görür; doldurulursa kullanıcının paylaşım
            kodlarından biri olmalıdır.
          format: uuid
        ShowNoteOnQuote:
          type: boolean
          description: Notu tekliflerde göster.
          example: false
        ShowNoteOnOrder:
          type: boolean
          description: Notu siparişlerde göster.
          example: false
        ShowNoteOnWaybill:
          type: boolean
          description: Notu irsaliyelerde göster.
          example: true
        ShowNoteOnInvoice:
          type: boolean
          description: Notu faturalarda göster.
          example: false
        IdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/IdentitySchemeDto'
          description: >-
            Ek kimlik numaraları (ör. MERSISNO). Her SchemeID yalnızca bir kez
            gönderilebilir.
        CreateDate:
          type:
            - 'null'
            - string
          description: Oluşturulma tarihi.
          format: date-time
        ModifyDate:
          type:
            - 'null'
            - string
          description: Son değişiklik tarihi.
          format: date-time
    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

````