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

# Partially update customer

> Changes only the sent fields of a customer.

Send **only the fields you want to change**; fields you do not send keep their current values. Rules and examples: [partial update](/en/v1/guides/partial-update).

* A field that is not sent stays unchanged, a field sent as `null` is cleared.
* Validation runs on the whole merged record; setting a required field to `null` is rejected.
* Sub-records (addresses, telephones, bank accounts, ...) are not changed here; use their own endpoints.


## OpenAPI

````yaml api-reference/openapi.json PATCH /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}:
    patch:
      tags:
        - Customers
      summary: Partially update customer
      description: >-
        Changes only the fields sent in the body (JSON Merge Patch). Fields that
        are not sent keep their current values; a field sent as null is cleared.
        Sub-records are not changed; use their own endpoints.
      parameters:
        - name: customerId
          in: path
          description: Customer ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-UserID
          in: header
          description: >-
            ID of the Noyax user the request is made on behalf of. Written to
            the audit fields of created, updated and deleted records.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-CompanyID
          in: header
          description: >-
            ID of the company. The user must be assigned to this company. All
            reads and writes are limited to this company.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-PeriodID
          in: header
          description: >-
            ID of the accounting period. Optional for customer endpoints; if
            sent, it is written to created records.
          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: >-
            Required. Unique within the company. Send "Next" on create to
            generate the code from the company's customer number series.
          example: '0000382026'
        Name:
          type:
            - 'null'
            - string
          description: Required. Customer name.
          example: Örnek Ticaret A.Ş.
        TaxNumber:
          type:
            - 'null'
            - string
          description: >-
            Required. Digits only: 10 digits for a tax number (VKN) or 11 digits
            for a national ID number (TCKN).
          example: '1234567890'
        TaxOffice:
          type:
            - 'null'
            - string
          description: Tax office name.
          example: Kadıköy
        InvoiceTitle:
          type:
            - 'null'
            - string
          description: Title used on invoices. If empty, Name is used.
          example: Örnek Ticaret Anonim Şirketi
        Note:
          type:
            - 'null'
            - string
          description: Free text note. Required when any ShowNoteOn* field is true.
          example: Deliveries on weekdays only.
        DueDays:
          type: integer
          description: Payment term in days. Cannot be less than 0.
          format: int32
          example: 30
        DiscountRate:
          type: number
          description: Default discount rate (%) between 0 and 100.
          format: double
          example: 5
        Blacklisted:
          type: boolean
          description: Marks the customer as blacklisted.
          example: false
        MovementType:
          type: integer
          description: '1: Supplier, 2: Buyer, 3: Supplier and buyer. 0 is saved as 1.'
          format: int32
          example: 2
        RiskLimit:
          type: number
          description: Risk limit amount. Cannot be less than 0. 0 means no risk limit.
          format: double
          example: 250000
        RiskControl:
          type: integer
          description: >-
            How the risk limit is checked. 1: Current balance, 2: Sales amount.
            Must be 1 or 2 when RiskLimit is greater than 0.
          format: int32
          example: 1
        RiskAction:
          type: integer
          description: >-
            What happens when the risk limit is exceeded. 0: Continue, 1: Warn
            the user, 2: Stop the operation.
          format: int32
          example: 1
        EInvoiceUser:
          type: boolean
          description: Whether the customer is a registered e-invoice user.
          example: true
        EInvoiceScenario:
          type: integer
          description: >-
            E-invoice scenario. Must be 1-9 when EInvoiceUser is true, 0
            otherwise. 1: Commercial, 2: Basic, 3: Export, 4: Public, 5: HKS, 6:
            Energy, 7: Pharmaceutical/Medical device, 8: Investment incentive,
            9: IDIS.
          format: int32
          example: 1
        ShipmentDefinitionId:
          type:
            - 'null'
            - string
          description: >-
            ID of a shipment definition from GET
            /api/v1/definitions/shipment-definitions.
          format: uuid
        SharingCodeId:
          type:
            - 'null'
            - string
          description: >-
            Sharing code that limits who can see the customer. Empty means
            visible to everyone; otherwise it must be one of the user's sharing
            codes.
          format: uuid
        ShowNoteOnQuote:
          type: boolean
          description: Show the note on quotes.
          example: false
        ShowNoteOnOrder:
          type: boolean
          description: Show the note on orders.
          example: false
        ShowNoteOnWaybill:
          type: boolean
          description: Show the note on waybills.
          example: true
        ShowNoteOnInvoice:
          type: boolean
          description: Show the note on invoices.
          example: false
        IdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/IdentitySchemeDto'
          description: >-
            Additional identifiers (e.g. MERSISNO). Each SchemeID can be sent
            only once.
    DataResultOfCustomerDto:
      required:
        - Success
        - ResultCode
        - Data
      type: object
      properties:
        Success:
          type: boolean
          description: Whether the operation succeeded.
          example: true
        ResultCode:
          type: string
          description: >-
            "0000" on success. On failure, the code of the first error; all
            errors are listed in Errors.
          example: '0000'
        Message:
          type:
            - 'null'
            - string
          description: >-
            Error message when Success is false. Messages of all errors are
            joined into a single text.
        Data:
          $ref: '#/components/schemas/CustomerDto'
    ErrorResult:
      type: object
      properties:
        Success:
          type: boolean
          description: Whether the operation succeeded.
          example: false
        ResultCode:
          type:
            - 'null'
            - string
          description: >-
            "0000" on success. On failure, the code of the first error; all
            errors are listed in Errors.
        Message:
          type:
            - 'null'
            - string
          description: >-
            Error message when Success is false. Messages of all errors are
            joined into a single text.
        Errors:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ResultError'
          description: All errors with their codes. Only present when Success is false.
    IdentitySchemeDto:
      type: object
      properties:
        SchemeID:
          type:
            - 'null'
            - string
          description: UBL identity scheme code, e.g. MERSISNO, TICARETSICILNO, MUSTERINO.
          example: MERSISNO
        Value:
          type:
            - 'null'
            - string
          description: Required. Identifier value.
          example: '0123456789000015'
    CustomerDto:
      type: object
      properties:
        Id:
          type: string
          description: Customer ID.
          format: uuid
        CustomerCode:
          type:
            - 'null'
            - string
          description: >-
            Required. Unique within the company. Send "Next" on create to
            generate the code from the company's customer number series.
          example: '0000382026'
        Name:
          type:
            - 'null'
            - string
          description: Required. Customer name.
          example: Örnek Ticaret A.Ş.
        TaxNumber:
          type:
            - 'null'
            - string
          description: >-
            Required. Digits only: 10 digits for a tax number (VKN) or 11 digits
            for a national ID number (TCKN).
          example: '1234567890'
        TaxOffice:
          type:
            - 'null'
            - string
          description: Tax office name.
          example: Kadıköy
        InvoiceTitle:
          type:
            - 'null'
            - string
          description: Title used on invoices. If empty, Name is used.
          example: Örnek Ticaret Anonim Şirketi
        Note:
          type:
            - 'null'
            - string
          description: Free text note. Required when any ShowNoteOn* field is true.
          example: Deliveries on weekdays only.
        DueDays:
          type: integer
          description: Payment term in days. Cannot be less than 0.
          format: int32
          example: 30
        DiscountRate:
          type: number
          description: Default discount rate (%) between 0 and 100.
          format: double
          example: 5
        Blacklisted:
          type: boolean
          description: Marks the customer as blacklisted.
          example: false
        MovementType:
          type: integer
          description: '1: Supplier, 2: Buyer, 3: Supplier and buyer. 0 is saved as 1.'
          format: int32
          example: 2
        RiskLimit:
          type: number
          description: Risk limit amount. Cannot be less than 0. 0 means no risk limit.
          format: double
          example: 250000
        RiskControl:
          type: integer
          description: >-
            How the risk limit is checked. 1: Current balance, 2: Sales amount.
            Must be 1 or 2 when RiskLimit is greater than 0.
          format: int32
          example: 1
        RiskAction:
          type: integer
          description: >-
            What happens when the risk limit is exceeded. 0: Continue, 1: Warn
            the user, 2: Stop the operation.
          format: int32
          example: 1
        EInvoiceUser:
          type: boolean
          description: Whether the customer is a registered e-invoice user.
          example: true
        EInvoiceScenario:
          type: integer
          description: >-
            E-invoice scenario. Must be 1-9 when EInvoiceUser is true, 0
            otherwise. 1: Commercial, 2: Basic, 3: Export, 4: Public, 5: HKS, 6:
            Energy, 7: Pharmaceutical/Medical device, 8: Investment incentive,
            9: IDIS.
          format: int32
          example: 1
        ShipmentDefinitionId:
          type:
            - 'null'
            - string
          description: >-
            ID of a shipment definition from GET
            /api/v1/definitions/shipment-definitions.
          format: uuid
        SharingCodeId:
          type:
            - 'null'
            - string
          description: >-
            Sharing code that limits who can see the customer. Empty means
            visible to everyone; otherwise it must be one of the user's sharing
            codes.
          format: uuid
        ShowNoteOnQuote:
          type: boolean
          description: Show the note on quotes.
          example: false
        ShowNoteOnOrder:
          type: boolean
          description: Show the note on orders.
          example: false
        ShowNoteOnWaybill:
          type: boolean
          description: Show the note on waybills.
          example: true
        ShowNoteOnInvoice:
          type: boolean
          description: Show the note on invoices.
          example: false
        IdentitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/IdentitySchemeDto'
          description: >-
            Additional identifiers (e.g. MERSISNO). Each SchemeID can be sent
            only once.
        CreateDate:
          type:
            - 'null'
            - string
          description: Creation date.
          format: date-time
        ModifyDate:
          type:
            - 'null'
            - string
          description: Last modification date.
          format: date-time
    ResultError:
      required:
        - Code
        - Message
      type: object
      properties:
        Code:
          type: string
          description: Error code. See the result codes page for the full list.
        Message:
          type: string
          description: Error description.
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````