Show Items to Upsell

Order Ahead / Endpoints

Show Items to Upsell

This endpoint responds with a list of menu item IDs to upsell to the user as they review their order ahead order.

LevelUp decides which items are eligible to be upsold based on criteria such as the contents of the user’s cart, merchant-defined customer segments, and the time of day. Sometimes no items will be eligible for upselling.

The item IDs returned will be from the order ahead menu on which the order is being placed. It is expected that the client has the full menu data already loaded in memory, and will look up item details such as name, price, and image using the item IDs returned by the upsells endpoint.

Request Endpoint

POST /v15/upsells

Authorization Required

A user token is required for this request.

Authorization: token user="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"

cURL Example

curl https://api.sandbox-levelup.com/v15/upsells \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: token user="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"' \
  -d '{
        "order": {
          "location_id": 1,
          "conveyance": {
            "fulfillment_type": "pickup"
          },
          "items": [
            {
              "item": {
                "id": 109,
                "quantity": 1,
                "option_ids": [28745]
              }
            }
          ],
          "special_instructions": "Buzzer is broken. Call 867-5309.",
          "tip_amount": 200
        }
    }'

Request Parameters

This endpoint accepts all of the same request parameters as the Start an Order Ahead Order endpoint.

Example Response

When there are no items eligible to be upsold

HTTP 204 No Content

When there are items eligible to be upsold

HTTP 200 OK

{
  "upsell": {
    "id": 39,
    "prompt": "Would you like a drink with your meal?",
    "show_prices": true,
    "items": [
      {
        "item": {
          "id": 131
        }
      },
      {
        "item": {
          "id": 130
        }
      },
      {
        "item": {
          "id": 126
        }
      }
    ]
  }
}

Response Parameters

Name Type Description
upsell[id] Integer The unique ID of this upsell.
upsell[prompt] String Prompt to be displayed to the user along with the selection of upsold items.
upsell[show_prices] Boolean Whether the price of each upsold item should be displayed to the user.
item[id] Integer ID of a menu item to be upsold.