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



## OpenAPI

````yaml /technical-reference/openapi.yaml put /api/v1/suppliers/{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/suppliers/{id}:
    put:
      summary: Update a supplier
      operationId: updateSupplier
      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/SupplierWrite'
      responses:
        '200':
          description: Updated supplier (same shape as GET)
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Supplier'
        '400':
          description: Invalid supplier payload
        '401':
          description: Missing or invalid token
        '403':
          description: Missing suppliers:write scope
        '404':
          description: Supplier not found in the token org
      security:
        - bearerAuth: []
components:
  schemas:
    SupplierWrite:
      type: object
      required:
        - name
      description: >
        Create or update payload inside `{ data }`. Server-owned `id`,
        `supplierNumber`,

        timestamps, and child ids are ignored. 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'
        category:
          type: string
        status:
          type: string
          enum:
            - active
            - hold
            - inactive
        terms:
          type: string
        paymentMethod:
          type:
            - string
            - 'null'
        supplierGroup:
          oneOf:
            - $ref: '#/components/schemas/SupplierGroup'
            - type: 'null'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/SupplierAddress'
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/SupplierContact'
    Supplier:
      type: object
      required:
        - id
        - supplierNumber
        - name
        - email
        - phone
        - category
        - status
        - createdAt
        - updatedAt
        - terms
        - supplierGroup
        - paymentMethod
        - addresses
        - contacts
      properties:
        id:
          type: string
          format: uuid
        supplierNumber:
          type: string
        name:
          type: string
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        category:
          type: string
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        terms:
          type: string
          description: Free-text payment terms on the supplier row (e.g. Net 30).
        supplierGroup:
          oneOf:
            - $ref: '#/components/schemas/SupplierGroup'
            - type: 'null'
        paymentMethod:
          type:
            - string
            - 'null'
        addresses:
          type: array
          description: Always present. Empty when the supplier has no addresses.
          items:
            $ref: '#/components/schemas/SupplierAddress'
        contacts:
          type: array
          description: Always present. Empty when the supplier has no contacts.
          items:
            $ref: '#/components/schemas/SupplierContact'
    SupplierGroup:
      type: object
      required:
        - id
        - code
        - name
      properties:
        id:
          type: string
          format: uuid
        code:
          type: string
        name:
          type: string
    SupplierAddress:
      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
    SupplierContact:
      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.