[#733] API call return null values of intake form fields

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”
),
));

Redmine Admin wrote:

what is your booking site url?

Dmytro Bondarev wrote:

Hi! To get detailed info you have to call booking details endpoint for each booking.

Viktor Lyuzkanov wrote:

Viktor Lyuzkanov wrote:

thats what we do

https://user-api-v2.simplybook.me/admin/bookings?filter[date]=$date_api&on_page=100

Redmine Admin wrote:

please use https://user-api-v2.simplybook.it as endpoint (it will be faster for you)

Viktor Lyuzkanov wrote:

see plenty of null values in fields

Dmytro Bondarev wrote:

Please provide HTTP request and response.

Viktor Lyuzkanov wrote:

see detailed response

Viktor Lyuzkanov wrote:

I probable find myself the issue by checking the response file :slight_smile:

could be of language issue

I will come back, if still open, okay ?

Dmytro Bondarev wrote:

sure

(Short original content)

Viktor Lyuzkanov wrote:

you can change the status to temp resolved.