POST /product/{uid}/variant

Crée une nouvelle variante pour un produit existant.

Exemples de variantes:

  • Tailles : S, M, L, XL
  • Couleurs : Rouge, Bleu, Vert
  • Options : Avec option A, Sans option A

Propriétés personnalisables:

  • Prix spécifique à la variante
  • Stock propre à la variante
  • Référence distincte

Événement déclenché: CREATE_PRODUCT_VARIANT

Path parameters

  • uid string Required

    Identifiant unique du produit parent

application/json

Body Required

  • name string
  • reference string
  • sku string
  • price_ht number
  • buying_price number
  • tva_rate number
  • options object
  • stock object
    Hide stock attributes Show stock attributes object
    • nb_stock number
    • nb_alert number
    • nb_min number

Responses

  • 201

    Variante créée avec succès

  • 400

    Requête invalide - Données incorrectes

POST /product/{uid}/variant
curl \
 --request POST 'https://wuro.pro/api/v3.2/product/{uid}/variant' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","reference":"string","sku":"string","price_ht":42.0,"buying_price":42.0,"tva_rate":42.0,"options":{},"stock":{"nb_stock":42.0,"nb_alert":42.0,"nb_min":42.0}}'
Request examples
{
  "name": "string",
  "reference": "string",
  "sku": "string",
  "price_ht": 42.0,
  "buying_price": 42.0,
  "tva_rate": 42.0,
  "options": {},
  "stock": {
    "nb_stock": 42.0,
    "nb_alert": 42.0,
    "nb_min": 42.0
  }
}