Migrated from Redmine #733 | Author: Viktor Lyuzkanov
Status: Resolved | Priority: Immediate, there is BUG! | Created: 2021-07-12
We try to get the information of a client booking via API call.
But the response shows for most fields null, except for name, email, phone number, booking reference id.
We are missing the important field for birth date !!!
API Call
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://user-api-v2.simplybook.me/admin/auth”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => “{\r\n "company": "wehntalapotheke",\r\n "login": "xxxxx@yahoo.com",\r\n "password": "xxxxxx"\r\n}”,
CURLOPT_HTTPHEADER => array(
“cache-control: no-cache”,
“content-type: application/json”,
“postman-token: be60095f-a0cb-8d1d-e721-9d961df98867”
),
));
$curl = curl_init();
$date_api = date(‘d-m-Y’);
curl_setopt_array($curl, array(
CURLOPT_URL => “https://user-api-v2.simplybook.me/admin/bookings?filter[date]=$date_api&on_page=100”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “GET”,
CURLOPT_HTTPHEADER => array(
“cache-control: no-cache”,
“postman-token: 1d74a789-3e29-c245-e39d-bc812a14f757”,
“x-company-login: wehntalapotheke”,
“x-token: $token”
),
));