The Paydro API

Making a request

All request start with The path is prefixed with the event ID.

For proper security connect over SSL.

Make sure you add .json at the end of the URL, to receive the response in JSON format.

Exploring the API

We've tried to make the API as simple as possible to explore. Just click through the admin in your browser. Add .json at the end of the URL and you'll get the API results.

Request example

$url = "[event-id]/orders.json";
$username = "";
$password = "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
//curl_setopt($ch, CURLOPT_HEADER, 1); // show headers in response (causes the json_decode to fail)
curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);

// for updating and adding
// data must be posted in form post format
//curl_setopt($ch, CURLOPT_POST, 1);
//$q = http_build_query($data, '', '&');
//curl_setopt($this->ch, CURLOPT_POSTFIELDS, $q);
$plain_result = curl_exec($ch);
$request_info = curl_getinfo($ch);
echo "<pre>";
$r = json_decode($plain_result, true);