Variants

Use variants to send products with size, flavor, or other option choices from Deliverect to your point-of-sale (POS) system.

Introduction

A variant is a product option that represents a different size, flavor, or similar choice within the same product group. Deliverect can display the cheapest variant price first, then send the selected variant to the POS with the order. Common variant groups include:

🍕Pizza sizes, such as large, medium, and small

🥤Drink options, such as regular cola and diet cola

🍦Ice cream flavors, such as chocolate and vanilla

Example

This example shows a Chicken Tenders product with three variants.

Chicken Tenders starts at €8:

  • 3 pieces: + €0
  • 6 pieces: + €3
  • 9 pieces: + €5.50

The POS receives the parent variant product, the selected variant, and any selected modifiers. In the JSON payloads, price values use the minor currency unit. For EUR, 800 means €8.00 and 50 means €0.50.

  • 3 pieces: €8 (shown below)
  • 6 pieces: €11
  • 9 pieces: €13.50
image shows variant product with 3 variations

The payload uses:

  • plu: the product identifier used by the POS
  • productType: the Deliverect product type value
  • subItems: the selected variant or modifier items nested under the parent product
"items": [{
    "plu": "VAR-PROD-1",
    "name": "Chicken tenders",
    "sortOrder": 0,
    "price": 0,
    "quantity": 1,
    "productType": 1,
    "subItems": [{
        "plu": "VAR-1",
        "name": "3 Pieces",
        "sortOrder": 0,
        "price": 800,
        "quantity": 1,
        "productType": 1,
        "subItems": [{
            "plu": "SAUCE-02",
            "name": "Hot Sauce",
            "sortOrder": 0,
            "price": 50,
            "quantity": 1,
            "productType": 2,
            "subItems": [],
        }],
        "productTags": []
    }],
    "productTags": []
}]

To insert a variant product from the POS, see "Example 6 - Variant products" in the Insert/Update Products endpoint.

  "products": [
    {
      "productType": 1,
      "plu": "VAR-PROD-1",
      "price": 0,
      "name": "Chicken Tenders",
      "posProductId": "POS-001",
      "posCategoryIds": [
        "CHK"
      ],
      "imageUrl": "https://storage.googleapis.com/ikona-bucket-staging/images/5ff6ee089328c8aefeeabe33/chicken-62285f90db5986001ebf58d5.jpg",
      "description": "Choose 3, 6 or 9 Pieces of Delicious Fried Chicken",
      "isVariant": true,
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000,
      "subProducts": [
        "MG-VAR-1"
      ]
    },
    {
      "productType": 3,
      "plu": "MG-VAR-1",
      "name": "How many pieces?",
      "posProductId": "POS-002",
      "description": "",
      "isVariantGroup": true,
      "subProducts": [
        "VAR-1",
        "VAR-2",
        "VAR-3"
      ],
      "min": 1,
      "max": 1
    },
    {
      "productType": 1,
      "plu": "VAR-1",
      "price": 800,
      "name": "3 Pieces",
      "posProductId": "POS-003",
      "imageUrl": "",
      "description": "",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    },
    {
      "productType": 1,
      "plu": "VAR-2",
      "price": 1100,
      "name": "6 Pieces",
      "posProductId": "POS-004",
      "imageUrl": "",
      "description": "",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    },
    {
      "productType": 1,
      "plu": "VAR-3",
      "price": 1350,
      "name": "9 Pieces",
      "posProductId": "POS-005",
      "imageUrl": "",
      "description": "",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    }
  ],
  "categories": [
    {
      "name": "Chicken",
      "posCategoryId": "CHK"
    }
  ]
}
'