Sign in to see your venue's slug and publishable key in every sample.
Your account has no venue yet, so the samples keep their placeholders. Sign out
Signed in as · . Create a publishable key in the console and reload to see it here. Sign out
Signed in as · . The samples show your venue's publishable key. Sign out
Developer docs
REST API quickstart
Make your first booking with three HTTP calls — read the venue, find a free slot, reserve it — from a terminal or any language, with a secret key.
You will book a table with plain HTTP: three calls, a secret key and nothing to install. You need curl, a secret API key and a venue slug (demo-sportsbar works for reading).
1. Get a secret key
In the console open Venue → API keys and create a key of type Secret; it is shown once. Keep it in an environment variable, not in a file you commit:
export BOOKDINEPLAY_KEY="<your secret key>"A secret key goes in the X-BookDinePlay-Key header (or as Authorization: Bearer), never in a query string. It is for servers and terminals: a request that carries a secret key and a browser Origin header is refused. Code that runs in a browser uses a publishable key instead (JavaScript quickstart).
2. Read the venue
This proves the key works and returns the venue's time zone, resource types and booking lengths:
curl
curl "https://api.bookdineplay.com/api/venues/your-venue" \
-H "X-BookDinePlay-Key: $BOOKDINEPLAY_KEY"JavaScript
const venue = await (await fetch('https://api.bookdineplay.com/api/venues/your-venue', {
headers: { 'X-BookDinePlay-Key': process.env.BOOKDINEPLAY_KEY }
})).json();
console.log(venue.name, venue.timezone);C#
var venue = await client.GetVenueAsync("your-venue", cancellationToken);
Console.WriteLine($"{venue?.Name} {venue?.Timezone}");PHP
<?php
$response = wp_remote_get( 'https://api.bookdineplay.com/api/venues/your-venue', [ 'headers' => [ 'X-BookDinePlay-Key' => BOOKDINEPLAY_SECRET_KEY ] ] );
$venue = json_decode( wp_remote_retrieve_body( $response ), true );
echo $venue['name'] . ' ' . $venue['timezone'];3. Find a free slot
Ask for a date (venue-local, yyyy-MM-dd), a party size and a resource type. The answer lists the slots with start, end, the resourceId and whether each is available:
curl
DAY=$(date -d tomorrow +%F 2>/dev/null || date -v+1d +%F)
curl "https://api.bookdineplay.com/api/venues/your-venue/availability?date=$DAY&partySize=4&resourceType=RestaurantTable" \
-H "X-BookDinePlay-Key: $BOOKDINEPLAY_KEY"JavaScript
const day = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString().slice(0, 10);
const query = new URLSearchParams({ date: day, partySize: '4', resourceType: 'RestaurantTable' });
const availability = await (await fetch(`https://api.bookdineplay.com/api/venues/your-venue/availability?${query}`, {
headers: { 'X-BookDinePlay-Key': process.env.BOOKDINEPLAY_KEY }
})).json();
const slot = availability.slots.find((s) => s.available);C#
var availability = await client.GetAvailabilityAsync(
"your-venue", DateOnly.FromDateTime(DateTime.Today).AddDays(1), partySize: 4,
BookableResourceType.RestaurantTable, cancellationToken: cancellationToken);
var slot = availability?.Slots.FirstOrDefault(s => s.Available);PHP
<?php
$day = gmdate( 'Y-m-d', time() + DAY_IN_SECONDS );
$response = wp_remote_get( 'https://api.bookdineplay.com/api/venues/your-venue/availability?date=' . $day . '&partySize=4&resourceType=RestaurantTable', [
'headers' => [ 'X-BookDinePlay-Key' => BOOKDINEPLAY_SECRET_KEY ],
] );
$availability = json_decode( wp_remote_retrieve_body( $response ), true );An empty slots list with a notice means the venue is closed that day; try another date. Take the start and resourceId of one available slot for the next call.
4. Book it
Send the slot back with the guest's details. The Idempotency-Key header makes a retry safe: repeat the same request with the same key after a timeout and you get the original reservation, never a second one.
curl
curl -X POST "https://api.bookdineplay.com/api/venues/your-venue/reservations" \
-H "X-BookDinePlay-Key: $BOOKDINEPLAY_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"resourceType": "RestaurantTable",
"resourceId": "table-4a",
"date": "2026-12-01",
"start": "19:00",
"partySize": 4,
"customerName": "Jana Berger",
"email": "jana@example.com"
}'JavaScript
const response = await fetch('https://api.bookdineplay.com/api/venues/your-venue/reservations', {
method: 'POST',
headers: {
'X-BookDinePlay-Key': process.env.BOOKDINEPLAY_KEY,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json'
},
body: JSON.stringify({
resourceType: 'RestaurantTable', resourceId: slot.resourceId, date: availability.date,
start: slot.start, partySize: 4, customerName: 'Jana Berger', email: 'jana@example.com'
})
});
const reservation = await response.json();
console.log(response.status, reservation.reference, reservation.status);C#
var reservation = await client.CreateReservationAsync("your-venue", new CreateReservationRequest
{
ResourceType = BookableResourceType.RestaurantTable,
ResourceId = slot!.ResourceId,
Date = availability!.Date,
Start = slot.Start,
PartySize = 4,
CustomerName = "Jana Berger",
Email = "jana@example.com"
}, Guid.NewGuid().ToString(), cancellationToken);
Console.WriteLine($"{reservation.Reference} {reservation.Status}");PHP
<?php
$response = wp_remote_post( 'https://api.bookdineplay.com/api/venues/your-venue/reservations', [
'headers' => [
'X-BookDinePlay-Key' => BOOKDINEPLAY_SECRET_KEY,
'Idempotency-Key' => wp_generate_uuid4(),
'Content-Type' => 'application/json',
],
'body' => wp_json_encode( [
'resourceType' => 'RestaurantTable', 'resourceId' => $slot['resourceId'], 'date' => $availability['date'],
'start' => $slot['start'], 'partySize' => 4, 'customerName' => 'Jana Berger', 'email' => 'jana@example.com',
] ),
] );
$reservation = json_decode( wp_remote_retrieve_body( $response ), true );
echo $reservation['reference'] . ' ' . $reservation['status'];The answer is 201 Created with a reference (BDP-…), a status of Confirmed — or Pending with depositRequired: true when the venue wants a deposit (Deposits) — and a cancelToken. The cURL example uses a literal resourceId and date for readability: use the values from step 3, or omit resourceId to let the API pick the first free resource of the type.
5. Look the booking up, then cancel it
With the cancelToken from the answer, the guest's own summary and cancel routes need no key at all:
curl
curl "https://api.bookdineplay.com/api/reservations/$CANCEL_TOKEN"JavaScript
const booking = await (await fetch(`https://api.bookdineplay.com/api/reservations/${reservation.cancelToken}`)).json(); // sends no key
console.log(booking.status, booking.canCancel);C#
var booking = await client.GetReservationAsync(reservation.CancelToken!, cancellationToken); // sends no key
Console.WriteLine($"{booking?.Status} {booking?.CanCancel}");PHP
<?php
$response = wp_remote_get( 'https://api.bookdineplay.com/api/reservations/' . rawurlencode( $reservation['cancelToken'] ) ); // sends no key
$booking = json_decode( wp_remote_retrieve_body( $response ), true );curl
curl -X POST "https://api.bookdineplay.com/api/reservations/$CANCEL_TOKEN/cancel"JavaScript
await fetch(`https://api.bookdineplay.com/api/reservations/${reservation.cancelToken}/cancel`, { method: 'POST' }); // sends no keyC#
var cancelled = await client.CancelReservationAsync(reservation.CancelToken!, cancellationToken); // sends no keyPHP
<?php
wp_remote_post( 'https://api.bookdineplay.com/api/reservations/' . rawurlencode( $reservation['cancelToken'] ) . '/cancel' ); // sends no keyIf it does not work
401 invalid-api-key. The header is missing, the key is mistyped or it was revoked.403 secret-key-from-browser. The request carried anOriginheader together with a secret key. Send secret keys from servers only.400. A field failed validation; the problem body'serrorsnames it. Dates areyyyy-MM-dd, timesHH:mm.409. The slot was taken after you looked. Ask for availability again.
Errors lists every problem type and what to do about it.
Next steps
- Availability and Reservations — every field, header and refusal of the calls above.
- Authentication — key types, origins and rotating a key.
- Rate limits and Versioning — what to expect from the API over time.