Skip to main content

WaitWell APIs for Embedding Estimated Wait Times & Number of Visitors in Queues into Websites

A guide on how to embed queue data into websites via an HTML API call.

Written by Scott Pfeifer

Overview

Display real-time queue information directly on your website—such as estimated wait times, number of people waiting, or whether a queue is full—using a simple API call. You can embed this information using HTML or an iframe, with options to customize the text, styling, and output format.

API URLs

The following API URL will call for the estimated wait time for a queue:

<top level domain>/<location id>/info/waittime/<queue id>?tpl=The%20current%20Wait%20is%20{{minutes}}%20minutes&style=body%20{color:red;font-size:20px;background-color:%23eee}

The following API URL will call for the number of visitors in a queue.

<top level domain>/<location id>/info/waittime/<queue id>?tpl=There%20are%20currently%20{{numberwaiting}}%20people%20waiting&style=body%20{color:red;font-size:20px;background-color:%23eee}

These templates will be the reference for the remainder of this document.

Mandatory Configuration

There are three portions of this URL template that require custom information (denoted between < >):

1. Top Level Domain

2. Location ID

The location ID is a number that points the URL to the correct location. In WaitWell, navigate to the appropriate location, then to the following page, and replace <location id> with the number below:

3. Queue ID

The queue ID is a number that points the URL to the correct queue. In WaitWell, navigate to the appropriate location, then to the following page, and replace <queue id> with the number below:

Optional Configuration

Available Keywords

The following keywords can be used in your template to display different queue information:

  • {{minutes}} – The estimated wait time in minutes

  • {{numberwaiting}} – The number of visitors currently waiting in the queue

  • {{queuecapacity}} – The Queue Maximum Size (returns a number, or null if no maximum is set)

  • {{queuefull}} – Whether the queue has reached its maximum capacity (returns 1 if full, 0 if not full)

Customize Text

The portion of the template that reads:

The%20current%20Wait%20is%20{{minutes}}%20minutes 

outputs “The current wait is {{minutes}} minutes”, where {{minutes}} represents the estimated wait time, and %20 represents a blank space.

You can add, remove, or change any of these words if you wish.

Customize Text Style

The portion of the template that reads:

style=body%20{color:red;font-size:20px;background-color:%23eee}

is CSS that outputs the text in red text, font size 20px, light grey background.

You can adjust any of these parameters if you wish.

URL Encoding

The parameters for the tpl (template) and style need to be URL-encoded. You can use an online encoder like this one if needed.

Example – Template text:

This is the queue capacity {{queuecapacity}} which becomes the following after using an encoder:

This%20is%20the%20queue%20capacity%20

Example – Style:

Body {color:red;font-size:20px;background-color:#eee} becomes this after encoding:

body%20%7Bcolor%3Ared%3Bfont-size%3A20px%3Bbackground-color%3A%23eee%7D

JSON Format Output

If you want to receive the data in JSON format (useful for programmatic access or custom formatting on your web page), you can add the format query parameter:

<top level domain>/<location id>/info/waittime/<queue id>?format=json

Note: URL encoding is not necessary when using ?format=json.

This returns all supported values in JSON format, making it easier to parse and display the data however you want, or to act programmatically on those values.

Example response:

{"minutes": 15, "numberwaiting": 8, "queuecapacity": 50, "queuefull": 0}

iframe

The URL may optionally be inserted into an iframe for further customization. Below is a template for a suitably configured iframe.

<iframe style="height:40px;width:300px;" src="https://api.waitwell.ca/<location_id>/info/waittime/<queue_id>?tpl=The%20Wait%20is%20{{minutes}}%20Minutes&style=body%20{color:red;font-size:20px;background-color:%23eee}"></iframe>

Did this answer your question?