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

# Adres güncelle

> Adres kaydının tüm 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.

* `DistrictId` ve `Address` zorunludur. İl ve ülke, ilçeden gelir.

<Warning>Fatura adresi olan bir kaydın `IsInvoiceAddress` değeri `false` yapılamaz. Önce başka bir adresi fatura adresi yapın.</Warning>


## OpenAPI

````yaml api-reference/openapi.tr.json PUT /api/v1/customers/{customerId}/addresses/{addressId}
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}/addresses/{addressId}:
    put:
      tags:
        - Customer Addresses
      summary: Adresi güncelle
      description: >-
        Adresin bütün alanlarını değiştirir. Gönderilmeyen alanlar temizlenir.
        IsInvoiceAddress true ise önceki fatura adresinin işareti kaldırılır.
        Carinin ilk adresi her zaman fatura adresidir.
      parameters:
        - name: customerId
          in: path
          description: Cari ID'si.
          required: true
          schema:
            type: string
            format: uuid
        - name: addressId
          in: path
          description: Adres 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/CustomerAddressRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CustomerAddressRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CustomerAddressRequestDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResultOfCustomerAddressDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '1106'
                Message: >-
                  IsInvoiceAddress cannot be unset. Set another address as the
                  invoice address instead.
                Errors:
                  - Code: '1106'
                    Message: >-
                      IsInvoiceAddress cannot be unset. Set another address as
                      the invoice address instead.
        '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: '1100'
                Message: Address not found.
                Errors:
                  - Code: '1100'
                    Message: Address 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:
    CustomerAddressRequestDto:
      type: object
      properties:
        DistrictId:
          type:
            - 'null'
            - string
          description: >-
            Zorunlu. GET /api/v1/definitions/districts ile dönen bir ilçenin
            ID'si. İl ve ülke bu ilçeden gelir.
          format: uuid
        Address:
          type:
            - 'null'
            - string
          description: Zorunlu. Açık adres.
          example: 'Caferağa Mah. Moda Cad. No: 10'
        PostalCode:
          type:
            - 'null'
            - string
          description: Posta kodu.
          example: '34710'
        IsInvoiceAddress:
          type: boolean
          description: >-
            Fatura adresi olup olmadığı. Her carinin tam olarak bir fatura
            adresi vardır.
          example: true
        CoordinateX:
          type:
            - 'null'
            - number
          description: Konum koordinatı X.
          format: double
          example: 40.9877
        CoordinateY:
          type:
            - 'null'
            - number
          description: Konum koordinatı Y.
          format: double
          example: 29.0254
    DataResultOfCustomerAddressDto:
      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/CustomerAddressDto'
    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.
    CustomerAddressDto:
      type: object
      properties:
        Id:
          type: string
          description: Adres ID'si.
          format: uuid
        CustomerId:
          type: string
          description: Cari ID'si.
          format: uuid
        DistrictId:
          type:
            - 'null'
            - string
          description: İlçe ID'si.
          format: uuid
        DistrictName:
          type:
            - 'null'
            - string
          description: İlçe adı.
          example: Kadıköy
        CityName:
          type:
            - 'null'
            - string
          description: İl adı.
          example: İstanbul
        CountryName:
          type:
            - 'null'
            - string
          description: Ülke adı.
          example: Türkiye
        Address:
          type:
            - 'null'
            - string
          description: Açık adres.
          example: 'Caferağa Mah. Moda Cad. No: 10'
        FullAddress:
          type:
            - 'null'
            - string
          description: İlçe, il ve ülkeyi de içeren tam adres (salt okunur).
        PostalCode:
          type:
            - 'null'
            - string
          description: Posta kodu.
          example: '34710'
        IsInvoiceAddress:
          type: boolean
          description: Fatura adresi olup olmadığı.
          example: true
        CoordinateX:
          type:
            - 'null'
            - number
          description: Konum koordinatı X.
          format: double
          example: 40.9877
        CoordinateY:
          type:
            - 'null'
            - number
          description: Konum koordinatı Y.
          format: double
          example: 29.0254
    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

````