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

# Update a customer



## OpenAPI

````yaml /products/commerce/v1/openapi.yaml patch /customers/{id}
openapi: 3.1.0
info:
  license:
    name: Hellgate® API License
    url: https://starfish.team
  title: Commerce
  version: '0.1'
servers:
  - url: https://commerce1.on-hellgate.dev
    variables: {}
security:
  - mtls: []
  - api_key: []
tags: []
paths:
  /customers/{id}:
    patch:
      tags:
        - customers
      summary: Update a customer
      operationId: CommerceWeb.Customers.CustomerController.patch
      parameters:
        - description: >-
            Identifies the account. Required when authenticating via mTLS — omit
            when using an API key (account is inferred from the key).
          in: header
          name: X-Account-ID
          required: false
          schema:
            type: string
            x-struct: null
            x-validate: null
        - description: Customer ID
          in: path
          name: id
          required: true
          schema:
            type: string
            x-struct: null
            x-validate: null
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerUpdateParams'
        description: Body
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
          description: Success
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
      callbacks: {}
components:
  schemas:
    CustomerUpdateParams:
      properties:
        address:
          $ref: '#/components/schemas/AddressSchema'
        description:
          type: string
          x-struct: null
          x-validate: null
        email:
          type: string
          x-struct: null
          x-validate: null
        name:
          type: string
          x-struct: null
          x-validate: null
        tax_settings:
          $ref: '#/components/schemas/TaxSettingsSchema'
      title: CustomerUpdateParams
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.CustomersSchema.CustomerUpdateParams
      x-validate: null
    CustomerResponse:
      properties:
        address:
          $ref: '#/components/schemas/AddressSchema'
        description:
          type: string
          x-struct: null
          x-validate: null
        email:
          type: string
          x-struct: null
          x-validate: null
        id:
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        name:
          type: string
          x-struct: null
          x-validate: null
        tax_settings:
          $ref: '#/components/schemas/TaxSettingsSchema'
      required:
        - id
        - name
      title: CustomerResponse
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.CustomersSchema.CustomerResponse
      x-validate: null
    ErrorResponse:
      properties:
        classifier:
          type: string
          x-struct: null
          x-validate: null
        code:
          type: integer
          x-struct: null
          x-validate: null
        message:
          type: string
          x-struct: null
          x-validate: null
      required:
        - code
        - classifier
        - message
      title: ErrorResponse
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.ErrorsSchema.ErrorResponse
      x-validate: null
    AddressSchema:
      properties:
        city:
          type: string
          x-struct: null
          x-validate: null
        country_code:
          type: string
          x-struct: null
          x-validate: null
        line_1:
          type: string
          x-struct: null
          x-validate: null
        line_2:
          type: string
          x-struct: null
          x-validate: null
        postal_code:
          type: string
          x-struct: null
          x-validate: null
        state:
          type: string
          x-struct: null
          x-validate: null
      required:
        - line_1
        - postal_code
        - city
        - country_code
        - state
      title: AddressSchema
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.CustomersSchema.AddressSchema
      x-validate: null
    TaxSettingsSchema:
      properties:
        exempt:
          enum:
            - NONE
            - EXEMPT
            - REVERSE
          type: string
          x-struct: null
          x-validate: null
        tax_id:
          type: string
          x-struct: null
          x-validate: null
      required:
        - exempt
      title: TaxSettingsSchema
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.CustomersSchema.TaxSettingsSchema
      x-validate: null
  securitySchemes:
    mtls:
      description: >-
        Client certificate authentication via mTLS. Account-scoped routes
        additionally require the X-Account-ID header to identify the account.
      type: mutualTLS
    api_key:
      in: header
      name: X-API-Key
      type: apiKey

````