How to Create / Update a Basket

This API lets you create and manage baskets by defining the order type and adding menu items. Baskets can be updated with customer details, items, discounts, or fulfillment before checkout.

The storeId needs to be retrieved before basket creation. Similarly, menuId needs to be provided in order to add items to the basket; see this guide here for more information.

Order Types

Types of orders to be included inside on the fulfilllment object.

OrderTypeDescription
pickuptakeaway orders
deliverydelivery handled by the ordering platform
eatIndine in orders
dispatchdelivery handled by a dispatch system connected via Deliverect. A call to the validation endpoint will be needed to confirm availability form the dispatch provider before basket checkout.

The minimum required structure when creating a basket should includestoreIdand fulfillment.type.

{
  "storeId": "668f7fbc4144aa9d78c8dd5e",
    "fulfillment": {
    "type": "delivery"}
  
}

Adding items to the basket

The unique identifier for each item is the plu ; the PLUs are retrieved via GET Menus endpoint.

On the example below, the item ordered would be a Burger with Tomatos as modifer. At subItem level, the "customizationPlu" refers to the PLU of the modifier group.

  "items": [
    {
      "menuId": "668f7ff64dc853e9c96a4877",
      "plu": "BURGER",
      "quantity": 1,
      "note": "extra salt please"
      ,
      "subItems": [
        {
          "plu": "TOMAT",
          "customizationPlu": "INGRD",
          "quantity": 1
        }
      ]
    }
  ]

📘

An id will be returned as response after making a POST Call to the Create basket endpoint. This id will be included later during the the checkout process as basket.id (basket ids cannot be re-used)

Update basket

Certain information can be provided or updated after creating the basket via a patch request via the following endpoints:

⚠️

Basket updates can only be provided before basket checkout.