All request start with https://admin.paydro.com/9999999999/. 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.
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.
<?php $url = "https://admin.paydro.com/[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); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // 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>"; print_r($request_info); print_r($plain_result); $r = json_decode($plain_result, true); print_r($r);