The BOOKINGS endpoint returns a multi dimensional array of booking data.


POST Variables

  • 'key' = [string] Client Key
  • 'secret' = [string] Secret Key
  • 'start' = [string] Start Date in ISO format e.g. YYYY-MM-DD
  • 'end' = [string] End Date in ISO format e.g. YYYY-MM-DD
  • 'scope' = [string] "minimal" or "full". Determines the complexity of the array output. The default is minimal.
  • 'booking_id' [integer] Pinpoint a specific booking ID to return the array data for a single booking.



Example PHP CURL Request

$url = 'YOUR URL';
$key = 'YOUR CLIENT KEY';
$secret = 'YOUR CLIENT SECRET';
$endpoint = '/api/v1/bookings';

$ch = curl_init();
$curlConfig = array(
  CURLOPT_URL => $url . $endpoint,
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POSTFIELDS => array(
    'key' => $key,
    'secret' => $secret,
  )
);
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
$result = json_decode($result);
curl_close($ch);

if (isset($result->result) && $result->result != 'Success') {
  $error_message = $result->message;
} else {
  var_dump($result);
} 



Example JSON Response

{
  "result": "Success",
  "message": "Showing a total of 1 bookings",
  "bookings": {
    "185": {
      "status": "Unconfirmed",
      "email": "alexander@example.com",
      "phone": "01548 705 505",
      "staff": {
        "273": "Jason",
        "277": "Adam",
        "305": "Jacob",
        "written": "Jacob, Adam & Jason"
      },
      "packages": "Weekend Rate (Photobooth)",
      "extras": "Fully Enclosed Mobile Booth",
      "event": {
        "event_name": "Alexander and Karens Wedding",
        "event_time_start": "68400",
        "event_time_end": "79200",
        "event_time_start_formatted": "7:00pm",
        "event_time_end_formatted": "10:00pm",
        "event_date_uk": "Sunday 21st Oct 2018",
        "event_date_us": "Sunday Oct 21st 2018",
        "event_date_iso": "2018-10-21"
      },
      "venue": {
        "venue_name": "The Deer Park Hotel",
        "venue_address": "Honiton, Devon",
        "venue_postcode": "EX15 YDP",
      },
      "notes": {
        "notes_admin": "None",
        "notes_customer": "None"
      }
    }
}