Skip to main content
GET
/
v1
/
products
/
{product_id}
/
variants
curl -X GET "https://api.officiscan.com/v1/products/12345/variants" \
  -H "Authorization: Bearer oc_YOUR_API_KEY"
{
  "product_id": 12345,
  "data": [
    {
      "id": 12346,
      "ean13": "3401560504508",
      "ean7": "6050451",
      "brand": "sanofi",
      "name": "doliprane 500mg comprimés",
      "description": "Paracétamol 500mg",
      "currency": "EUR",
      "format": {
        "packaging": "Boîte de 16 comprimés",
        "quantity": "16",
        "unit": "comprimés"
      },
      "images": {
        "url": "https://..."
      },
      "has_ean": true,
      "is_default": true,
      "variation": {
        "type": "quantité",
        "value": "16"
      },
      "indexed_at": "2023-06-15T14:30:00",
      "last_collected_at": "2023-06-15T14:30:00",
      "latest": {
        "price": 2.49,
        "in_stock": true
      }
    },
    {
      "id": 12347,
      "ean13": "3401560504509",
      "ean7": "6050452",
      "brand": "sanofi",
      "name": "doliprane 1000mg effervescent",
      "description": "Paracétamol 1000mg effervescent",
      "currency": "EUR",
      "format": {
        "packaging": "Boîte de 8 comprimés effervescents",
        "quantity": "8",
        "unit": "comprimés"
      },
      "images": {
        "url": "https://..."
      },
      "has_ean": true,
      "is_default": false,
      "variation": {
        "type": "format",
        "value": "effervescent"
      },
      "indexed_at": "2023-06-15T14:30:00",
      "last_collected_at": "2023-06-15T14:30:00",
      "latest": {
        "price": 3.29,
        "in_stock": true
      }
    }
  ],
  "total": 5,
  "page": 1,
  "per_page": 50,
  "pages": 1
}
product_id
integer
required
ID du produit parent
page
integer
default:"1"
Numéro de page
per_page
integer
default:"50"
Résultats par page (max: 100)

Description

Retourne toutes les variantes liées à un produit parent. Utilisez cet endpoint pour les produits où has_variants=true. Les variantes peuvent représenter différentes tailles, couleurs, ou formats d’un même produit.
curl -X GET "https://api.officiscan.com/v1/products/12345/variants" \
  -H "Authorization: Bearer oc_YOUR_API_KEY"
{
  "product_id": 12345,
  "data": [
    {
      "id": 12346,
      "ean13": "3401560504508",
      "ean7": "6050451",
      "brand": "sanofi",
      "name": "doliprane 500mg comprimés",
      "description": "Paracétamol 500mg",
      "currency": "EUR",
      "format": {
        "packaging": "Boîte de 16 comprimés",
        "quantity": "16",
        "unit": "comprimés"
      },
      "images": {
        "url": "https://..."
      },
      "has_ean": true,
      "is_default": true,
      "variation": {
        "type": "quantité",
        "value": "16"
      },
      "indexed_at": "2023-06-15T14:30:00",
      "last_collected_at": "2023-06-15T14:30:00",
      "latest": {
        "price": 2.49,
        "in_stock": true
      }
    },
    {
      "id": 12347,
      "ean13": "3401560504509",
      "ean7": "6050452",
      "brand": "sanofi",
      "name": "doliprane 1000mg effervescent",
      "description": "Paracétamol 1000mg effervescent",
      "currency": "EUR",
      "format": {
        "packaging": "Boîte de 8 comprimés effervescents",
        "quantity": "8",
        "unit": "comprimés"
      },
      "images": {
        "url": "https://..."
      },
      "has_ean": true,
      "is_default": false,
      "variation": {
        "type": "format",
        "value": "effervescent"
      },
      "indexed_at": "2023-06-15T14:30:00",
      "last_collected_at": "2023-06-15T14:30:00",
      "latest": {
        "price": 3.29,
        "in_stock": true
      }
    }
  ],
  "total": 5,
  "page": 1,
  "per_page": 50,
  "pages": 1
}