PATCH /product/{uid}

Met à jour les informations d'un produit existant.

Vous pouvez modifier :

  • Les informations de base (nom, référence, description)
  • Les prix et TVA
  • Les unités de vente
  • Les catégories

Événement déclenché

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

Path parameters

  • uid string Required

    Identifiant unique du produit

application/json

Body Required

  • name string Required
  • reference string
  • sku string
  • description string
  • price_ht number
  • buying_price number
  • cost_price number
  • tva string
  • tva_rate number
  • ecotax number
  • category string
  • unit string
  • electronic boolean
  • is_marchandise boolean
  • url_ext string
  • mandatory_mentions string
  • analytical_code string
  • hasVariations boolean
  • hasStockManagement boolean
  • hasSpecifications boolean
  • stock object
    Hide stock attributes Show stock attributes object
    • forceSell boolean
    • nb_alert number
    • nb_min number
    • nb_stock number
  • specifications object
    Hide specifications attributes Show specifications attributes object
    • depth number
    • height number
    • weight number
    • width number
  • options array[object]
    Hide options attributes Show options attributes object
    • name string
    • values array[string]
  • suppliers array[string]

Responses

  • 200 application/json

    Produit mis à jour avec succès

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

        Unique identifier for the product

      • name string

        Product name (required)

      • reference string

        Product reference

      • sku string

        Stock Keeping Unit

      • description string

        Product description

      • price_ht number

        Price without tax

      • buying_price number

        Buying/cost price

      • cost_price number

        Cost price (coût de revient)

      • commercial_margin number

        Commercial margin (price_ht - buying_price)

      • gross_margin number

        Gross margin (price_ht - cost_price)

      • tva string

        Reference to VAT rate

      • tva_rate number

        VAT rate value

      • ecotax number

        Ecotax amount

      • category string

        Reference to product category

      • company string

        Reference to the company

      • unit string

        Unit of measurement

      • electronic boolean

        Is electronic product

      • is_marchandise boolean

        Is merchandise

      • url_ext string

        External URL

      • mandatory_mentions string

        Mandatory legal mentions

      • analytical_code string

        Analytical code

      • hasVariations boolean

        Has product variations

        Default value is false.

      • hasStockManagement boolean

        Stock management enabled

        Default value is false.

      • hasSpecifications boolean

        Has specifications

        Default value is false.

      • stock object
        Hide stock attributes Show stock attributes object
        • forceSell boolean
        • nb_alert number
        • nb_min number
        • nb_stock number
        • value_ht number
        • value_ttc number
        • sell_value_ht number
        • sell_value_ttc number
      • specifications object
        Hide specifications attributes Show specifications attributes object
        • depth number
        • height number
        • weight number
        • width number
      • options array[object]
        Hide options attributes Show options attributes object
        • name string
        • values array[string]
      • images array[object]
        Hide images attributes Show images attributes object
        • filename string
        • id string
        • mime string
        • size number
        • url string
      • files array[object]
        Hide files attributes Show files attributes object
        • filename string
        • id string
        • mime string
        • size number
        • url string
      • variants array[string]

        List of variant references

      • suppliers array[string]

        List of supplier (client) references

      • state string

        Values are active or inactive. Default value is active.

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

    Requête invalide - Données incorrectes

  • 404

    Produit non trouvé

PATCH /product/{uid}
curl \
 --request PATCH 'https://wuro.pro/api/v3.2/product/{uid}' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","reference":"string","sku":"string","description":"string","price_ht":42.0,"buying_price":42.0,"cost_price":42.0,"tva":"string","tva_rate":42.0,"ecotax":42.0,"category":"string","unit":"string","electronic":true,"is_marchandise":true,"url_ext":"string","mandatory_mentions":"string","analytical_code":"string","hasVariations":true,"hasStockManagement":true,"hasSpecifications":true,"stock":{"forceSell":true,"nb_alert":42.0,"nb_min":42.0,"nb_stock":42.0},"specifications":{"depth":42.0,"height":42.0,"weight":42.0,"width":42.0},"options":[{"name":"string","values":["string"]}],"suppliers":["string"]}'
Request examples
{
  "name": "string",
  "reference": "string",
  "sku": "string",
  "description": "string",
  "price_ht": 42.0,
  "buying_price": 42.0,
  "cost_price": 42.0,
  "tva": "string",
  "tva_rate": 42.0,
  "ecotax": 42.0,
  "category": "string",
  "unit": "string",
  "electronic": true,
  "is_marchandise": true,
  "url_ext": "string",
  "mandatory_mentions": "string",
  "analytical_code": "string",
  "hasVariations": true,
  "hasStockManagement": true,
  "hasSpecifications": true,
  "stock": {
    "forceSell": true,
    "nb_alert": 42.0,
    "nb_min": 42.0,
    "nb_stock": 42.0
  },
  "specifications": {
    "depth": 42.0,
    "height": 42.0,
    "weight": 42.0,
    "width": 42.0
  },
  "options": [
    {
      "name": "string",
      "values": [
        "string"
      ]
    }
  ],
  "suppliers": [
    "string"
  ]
}
Response examples (200)
{
  "updatedProduct": {
    "_id": "string",
    "name": "string",
    "reference": "string",
    "sku": "string",
    "description": "string",
    "price_ht": 42.0,
    "buying_price": 42.0,
    "cost_price": 42.0,
    "commercial_margin": 42.0,
    "gross_margin": 42.0,
    "tva": "string",
    "tva_rate": 42.0,
    "ecotax": 42.0,
    "category": "string",
    "company": "string",
    "unit": "string",
    "electronic": true,
    "is_marchandise": true,
    "url_ext": "string",
    "mandatory_mentions": "string",
    "analytical_code": "string",
    "hasVariations": false,
    "hasStockManagement": false,
    "hasSpecifications": false,
    "stock": {
      "forceSell": true,
      "nb_alert": 42.0,
      "nb_min": 42.0,
      "nb_stock": 42.0,
      "value_ht": 42.0,
      "value_ttc": 42.0,
      "sell_value_ht": 42.0,
      "sell_value_ttc": 42.0
    },
    "specifications": {
      "depth": 42.0,
      "height": 42.0,
      "weight": 42.0,
      "width": 42.0
    },
    "options": [
      {
        "name": "string",
        "values": [
          "string"
        ]
      }
    ],
    "images": [
      {
        "filename": "string",
        "id": "string",
        "mime": "string",
        "size": 42.0,
        "url": "string"
      }
    ],
    "files": [
      {
        "filename": "string",
        "id": "string",
        "mime": "string",
        "size": 42.0,
        "url": "string"
      }
    ],
    "variants": [
      "string"
    ],
    "suppliers": [
      "string"
    ],
    "state": "active",
    "createdAt": "2025-05-04T09:42:00Z",
    "updatedAt": "2025-05-04T09:42:00Z"
  }
}