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

# Update Supplier

> Update a supplier.



## OpenAPI

````yaml /openapi-specs/lucca-invoices.yaml put /cleemy-procurement/api/suppliers/{id}
openapi: 3.1.0
info:
  title: Lucca.Invoices
  version: '1.0'
  description: |
    Welcome on the documentation for the Lucca Invoices API.
  contact:
    name: API Support
    url: https://support.lucca.fr
    email: contact@luccasoftware.com
  license:
    name: Unlicensed
    url: https://www.luccasoftware.com
servers:
  - url: https://{host}
    description: Your Lucca account URL.
    variables:
      host:
        default: example.ilucca.net
        description: >-
          The URL of your dedicated Lucca account: `{account}.{env}.{region}`.


          Account reflects your company name. Env indicates the environment.
          Region depends on your server location.


          **Please, use your test or sandbox environments (and not your
          production env.) for testing purposes.**


          Environments:

          - `ilucca`: production environment for customers.

          - `ilucca-test`: test environment for customers.

          - `ilucca-demo`: demo environment for prospects.


          Regions:

          - `.ch` for Swiss located accounts.

          - `.net` for the others.


          Regarding sandboxes, the pattern differs:
          `https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com`,
          where:

          - `{sandboxName}` is automatically generated upon creation.

          - `{server}` may be "eu1", "eu2" or "ch1".
security: []
tags:
  - name: Purchases
    description: Purchases.
  - name: Cost-Centers
    description: Cost-Centers.
  - name: Approval
    description: Approval.
  - name: VAT
    description: VAT Rates.
  - name: Booked-Documents
    description: Booked-Documents.
  - name: Suppliers
    description: Suppliers.
  - name: Natures
    description: Natures.
  - name: Invoices
    description: Invoices.
  - name: Inbox
    description: Inbox.
  - name: Documents
    description: Documents.
paths:
  /cleemy-procurement/api/suppliers/{id}:
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - name: id
        description: ID of the supplier.
        in: path
        required: true
        schema:
          type: integer
          format: int32
    put:
      tags:
        - Suppliers
      summary: Update Supplier
      description: Update a supplier.
      operationId: put-supplier
      requestBody:
        description: Supplier to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/supplier'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/supplier'
components:
  parameters:
    Authorization:
      name: Authorization
      required: true
      description: 'API key. Value must be formatted like so: `lucca application={api_key}`.'
      in: header
      schema:
        type: string
  schemas:
    supplier:
      title: supplier
      description: A supplier.
      type: object
      properties:
        id:
          type: integer
          format: int32
          readOnly: true
        name:
          type: string
        state:
          $ref: '#/components/schemas/supplier-state'
        territory:
          allOf:
            - $ref: '#/components/schemas/territory-reference'
            - readOnly: true
              description: '**Read-only.** Territory of the supplier.'
        territoryId:
          description: '**Write-only.** ID of the territory.'
          type: string
          writeOnly: true
        legalRegistration:
          type: object
          properties:
            identifier:
              type:
                - string
                - 'null'
              description: Legal registration number (e.g. SIRET).
            vatNumber:
              type:
                - string
                - 'null'
              description: Intra-community VAT number.
        contacts:
          type: array
          items:
            type: object
            properties:
              firstName:
                type:
                  - string
                  - 'null'
              lastName:
                type:
                  - string
                  - 'null'
              email:
                type:
                  - string
                  - 'null'
                format: email
              phone:
                type:
                  - string
                  - 'null'
        paymentTerm:
          description: Default payment term for this supplier.
          type:
            - object
            - 'null'
          properties:
            value:
              type: integer
              format: int32
            unit:
              $ref: '#/components/schemas/time-unit'
        bankAccount:
          type:
            - object
            - 'null'
          properties:
            iban:
              type:
                - string
                - 'null'
            bic:
              type:
                - string
                - 'null'
        preferredNature:
          description: '**Read-only.** Preferred nature for this supplier.'
          readOnly: true
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
              format: int32
            name:
              type: string
            href:
              type: string
        preferredNatureId:
          description: '**Write-only.** ID of the preferred nature.'
          type:
            - integer
            - 'null'
          format: int32
          writeOnly: true
        preferredPaymentMethod:
          anyOf:
            - $ref: '#/components/schemas/payment-method'
            - type: 'null'
        preferredCostCenter:
          description: '**Read-only.** Preferred cost-center for this supplier.'
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/cost-center-reference'
        preferredCostCenterId:
          description: '**Write-only.** ID of the preferred cost-center.'
          type:
            - integer
            - 'null'
          format: int32
          writeOnly: true
        establishments:
          description: '**Read-only.** Establishments associated with this supplier.'
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/establishment-reference'
        flag:
          type: string
          enum:
            - Unflagged
            - Flagged
          readOnly: true
    supplier-state:
      title: Supplier State (enum)
      type: string
      enum:
        - Active
        - Archived
    territory-reference:
      title: Reference to a territory
      description: Reference to a territory.
      type: object
      required: []
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
          readOnly: true
        href:
          type: string
          format: uri
          readOnly: true
    time-unit:
      title: Unit of Time (enum)
      description: 'Day: day. Week: week. Month: month. Year: year.'
      type: string
      enum:
        - Day
        - Week
        - Month
        - Year
    payment-method:
      title: Method of Payment (enum)
      description: >-
        BankTransfer: bank transfer. PhysicalCard: physical card. Check: check.
        DirectDebit: direct debit. SingleUseCard: single use card.
      type: string
      enum:
        - BankTransfer
        - PhysicalCard
        - Check
        - DirectDebit
        - SingleUseCard
    cost-center-reference:
      title: Reference to a cost-center
      description: Reference to a cost-center.
      type: object
      required: []
      properties:
        id:
          type: integer
          format: int32
        name:
          description: '**Read-only.** Name of the cost-center.'
          type: string
          readOnly: true
        code:
          description: '**Read-only.** Code of the cost-center.'
          type: string
          readOnly: true
        href:
          type: string
          readOnly: true
    establishment-reference:
      title: Reference to an establishment
      description: Reference to an establishment.
      type: object
      required: []
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
          readOnly: true
        href:
          type: string
          format: uri
          readOnly: true

````