API Integration Guide
Integrate BuzzMyTable notifications into your POS/KDS system
Step 1a: Create Order & Get QR Code URL
When a customer places an order, call our API to create an order record and receive a URL for QR code generation.
Endpoint:
POST https://api.buzzmytable.com/webhook/order/create
Python
TypeScript
Java
C#
PHP
cURL
import requests
url = "https://api.buzzmytable.com/webhook/order/create"
headers = {
"Content-Type": "application/json",
"x-api-key": "your-api-key-here"
}
data = {
"posOrderId": "ORDER-123",
"brandId": "your-brand-id",
"venueId": "your-venue-id" # Optional
}
response = requests.post(url, json=data, headers=headers)
result = response.json()
# Generate QR code URL
qr_url = f"https://buzzmytable.com/g/{result['orderId']}"
print(f"QR Code URL: {qr_url}")
interface OrderRequest {
posOrderId: string;
brandId: string;
venueId?: string;
}
interface OrderResponse {
orderId: string;
posOrderId: string;
}
async function createOrder(orderData: OrderRequest): Promise<string> {
const response = await fetch('https://api.buzzmytable.com/webhook/order/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key-here'
},
body: JSON.stringify(orderData)
});
const result: OrderResponse = await response.json();
const qrUrl = `https://buzzmytable.com/g/${result.orderId}`;
return qrUrl;
}
// Usage
const qrUrl = await createOrder({
posOrderId: 'ORDER-123',
brandId: 'your-brand-id',
venueId: 'your-venue-id'
});
HttpClient client = HttpClient.newHttpClient();
String json = """
{"posOrderId":"ORDER-123","brandId":"your-brand-id","venueId":"your-venue-id"}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.buzzmytable.com/webhook/order/create"))
.header("Content-Type", "application/json")
.header("x-api-key", "your-api-key-here")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
// Parse orderId from response and build QR URL
// String qrUrl = "https://buzzmytable.com/g/" + orderId;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "your-api-key-here");
var payload = new { posOrderId = "ORDER-123", brandId = "your-brand-id", venueId = "your-venue-id" };
var response = await client.PostAsJsonAsync("https://api.buzzmytable.com/webhook/order/create", payload);
var result = await response.Content.ReadFromJsonAsync<JsonObject>();
var qrUrl = $"https://buzzmytable.com/g/{result["orderId"]}";
Console.WriteLine($"QR Code URL: {qrUrl}");
$ch = curl_init('https://api.buzzmytable.com/webhook/order/create');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'x-api-key: your-api-key-here'],
CURLOPT_POSTFIELDS => json_encode([
'posOrderId' => 'ORDER-123',
'brandId' => 'your-brand-id',
'venueId' => 'your-venue-id',
]),
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
$qrUrl = "https://buzzmytable.com/g/{$result['orderId']}";
echo "QR Code URL: $qrUrl";
curl -X POST https://api.buzzmytable.com/webhook/order/create \
-H "Content-Type: application/json" \
-H "x-api-key: your-api-key-here" \
-d '{
"posOrderId": "ORDER-123",
"brandId": "your-brand-id",
"venueId": "your-venue-id"
}'
# Response:
# {
# "orderId": "uuid-generated-id",
# "posOrderId": "ORDER-123"
# }
# QR Code URL: https://buzzmytable.com/g/{orderId}
Step 1b: Create Order with Items
Optionally pass an items array to record what was ordered. Each item requires a name and quantity; price is optional.
Endpoint (same as 1a):
POST https://api.buzzmytable.com/webhook/order/create
Python
TypeScript
Java
C#
PHP
cURL
import requests
url = "https://api.buzzmytable.com/webhook/order/create"
headers = {
"Content-Type": "application/json",
"x-api-key": "your-api-key-here"
}
data = {
"posOrderId": "ORDER-123",
"brandId": "your-brand-id",
"venueId": "your-venue-id", # Optional
"items": [
{ "name": "Burger", "quantity": 2, "price": 9.99 },
{ "name": "Fries", "quantity": 2, "price": 3.49 },
{ "name": "Coke", "quantity": 1 }
]
}
response = requests.post(url, json=data, headers=headers)
result = response.json()
qr_url = f"https://buzzmytable.com/g/{result['orderId']}"
print(f"QR Code URL: {qr_url}")
interface OrderItem {
name: string;
quantity: number;
price?: number;
}
interface OrderRequest {
posOrderId: string;
brandId: string;
venueId?: string;
items?: OrderItem[];
}
const qrUrl = await createOrder({
posOrderId: 'ORDER-123',
brandId: 'your-brand-id',
venueId: 'your-venue-id',
items: [
{ name: 'Burger', quantity: 2, price: 9.99 },
{ name: 'Fries', quantity: 2, price: 3.49 },
{ name: 'Coke', quantity: 1 }
]
});
HttpClient client = HttpClient.newHttpClient();
String json = """
{
"posOrderId":"ORDER-123","brandId":"your-brand-id","venueId":"your-venue-id",
"items":[
{"name":"Burger","quantity":2,"price":9.99},
{"name":"Fries","quantity":2,"price":3.49},
{"name":"Coke","quantity":1}
]
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.buzzmytable.com/webhook/order/create"))
.header("Content-Type", "application/json")
.header("x-api-key", "your-api-key-here")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "your-api-key-here");
var payload = new {
posOrderId = "ORDER-123", brandId = "your-brand-id", venueId = "your-venue-id",
items = new[] {
new { name = "Burger", quantity = 2, price = 9.99 },
new { name = "Fries", quantity = 2, price = 3.49 },
new { name = "Coke", quantity = 1 }
}
};
var response = await client.PostAsJsonAsync("https://api.buzzmytable.com/webhook/order/create", payload);
var result = await response.Content.ReadFromJsonAsync<JsonObject>();
$ch = curl_init('https://api.buzzmytable.com/webhook/order/create');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'x-api-key: your-api-key-here'],
CURLOPT_POSTFIELDS => json_encode([
'posOrderId' => 'ORDER-123',
'brandId' => 'your-brand-id',
'venueId' => 'your-venue-id',
'items' => [
['name' => 'Burger', 'quantity' => 2, 'price' => 9.99],
['name' => 'Fries', 'quantity' => 2, 'price' => 3.49],
['name' => 'Coke', 'quantity' => 1],
],
]),
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
curl -X POST https://api.buzzmytable.com/webhook/order/create \
-H "Content-Type: application/json" \
-H "x-api-key: your-api-key-here" \
-d '{
"posOrderId": "ORDER-123",
"brandId": "your-brand-id",
"venueId": "your-venue-id",
"items": [
{ "name": "Burger", "quantity": 2, "price": 9.99 },
{ "name": "Fries", "quantity": 2, "price": 3.49 },
{ "name": "Coke", "quantity": 1 }
]
}'
# Response:
# {
# "orderId": "uuid-generated-id",
# "posOrderId": "ORDER-123"
# }
Step 2: Notify When Order is Ready
When the order is ready for pickup, call this endpoint to send push notifications to customers.
Endpoint:
POST https://api.buzzmytable.com/webhook/order/ready
Python
TypeScript
Java
C#
PHP
cURL
import requests
url = "https://api.buzzmytable.com/webhook/order/ready"
headers = {
"Content-Type": "application/json",
"x-api-key": "your-api-key-here"
}
data = {
"orderId": "uuid-from-step-1"
}
response = requests.post(url, json=data, headers=headers)
print("Notification sent!", response.json())
async function notifyOrderReady(orderId: string): Promise<void> {
const response = await fetch('https://api.buzzmytable.com/webhook/order/ready', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'your-api-key-here'
},
body: JSON.stringify({ orderId })
});
const result = await response.json();
console.log('Notification sent!', result);
}
// Usage
await notifyOrderReady('uuid-from-step-1');
HttpClient client = HttpClient.newHttpClient();
String json = "{\"orderId\":\"uuid-from-step-1\"}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.buzzmytable.com/webhook/order/ready"))
.header("Content-Type", "application/json")
.header("x-api-key", "your-api-key-here")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Notification sent! " + response.body());
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "your-api-key-here");
var payload = new { orderId = "uuid-from-step-1" };
var response = await client.PostAsJsonAsync("https://api.buzzmytable.com/webhook/order/ready", payload);
Console.WriteLine("Notification sent! " + await response.Content.ReadAsStringAsync());
$ch = curl_init('https://api.buzzmytable.com/webhook/order/ready');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'x-api-key: your-api-key-here'],
CURLOPT_POSTFIELDS => json_encode(['orderId' => 'uuid-from-step-1']),
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Notification sent!";
curl -X POST https://api.buzzmytable.com/webhook/order/ready \
-H "Content-Type: application/json" \
-H "x-api-key: your-api-key-here" \
-d '{
"orderId": "uuid-from-step-1"
}'
# Response:
# {
# "success": true
# }