[#1293] Can't retrieve booking from id (or can't retrieve booking id)

Migrated from Redmine #1293 | Author: Matteo Frigerio
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2024-10-18


Good day, in this link Support #1287: booking_id or customer in detailed-report - API - Simplybook.me support for developers I’ve been told that the field ‘code’ returned by /detailed-report/{id} acts as booking id, I’m reporting that, when I pass it to /bookings/{id}, no booking is found, therefore either another value is returned instead of the id of the booking (despite what told in the other ticket) or the booking found by detailed-report can’t be found by /bookings. In the meantime, the priority escalated.

Nicholas Alias wrote:

hi, please provide raw http request

Matteo Frigerio wrote:


curl --location 'https://user-api-v2.simplybook.pro/admin/detailed-report/{report-id}' \
--header 'Content-Type: application/json' \
--header 'X-Company-Login: {my-company}' \
--header 'X-Token: {my-token}' \
--data ''

curl --location 'https://user-api-v2.simplybook.pro/admin/bookings/{code-from-details}' \
--header 'Content-Type: application/json' \
--header 'X-Company-Login: {my-company}' \
--header 'X-Token: {my-token}'

Nicholas Alias wrote:

admin/detailed-report/{report-id} - We don’t return booking id here
admin/bookings/{code-from-details} - you need to use {booking_id} instead of {code-from-details}

{booking_id} - you get after creating a booking

Or you can use this endpoint /admin/bookings?filter[search]={code-from-details}