[#736] Problem to get booking status via Rest API call

Migrated from Redmine #736 | Author: Antonio Graterol
Status: Feedback | Priority: High, I’m very impatient | Created: 2021-07-13


Hi, I’ve made a simplybook Rest API caller, which feeds my company’s data into a google spreadsheet.

I’ve been able to fetch and process all the data but there is some value that I don’t seem to get, or, I think that what I got is not the same that I need.

Cutting the chase, the value that I want is the booking status circled in ‘Pic1’ and ‘Pic2’, they show different cases.

I did this in my code, I do a GET request of ‘https://user-api-v2.simplybook.me/admin/bookings/’ + bookingNumber to get a JSON object with the datails of the booking, the output has a property called ‘Status’ that seems to be what I’m looking for but it has two possible attributes (confirmed and canceled) wich are different to those showed in both attached images.

If you can take the time, I’d like that you clarify the next questions:

  1. Is the status that I’m getting from the JSON object the same showed in the images despite of using different words?
  2. If question 1 is false, where and how I can get the real booking status like those showed in the images?

Thanks in advance

Antonio Graterol wrote:

The images didn’t get attached so I’ve uploded as follows

pic1 - https://ibb.co/svYQpNJ
pic2 - https://ibb.co/crjPr47

Antonio Graterol wrote:

Hi, I’ve made a simplybook Rest API caller, which feeds my company’s data into a google spreadsheet.

I’ve been able to fetch and process all the data but there is some value that I don’t seem to get, or, I think that what I got is not the same that I need.

Cutting the chase, the value that I want is the booking status circled in ‘Pic1’ and ‘Pic2’, they show different cases.

I did this in my code, I do a GET request of ‘https://user-api-v2.simplybook.me/admin/bookings/’ + bookingNumber to get a JSON object with the datails of the booking, the output has a property called ‘Status’ that seems to be what I’m looking for but it has two possible attributes (confirmed and canceled) wich are different to those showed in both attached images.

If you can take the time, I’d like that you clarify the next questions:

  1. Is the status that I’m getting from the JSON object the same showed in the images despite of using different words?
  2. If question 1 is false, where and how I can get the real booking status like those showed in the images?

Thanks in advance

Dmytro Bondarev wrote:

Hi!

There is field:

status	string	Booking status - confirmed/pending/canceled (depending on approve booking status and accept payment)

confirmed == active