arrow-left

Only this pageAll pages
gitbookPowered by GitBook
1 of 15

API

Loading...

Loading...

Organisations & Venues

Loading...

Guests

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Marketing

Loading...

Going Live

Loading...

Authentication

For authenticating requests with Stampede, we utilise the OAuth 2.0 protocol, specifically using Bearer Tokens. Your integration must include these Bearer Tokens in the request headers to ensure secure and authorised access. This can look like this within your request headers:

hashtag
Generating a client_id & client_secret

You can generate a client_id & client_secret by heading to the > Marketplace > API Keys > Create New API Key.

From there, you'll be able to create a new client_id then in return will provide you with a client_secret. Keep it safe so it saves the hassle...

hashtag
Generating a Bearer Token (also known as app-only)

hashtag
Generate a Bearer Token

POST ~/oauth/token

hashtag
Request Body

Name
Type
Description

hashtag
Examples

authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

String

client_credentials

client_id*

String

client_secret*

String

Stampede dashboardarrow-up-right
{
  "access_token": string,
  "expires_in": number,
  "token_type": "Bearer",
  "scope": "ALL:ALL"
}
{
    "error": string,
    "error_description": string
}

grant_type*

curl --location 'https://global.stampede.ai/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
    "client_id": "ai.stampede.marketplace.example",
    "client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "grant_type": "client_credentials"
}'
const axios = require('axios');
let data = JSON.stringify({
  "client_id": "ai.stampede.marketplace.example",
  "client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "grant_type": "client_credentials"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://global.stampede.ai/oauth/token',
  headers: { 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json'
];
$body = '{
  "client_id": "ai.stampede.marketplace.example",
  "client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "grant_type": "client_credentials"
}';
$request = new Request('POST', 'https://global.stampede.ai/oauth/token', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
import http.client
import json

conn = http.client.HTTPSConnection("global.stampede.ai")
payload = json.dumps({
  "client_id": "ai.stampede.marketplace.example",
  "client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "grant_type": "client_credentials"
})
headers = {
  'Content-Type': 'application/json'
}
conn.request("POST", "/oauth/token", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Venues

When generating a new this will then be associated to an organisation ID, of which can contain venues (serials).

circle-exclamation

When generating API keys, ensure that you've registered these within the correct organisation for the work you're looking to do.

hashtag

Get a list of venues

GET /v1/venues

This will return you a list of venues that are available within the organisation.

hashtag
Query Parameters

Name
Type
Description

cursor

String

limit

{
  "data": [
    {
client_id

Tags

Tags are where you'll have the ability to tag customers with a certain condition, for example, "Golf Member" then within Stampede, you'll be able to create a segment that searches for customers with this tag/multiple tags.

hashtag
Fetch the current tags of a guest

GET /v1/guests/:guest_id/tags

hashtag
Query Parameters

Name
Type
Description

hashtag
Add a new/existing tag to a guest

PUT /v1/guests/:guest_id/tags

hashtag
Request Body

Name
Type
Description

"id": string,
"name": string | null,
"organization_id": string,
"branding_settings": {
"headerImage": string,
"headerColor": string,
"interfaceColor": string,
"background": string,
"backgroundImage": string | null
}
}
],
"links": {
"first": string | null,
"last": string | null,
"next": string | null,
"prev": string | null
}
}

guest_id

String

name*

String

Form

Create form submissions on behalf of a guest

hashtag
Create a Form Submission

POST v1/guests/:guest_id/form

hashtag
Request Body

Name
Type
Description

hashtag
Validation Rules

  • venue_id: Required. Must be exactly 12 alphanumeric characters (a-z, A-Z, 0-9)

  • form_id: Optional. Can be any string value

  • source: Must be either "web" or "in-venue-form". Defaults to "web" if not provided

hashtag
Notes

  • The organisation_id is automatically added from your authentication context

  • The guest_id is taken from the URL parameter

  • If form_id is not provided, it defaults to null

hashtag
Response

Returns the created form data object.

hashtag
Error Response (422: Unprocessable Entity)

WiFi

WiFi is where you'll be able to view who owns a certain device using the MAC address or create a WiFi session for a customer.

hashtag
Check if device belongs to guest

GET /v1/guests/wifi

Going Live

Once you've completed your app, you'll be eligible to enter the Stampede Marketplace (Where you generated your API keys from). To enter the Marketplace, please fill in the form below from where a member of the team will review the request and enter you into the Marketplace.

If you have any questions, please contact [email protected] and we'll be able to help.

Stampede Marketplace Form arrow-up-right

String

A unique ID of your choice to identify the form the user has filled in. Optional.

venue_id*

String

The venue ID that the form is applicable for. Must be exactly 12 alphanumeric characters.

source

String

Source of the form submission. Must be either "web" or "in-venue-form". Defaults to "web"

form_id

{
  message: string;
  errors: {
    code: string;
    expected?: string;
    received?: string;
    path: string[];
  }[];
}
hashtag
Query Parameters
Name
Type
Description

mac*

String

Mac address of device

{
     "id": string,
     

hashtag
Create WiFi session

POST /v1/guests/:guest_id/wifi

hashtag
Request Body

Name
Type
Description

user_agent*

String

User agent of device

mac*

String

MAC address of device

Order

Ordering is where you'll be able to create an ordering interaction with a certain customer or view orders from a certain customer. This is great for apps that offer an in-venue ordering system and you'll be able to send this data to Stampede including the transactional data.

hashtag
Get guest orders

GET v1/guests/:guest_id/order

hashtag
Query Parameters

Name
Type
Description

hashtag
Create an order

POST v1/guests/:guest_id/order

hashtag
Request Body

Name
Type
Description

Booking

Booking is where you'll be able to create a booking interaction with a certain customer. This is great for applications that offer booking systems to hospitality venues.

hashtag
Create a Booking

POST v1/guests/:guest_id/booking

hashtag
Request Body

Name
Type
Description

hashtag
Updating the Data of a Booking

As bookings over time change for example a party size increases or the status of the booking is updated, you will be able to use the event_id of your booking and resend the POST request with the updated data.

"
email
"
:
string
,
"first": string,
"last": string
}

venue_id*

String

event_id

String

String

String[]

event_id

String

in_venue

Boolean

limit

Number

cursor

String

amount*

Number

Transaction amount in currencies lowest common denominator

currency

ISO 4217

search

venue_ids

String

The venue ID that the booking is applicable for. You obtain this from /venues path, attribute: id

event_id*

String

The identifier of the booking, usually the ID of your booking within your application.

status*

'active' | 'arrived' | 'partially_seated' | 'seated' | 'appetizer' | 'entree' | 'dessert' | 'cleared' | 'check_dropped' | 'paid' | 'complete' | 'cancelled' | 'no_show'

party_size*

Number

The number of covers for the booking.

metadata

Object

Optional key-value object containing any other information that is related to the booking. For example, this could contain booking notes of the customer or any allergens.

starts_at*

ISO 8601

Start date and time of the booking

ends_at*

ISO 8601

End date and time of the booking

created_at

String

updated_at

String

type

String

The type of booking for example "Drinks Room" or "Food Only".

amount

Number

Transaction amount in currencies lowest common denominator

currency

ISO 4217

venue_id*

Guests

Guests are where all of the data lives. With these requests, you're able to search for guests and create new guests within Stampede. This is great if your app collects data and you would like to send it to Stampede.

hashtag
Fetch/search guests

GET /v1/guests

hashtag
Query Parameters
Name
Type
Description

search

String

limit

Date

{
    data: {
        id:

hashtag
Fetch a single guest with it's ID

GET /v1/guests/:guest_id

hashtag
Query Parameters

Name
Type
Description

guest_id*

String

The ID of the guest

hashtag
Create a new guest

POST /v1/guests

hashtag
Request Body

Name
Type
Description

email*

String

The guest email address. It must be a valid email format.

first

String

The first name of the guest

{
    id: string;
    organization_id: string;
    profile_id: number;
    last_interacted_at: string;
    created_at: string;
    data_opt_in_at: string | null;
    sms_opt_in_at: string | null;
    email_opt_in_at: string;
    user_profile: {
        email: string;
        id: number;
        verified: number;
        first: string | null;
        last: string | null;
        phone: string | null;
        lat: number | null;
        lng: number | null;
        birth_day: number | null;
        birth_month: number | null;
        postcode: string | null;
        country: string | null;
        gender: string | null;
    };
    organization_registration_personalisation_choice: any[];
    custom_question_answers: any[];
}
{
  id: string;
  organization_id: string;
  profile_id: number;
  last_interacted_at: string;
  created_at: string;
  data_opt_in_at: string;
  sms_opt_in_at: string;
  email_opt_in_at: string;
  user_profile: {
    first: string | null;
    last: string | null;
    email: string;
    id: number;
  };
};
{
  stack: string;
  code: number;
  message: string[];
  url: string;
  method: string;
}
{
  stack: string;
  code: number;
  message: string;
  url: string;
  method: string;
}
string
;
organization_id: string;
profile_id: number;
last_interacted_at: string;
created_at: string;
data_opt_in_at: string;
sms_opt_in_at: string;
email_opt_in_at: string;
user_profile: {
email: string;
first: string;
id: number;
phone: string;
last: string;
};
organization_profile_tags: {
id: string;
organization_registration_id: string;
tag_id: string;
}[];
}[];
links: {
first: string | null;
last: string | null;
next: string | null;
prev: string | null;
};
}

cursor

String

last

String

The last name of the guest

privacy.data*

Boolean

Is the user opted into giving out there data

privacy.marketing.email*

Boolean

Is the user opted in to email marketing

privacy.marketing.sms*

string

Is the user opted in to sms marketing

gender

"m" | "f" | "o"

The gender of a guest

phone

E.164

The phone number of the guest

Deal Codes

Deal codes allow Stampede users to uniquely send a code for each marketing email that gets sent out from Stampede. Customers can send a birthday campaign from Stampede which includes a 10%_OFF deal within this deal, a code will be sent within each email to prevent customers from using the same code multiple times. An example of how the deal structure works below:

hashtag
Get a paginated response of all deals

GET /v1/deal

hashtag
Create a new deal

POST /v1/deal

hashtag
Request Body

Name
Type
Description

hashtag
Search for a code

GET /v1/code/search

hashtag
Query Parameters

Name
Type
Description

hashtag
Revoke a code

POST /v1/code/revoke

hashtag
Query Parameters

Name
Type
Description
10%_OFF:
    ABC1
    ABC2
    ABC3

BOGOF:
    DEF1
    DEF2
    DEF3
    
2FOR1: 
    GHI1
    GHI2
    GHI3

ISO 8601

The expiry date of the voucher

active

Boolean

If the voucher is active or inactive

description

String

The description of the voucher

days_code_valid_for

Number

How long is this code valid for from date of issue

cash_value_currency

ISO 4217

The currency code of the cash value (for example, GBP)

name*

String

The name of the voucher

cash_value_amount

Number

Cash value amount in pennies

code*

String

The code you're looking to search

code

String

The voucher code you're looking to revoke

{
    data: {
        id: string;
        active: boolean;
        name: string;
        description: string | null;
        expires_at: string | null;
        created_at: string;
        updated_at: string;
        cash_value_amount: number | null;
        cash_value_currency: string | null;
        days_code_valid_for: number | null;
        voucher_codes_count: number;
    }[];
    links: {
        first: string;
        last: string;
        prev: string | null;
        next: string | null;
    };
    meta: {
        current_page: number;
        from: number;
        last_page: number;
        links: {
            url: string | null;
            label: string;
            active: boolean;
        }[];
        path: string;
        per_page: number;
        to: number;
        total: number;
    };
}

expires_at

{
    message: string;
    voucher: {
        id: string;
        active: boolean;
        name: string | null;
        description: string;
        expires_at: string | null;
        created_at: string;
        updated_at: string;
        cash_value_amount: number | null;
        cash_value_currency: string | null;
        days_code_valid_for: number | null;
        voucher_codes_count: number | null;
    };
}
{
    message: string;
    errors: {
        name: string[];
    };
}
{
    data: {
        id: string;
        voucher_id?: string;
        voucher?: {
            id: string;
            active: boolean;
            name: string;
            description: string;
            expires_at: string | null;
            created_at: string;
            updated_at: string;
            cash_value_amount: number | null;
            cash_value_currency: string | null;
            days_code_valid_for: number | null;
            voucher_codes_count: number;
        };
        code?: string;
        sent_to_profile_id?: number;
        redeemed_by_profile_id?: number | null;
        redeemed_by_user_id?: number | null;
        redeemed_at?: string | null;
        is_redeemed?: boolean;
        revoked_at?: string | null;
        is_revoked?: boolean;
        is_revokable?: boolean;
        expires_at?: string | null;
        created_at?: string;
        updated_at?: string;
        sent_to_profile_data?: any;
    }[];
    links: {
        first: string;
        last: string;
        prev: string | null;
        next: string | null;
    };
    meta: {
        current_page: number;
        from: number | null;
        last_page: number;
        links: {
            url: string | null;
            label: string;
            active: boolean;
        }[];
        path: string;
        per_page: number;
        to: number | null;
        total: number;
    };
}
{
    message: string;
    errors: {
        name: string[];
    };
}
{
    message: string;
    voucher_code: {
        id: string;
        voucher_id: string;
        code: string;
        sent_to_profile_id: string | null;
        redeemed_by_profile_id: string | null;
        redeemed_by_user_id: string | null;
        redeemed_at: string | null;
        is_redeemed: boolean;
        revoked_at: string;
        is_revoked: boolean;
        is_revokable: boolean;
        expires_at: string | null;
        created_at: string;
        updated_at: string;
    };
}
{
    message: string;
    errors: {
        name: string[];
    };
}

Introduction

With Stampede's API, you'll have the opportunity to interact with Stampede's infrastructure like pushing customer data, creating an in-venue order or creating a WiFi interaction.

hashtag
Base URL's

Begin your integration by referencing the following base URL.

https://global.stampede.ai/

hashtag
Rate Limiting

To maintain the performance and integrity of our services, Stampede has implemented a rate-limiting policy. Users are allowed up to 100 requests every 15 minutes.