PATCH /client/{uid}

Met à jour les informations d'un client existant.

Vous pouvez modifier :

  • Les coordonnées (nom, adresse, contacts)
  • Les informations fiscales (SIRET, TVA)
  • Les conditions commerciales
  • L'état (active/inactive pour archiver)

Événement déclenché

Un événement UPDATE_CLIENT est émis après la mise à jour.

Path parameters

  • uid string Required

    Identifiant unique du client

application/json

Body Required

  • name string Required

    Name of the client (required)

  • email string(email)
  • phone string
  • mobile string
  • fax string
  • address string
  • address_complement string
  • address_end string
  • zip_code string
  • city string
  • country string

    Default value is France.

  • category string
  • client_code string
  • analytical_code string
  • siren string
  • nic string
  • tva_number string
  • website string
  • description string
  • notes string
  • tags array[string]

Responses

  • 200 application/json

    Client mis à jour avec succès

    Hide response attribute Show response attribute object
    • updatedClient object
      Hide updatedClient attributes Show updatedClient attributes object
      • _id string

        Unique identifier for the client

      • name string

        Name of the client (required)

      • email string(email)

        Email of the client

      • phone string

        Phone number

      • phoneFormat string

        Formatted phone number for search

      • mobile string

        Mobile phone number

      • mobileFormat string

        Formatted mobile number for search

      • fax string

        Fax number

      • address string

        Street address

      • address_complement string

        Address complement

      • address_end string

        Additional address information

      • zip_code string

        Zip code

      • city string

        City

      • country string

        Country

        Default value is France.

      • company string

        Reference to the company

      • category string

        Client category

      • client_code string

        Client code for accounting

      • analytical_code string

        Analytical code

      • siren string

        SIREN number

      • nic string

        NIC code

      • tva_number string

        VAT number

      • website string

        Website URL

      • description string

        Client description

      • notes string

        Notes about the client

      • avatar object

        Client avatar image

      • client_contact string

        Reference to main contact interlocutor

      • mainInterlocutor string

        Reference to main interlocutor

      • positionsAssigned array[string]

        List of assigned positions

      • positionCreator string

        Position that created this client

      • positionLastUpdator string

        Position that last updated this client

      • tags array[string]

        List of tag references

      • state string

        Client state

        Values are active or inactive. Default value is active.

      • stats object
        Hide stats attributes Show stats attributes object
        • nbInvoices integer

          Default value is 0.

        • nbNotes integer

          Default value is 0.

        • nbReminders integer

          Default value is 0.

        • nbFiles integer

          Default value is 0.

        • nbPurchases integer

          Default value is 0.

        • nbQuotes integer

          Default value is 0.

        • nbDeliveryReceipts integer

          Default value is 0.

      • extraData object

        Custom extra data

      • createdAt string(date-time)
      • updatedAt string(date-time)
  • 400

    Requête invalide - Données incorrectes

  • 404

    Client non trouvé

PATCH /client/{uid}
curl \
 --request PATCH 'https://wuro.pro/api/v3.2/client/{uid}' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","email":"hello@example.com","phone":"string","mobile":"string","fax":"string","address":"string","address_complement":"string","address_end":"string","zip_code":"string","city":"string","country":"France","category":"string","client_code":"string","analytical_code":"string","siren":"string","nic":"string","tva_number":"string","website":"string","description":"string","notes":"string","tags":["string"]}'
Request examples
{
  "name": "string",
  "email": "hello@example.com",
  "phone": "string",
  "mobile": "string",
  "fax": "string",
  "address": "string",
  "address_complement": "string",
  "address_end": "string",
  "zip_code": "string",
  "city": "string",
  "country": "France",
  "category": "string",
  "client_code": "string",
  "analytical_code": "string",
  "siren": "string",
  "nic": "string",
  "tva_number": "string",
  "website": "string",
  "description": "string",
  "notes": "string",
  "tags": [
    "string"
  ]
}
Response examples (200)
{
  "updatedClient": {
    "_id": "string",
    "name": "string",
    "email": "hello@example.com",
    "phone": "string",
    "phoneFormat": "string",
    "mobile": "string",
    "mobileFormat": "string",
    "fax": "string",
    "address": "string",
    "address_complement": "string",
    "address_end": "string",
    "zip_code": "string",
    "city": "string",
    "country": "France",
    "company": "string",
    "category": "string",
    "client_code": "string",
    "analytical_code": "string",
    "siren": "string",
    "nic": "string",
    "tva_number": "string",
    "website": "string",
    "description": "string",
    "notes": "string",
    "avatar": {},
    "client_contact": "string",
    "mainInterlocutor": "string",
    "positionsAssigned": [
      "string"
    ],
    "positionCreator": "string",
    "positionLastUpdator": "string",
    "tags": [
      "string"
    ],
    "state": "active",
    "stats": {
      "nbInvoices": 0,
      "nbNotes": 0,
      "nbReminders": 0,
      "nbFiles": 0,
      "nbPurchases": 0,
      "nbQuotes": 0,
      "nbDeliveryReceipts": 0
    },
    "extraData": {},
    "createdAt": "2025-05-04T09:42:00Z",
    "updatedAt": "2025-05-04T09:42:00Z"
  }
}