Authenticated Waitlist API
This is an authenticated API, meaning that there is authentication required, because objects returned may expose sensitive data.
Authenticate
Create an access_token
and a refresh_token
. You can use the access_token
to call other routes in this authenticated API.
Required Attributes
- Name
email
- Type
- string
- Description
The email address for your getwaitlist account.
- Name
password
- Type
- string
- Description
The password for your getwaitlist account.
Response
- Name
access_token
- Type
- string
- Description
The access token.
- Name
refresh_token
- Type
- string
- Description
The refresh token.
Request
curl --request POST \
--url https://api.getwaitlist.com/api/v1/auth/create_tokens \
--header 'Content-Type: application/json' \
--data '{
"email": "example@example.com",
"password": "password1234"
}'
Response
{
"access_token": "qwertyuiop1234567890",
"refresh_token": "asdfghjkl098765321"
}
Refresh Access Token
Obtain a new access_token
using your refresh_token
.
Required Attributes
- Name
Authorization
- Type
- string
- Description
Example:
Bearer {my_refresh_token}
Response
- Name
access_token
- Type
- string
- Description
The access token.
- Name
refresh_token
- Type
- string
- Description
The refresh token.
Request
curl --request GET \
--url https://api.getwaitlist.com/api/v1/auth/refresh_access_token \
--header 'Authorization: ' \
--header 'Content-Type: application/json'
Response
{
"access_token": "qwertyuiop1234567890",
"refresh_token": "asdfghjkl098765321"
}
Get Waiter
Query all Waiters belonging to a particular waitlist that you own.
You can filter to just the set of Waiters referred by a particular Waiter. The way to do that is to use the referral_token
belonging to that Waiter for whom you want to see their referrals.
This is a paginated view that returns 100 Waiters at a time. If you need to retrieve more Waiters than that, you can use offset
to return the next page of Waiters. The query under the hood is always ordered, so pagination will return the set of all Waiters.
Required attributes
- Name
api_key
- Type
- string
- Description
The API key of your waitlist.
Optional Attributes
- Name
offset
- Type
- integer
- Description
Number of waiters to skip. Example:
10
.
- Name
referral_token
- Type
- string
- Description
Referral token of the Waiter whose referrals you would like to see listed. Example:
ABCD1234
- Name
questions_request
- Type
- boolean
- Description
Include this parameter as
questions_request=true
if you want the waiter's answers to your questions included.
- Name
referral_token
- Type
- boolean
- Description
Include this parameter as
referral_token=true
if you want to get all waiters with the same referral_token (i.e. all of them were referred by the same waiter). This is useful for keeping track of your most active referrers.
- Name
offboarded_request
- Type
- boolean
- Description
Include this parameter as
offboarded_request=true
if you want to get all waiters who have been offboarded.
Response
The response is an array of Waiter objects. If you set questions_request=true
, you will also get the following columns included: question_1
, question2
,
question_3
, answer_1
, answer_2
and answer_3
Request
curl --request GET \
--url https://api.getwaitlist.com/api/v1/waiter?api_key=<API_KEY> \
--header '{
Content-Type: application/json,
Authorization: Bearer qwertyuiop1234567890
}'
--data '{
"offset": "10",
"referral_token": "4F0BTBMAB"
}'
Response
[
{
"amount_referred": 0,
"created_at": "2022-04-10_18-34-28",
"email": "maya@getwaitlist.com",
"priority": 4985,
"referral_link": "https://www.getwaitlist.com?ref_id=4F0BTBMAB",
"referral_token": "4F0BTBMAB",
"referred_by_waiter_token": null,
"removed_date": null,
"removed_priority": null,
"total_waiters_currently": 4986,
"uuid": "c60ff9f2-1a58-4551-87ea-414991184fba",
"verified": false,
"waitlist_api_key": "0RN8X1",
"question_1": "Where did you hear about us?",
"answer_1": "Twitter",
"question_2": "Are you considering any alternatives?",
"answer_2": "No",
"question_3": "Can we add you to our newsletter?",
"answer_3": "Yes"
}
]
Offboard Waiter
Offboard a Waiter from your waitlist.
Required attributes
- Name
api_key
- Type
- string
- Description
The API key of your waitlist.
- Name
offboard_request
- Type
- boolean
- Description
Should be
true
- Name
waiters
- Type
- array of objects
- Description
An array of all the waiters you are intending to offboard. To successfully offboard, you only need the ID of the waiter.
- Name
id
- Type
- integer
- Description
The ID of the waiter that is being offboarded. If you need, you can use the Get Waiter API to successfully fetch the ID of the waiter. You can also send other attributes alongside ID, but this is the only required one.
Response
The response is an array of Waiter objects that were successfully offboarded. As noted in the response, removed_from_waitlist
will now be true
, removed_date
will include the date of removal from the waitlist and removed_priority
includes their priority at the time of offboarding.
Request
curl --request PATCH \
--url https://api.getwaitlist.com/api/v1/waiter \
--header '{
Content-Type: application/json,
Authorization: Bearer qwertyuiop1234567890
}'
--data '{
"api_key": "ABCDEF",
"waiters": [
{"id": 8}
]
}'
Response
[
{
"amount_referred": 0,
"created_at": "2023-03-15_02-21-19",
"email": "bani+8@getwaitlist.com",
"first_name": "",
"id": 8,
"last_name": "",
"metadata": null,
"phone": null,
"referral_bool": false,
"referral_link": "https://example.com?ref_id=X8LUIL0DD",
"referral_token": "X8LUIL0DD",
"referred_by_waiter_token": null,
"registered_email": "bani+8@getwaitlist.com",
"removed_date": "2023-03-15_04-40-39",
"removed_from_waitlist": true,
"removed_priority": 8,
"total_referrals": 0,
"user_id": "1396386fdc4045d4cbb1a754587e98c4",
"uuid": "4b78944e-46b1-4ec4-afde-5972d2f3e7de",
"verified": false,
"waitlist_api_key": "PREBX1",
"waitlist_id": 1
}
]