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

# Update a customer



## OpenAPI

````yaml /technical-reference/openapi.yaml put /api/v1/customers/{id}
openapi: 3.1.0
info:
  title: adorabl Public API
  version: 1.0.0
  description: >
    Partner REST API. Authenticate with OAuth 2.0 client credentials issued from

    Data & Admin → API clients. Tokens are bound to one adorabl organization.


    Successful resource responses always wrap the payload in `data` — a single

    object for get-by-id, an array plus `nextCursor` for list. Child collections

    such as `addresses`, `contacts`, `uomConversions`, and `lines` are always
    present

    (`[]` when empty). Optional scalars and singular refs (`terms`,

    `customerGroup`, `supplierGroup`, `paymentMethod`, `category`,

    `preferredSupplier`, `baseUom`, `customer`, `warehouse`, `shipTo`, `billTo`)

    are `null` (or a string for supplier terms), never omitted. Do not send

    empty objects (`{}`) for a missing child.
servers:
  - url: https://sherpa-topaz.vercel.app
security: []
paths:
  /api/v1/customers/{id}:
    put:
      summary: Update a customer
      operationId: updateCustomer
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/CustomerWrite'
      responses:
        '200':
          description: Updated customer (same shape as GET)
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Customer'
        '400':
          description: Invalid customer payload
        '401':
          description: Missing or invalid token
        '403':
          description: Missing customers:write scope
        '404':
          description: Customer not found in the token org
      security:
        - bearerAuth: []
components:
  schemas:
    CustomerWrite:
      type: object
      required:
        - name
      description: >
        Create or update payload inside `{ data }`. Server-owned fields (`id`,
        `customerNumber`,

        `createdAt`, `updatedAt`, and child `id`s) are ignored. Empty objects
        (`{}`)

        are invalid for `terms` and `customerGroup`; omit or send `null`.

        On PUT, omitted header fields keep their current values. Omitted
        `addresses`

        and `contacts` are left unchanged; send `[]` to clear.
      properties:
        name:
          type: string
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - active
            - inactive
        paymentTermsDays:
          type: integer
        terms:
          oneOf:
            - $ref: '#/components/schemas/CustomerTerms'
            - type: 'null'
        customerGroup:
          oneOf:
            - $ref: '#/components/schemas/CustomerGroup'
            - type: 'null'
        paymentMethod:
          type:
            - string
            - 'null'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/CustomerAddress'
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/CustomerContact'
    Customer:
      type: object
      required:
        - id
        - customerNumber
        - name
        - email
        - phone
        - status
        - createdAt
        - updatedAt
        - paymentTermsDays
        - terms
        - customerGroup
        - paymentMethod
        - addresses
        - contacts
      properties:
        id:
          type: string
          format: uuid
        customerNumber:
          type: string
        name:
          type: string
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        paymentTermsDays:
          type: integer
        terms:
          oneOf:
            - $ref: '#/components/schemas/CustomerTerms'
            - type: 'null'
        customerGroup:
          oneOf:
            - $ref: '#/components/schemas/CustomerGroup'
            - type: 'null'
        paymentMethod:
          type:
            - string
            - 'null'
        addresses:
          type: array
          description: Always present. Empty when the customer has no addresses.
          items:
            $ref: '#/components/schemas/CustomerAddress'
        contacts:
          type: array
          description: Always present. Empty when the customer has no contacts.
          items:
            $ref: '#/components/schemas/CustomerContact'
    CustomerTerms:
      type: object
      required:
        - id
        - code
        - name
        - netDays
      properties:
        id:
          type: string
          format: uuid
        code:
          type: string
        name:
          type: string
        netDays:
          type: integer
    CustomerGroup:
      type: object
      required:
        - id
        - code
        - name
      properties:
        id:
          type: string
          format: uuid
        code:
          type: string
        name:
          type: string
    CustomerAddress:
      type: object
      required:
        - id
        - type
        - label
        - line1
        - line2
        - city
        - state
        - postalCode
        - country
        - isDefault
        - isBillTo
        - isShipTo
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
        label:
          type:
            - string
            - 'null'
        line1:
          type:
            - string
            - 'null'
        line2:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        postalCode:
          type:
            - string
            - 'null'
        country:
          type: string
        isDefault:
          type: boolean
        isBillTo:
          type: boolean
        isShipTo:
          type: boolean
    CustomerContact:
      type: object
      required:
        - id
        - name
        - title
        - email
        - phone
        - isDefault
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        title:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        isDefault:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.