Autobooking

Add AutoBooking

This API endpoint is for Auto Booking which can be used for a variety of uses, including appointment reminders, restaurant bookings etc.

Definition

https:// www.voodoosms.com/vapi/server/addAutoBook

Methods

GET

Required Parameters

uid: System allocated username for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
abid: auto booking id.
dest: Format: 447700900000 (where 44 is country code e.g. 44 is UK). Multiple destinations can be separated with commas e.g. 447700900000,447700777888. When numbers presented are not in the correct country code format, use the ‘cc’ parameter to correct the country code formatting.
booking_date: Booking Date.
format: Return format requested: XML, JSON or PHP data.

Auto Booking without any query parameter

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
    case "GET":
        $uid = htmlspecialchars($_GET["uid"]);
        $pass = htmlspecialchars($_GET["pass"]);
        $dest = htmlspecialchars($_GET["dest"]);
        $abid = htmlspecialchars($_GET["abid"]);
        $booking_date = htmlspecialchars($_GET["booking_date"]);
        $format = htmlspecialchars($_GET["format"]);
        break;
    case "POST":
        $uid = htmlspecialchars($_POST["uid"]);
        $pass = htmlspecialchars($_POST["pass"]);
        $dest = htmlspecialchars($_POST["dest"]);
        $abid = htmlspecialchars($_POST["abid"]);
        $booking_date = htmlspecialchars($_POST["booking_date"]);
        $format = htmlspecialchars($_POST["format"]);
        break;
}
$url = 'https://www.voodoosms.com/vapi/server/addAutoBook?uid='.$uid.'&pass='.$pass.'&dest='.$dest.'&abid='
    .$abid."&booking_date=".$booking_date."&format=".$format;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output."   ".curl_error($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>
   <status>200</status>
   <resultText>Auto Booking SMS successfully added</resultText>
</xml>

Update Auto Booking

Here you can update the Auto Booking options that you have previously created.

Definition

https:// www.voodoosms.com/vapi/server/autoBookUpdate

Methods

GET

Required Parameters

uid: System allocated username for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
abid: auto booking id.
dest: Format: 447700900000 (where 44 is country code e.g. 44 is UK). Multiple destinations can be separated with commas e.g. 447700900000,447700777888. When numbers presented are not in the correct country code format, use the ‘cc’ parameter to correct the country code formatting.
booking_date: Booking Date.
booking_ref: Booking Refrence.
format: Return format requested: XML, JSON or PHP data.

Auto Booking without any query parameter

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
    case "GET":
        $uid = htmlspecialchars($_GET["uid"]);
        $pass = htmlspecialchars($_GET["pass"]);
        $abid = htmlspecialchars($_GET["abid"]);
        $dest = htmlspecialchars($_GET["dest"]);
        $booking_date = htmlspecialchars($_GET["booking_date"]);
        $booking_ref = htmlspecialchars($_GET["booking_ref"]);
        $format = htmlspecialchars($_GET["format"]);
        break;
    case "POST":
        $uid = htmlspecialchars($_POST["uid"]);
        $pass = htmlspecialchars($_POST["pass"]);
        $abid = htmlspecialchars($_POST["abid"]);
        $dest = htmlspecialchars($_POST["dest"]);
        $booking_date = htmlspecialchars($_POST["booking_date"]);
        $booking_ref = htmlspecialchars($_GET["booking_ref"]);
        $format = htmlspecialchars($_POST["format"]);
        break;
}
$url = 'https://www.voodoosms.com/vapi/server/autoBookUpdate?uid='.$uid.'&pass='.$pass.'&abid='.$abid.
    '&dest='.$dest."&booking_date=".$booking_date."&booking_ref=".$booking_ref."&format=".$format;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output."   ".curl_error($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>
   <status>200</status>
   <resultText>Booking has been updated</resultText>
</xml>

Cancel AutoBooking

With this API endpoint you can delete the bookings you have created.

Definition

https:// www.voodoosms.com/vapi/server/cancelAutoBook

Methods

GET

Required Parameters

uid: System allocated username for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
pass: System password for API user configured within the VoodooSMS.com Portal in Send SMS>API SMS>HTTP API.
abid: auto booking id.

Cancel AutoBooking without any query parameter

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
    case "GET":
        $uid = htmlspecialchars($_GET["uid"]);
        $pass = htmlspecialchars($_GET["pass"]);
        $abid = htmlspecialchars($_GET["abid"]);
        break;
    case "POST":
        $uid = htmlspecialchars($_POST["uid"]);
        $pass = htmlspecialchars($_POST["pass"]);
        $abid = htmlspecialchars($_POST["abid"]);
        break;
}
$url = 'https://www.voodoosms.com/vapi/server/cancelAutoBook?uid='.$uid.'&pass='.$pass.'&abid='.$abid
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output."   ".curl_error($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>
   <status>200</status>
   <resultText>Contacts removed successfully and (xx credit) return to your account.</resultText>
</xml>