[#1364] Breaking change in SBM answer returning an array instead of a string for the status field for the booking -> orders failing in our frontend

Migrated from Redmine #1364 | Author: Marie Rajon
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2025-02-14


We use the cluster name which is https://compagniedesalpes.cluster.simplybook.pro/
And we encounter issues on our subaccounts SimplyBook.me - Système de rendez-vous and SimplyBook.me - Système de rendez-vous

We cannot create anylonger orders with booked activities in our frontend system as there have been a breaking change.
We noticed a change in the answers we receive from SBM when we send a POST /admin/bookings
The field status in SBM answer is now an Array.
Whereas from our front-end, since 2022 when performing a booking, we used to get an answer with the field status as a string.

• In local environnement connected to the test plateform when modifying the answer with a string for the field status we managed to create an order as before
• Question: Could you please tell us which String in the new array “Status” is to be used to get the booking status as before (wednesday morning it worked)? So we can manage a quick fix on our side to adapt and be able to create orders again?

Marie Rajon wrote:

We use the cluster name which is https://compagniedesalpes.cluster.simplybook.pro/
And we encounter issues on our subaccounts SimplyBook.me - Système de rendez-vous and SimplyBook.me - Système de rendez-vous

We cannot create anylonger orders with booked activities in our frontend system as there have been a breaking change.
We noticed a change in the answers we receive from SBM when we send a POST /admin/bookings
The field status in SBM answer is now an Array.
Whereas from our front-end, since 2022 when performing a booking, we used to get an answer with the field status as a string.

• In local environnement connected to the test plateform when modifying the answer with a string for the field status we managed to create an order as before
• Question: Could you please tell us which String in the new array “Status” is to be used to get the booking status as before (wednesday morning it worked)? So we can manage a quick fix on our side to adapt and be able to create orders again?

Please check the picture atteched SBM-ResponseFields-documented which shows the documented answer expected from SimplyBookMe.
And also the second picture SBM-Response-received which shows what we receive

And if it helos the answer
{
“bookings”: [
{
“id”: 7658,
“code”: “0hy5wpfeh”,
“client_timezone”: null,
“start_datetime”: “2025-02-14 15:20:00”,
“end_datetime”: “2025-02-14 15:25:00”,
“record_date”: “2025-02-13 15:08:13”,
“location_id”: null,
“category_id”: null,
“service_id”: 1,
“provider_id”: 22,
“client_id”: 4373,
“duration”: 5,
“client_time_offset”: 0,
“status”: [
“8”,
“Réservation validée”,

Réservation active, pour laquelle il n’y a pas d’action à faire</p>”,
“56dc86”,
“1”
],
“service”: null,
“provider”: null,
“location”: ,
“category”: null
}
],
“batch”: null,
“invoice”: null,
“id”: null
}

Our call to get this answer is this one : POST https://user-api-v2.simplybook.pro/admin/bookings

Marie Rajon wrote:

We use the cluster name which is https://compagniedesalpes.cluster.simplybook.pro/
And we encounter issues on our subaccounts SimplyBook.me - Système de rendez-vous and SimplyBook.me - Système de rendez-vous

We cannot create anylonger orders with booked activities in our frontend system as there have been a breaking change.
We noticed a change in the answers we receive from SBM when we send a POST /admin/bookings
The field status in SBM answer is now an Array.
Whereas from our front-end, since 2022 when performing a booking, we used to get an answer with the field status as a string.

• In local environnement connected to the test plateform when modifying the answer with a string for the field status we managed to create an order as before
• Question: Could you please tell us which String in the new array “Status” is to be used to get the booking status as before (wednesday morning it worked)? So we can manage a quick fix on our side to adapt and be able to create orders again?

Please check the picture atteched SBM-ResponseFields-documented which shows the documented answer expected from SimplyBookMe.
And also the second picture SBM-Response-received which shows what we receive

And if it helos the answer {
“bookings”: [ {
“id”: 7658,
“code”: “0hy5wpfeh”,
“client_timezone”: null,
“start_datetime”: “2025-02-14 15:20:00”,
“end_datetime”: “2025-02-14 15:25:00”,
“record_date”: “2025-02-13 15:08:13”,
“location_id”: null,
“category_id”: null,
“service_id”: 1,
“provider_id”: 22,
“client_id”: 4373,
“duration”: 5,
“client_time_offset”: 0,
“status”: [
“8”,
“Réservation validée”,

Réservation active, pour laquelle il n’y a pas d’action à faire</p>”,
“56dc86”,
“1”
],
“service”: null,
“provider”: null,
“location”: ,
“category”: null
}
],
“batch”: null,
“invoice”: null,
“id”: null
}

Our call to get this answer is this one : POST https://user-api-v2.simplybook.pro/admin/bookings

Marie Rajon wrote:

!SBM-Response-received.png!
!SBM-ResponseFields-documented.png!

Dmytro Bondarev wrote:

Hi, we didn’t change status type.
The new fields were added here, but please do not rely on the status field as it will be deprecated.

Marie Rajon wrote:

I do not find a way to add pictures, so I simply copy the answer expected from SimplyBookMe according to the documentation

BookingEntity
Entity that contains booking information

Name Type Description

id int Booking id. Auto-generated value.
code string Booking code. Auto-generated value.
is_confirmed bool Booking is confirmed
start_datetime string Booking start datetime
end_datetime string Booking end datetime
location_id int Location id
category_id int Category id
service_id int Service id
provider_id int Provider id
client_id int Client id
duration int Duration in minutes
service ServiceEntity Service
provider ProviderEntity Provider
location LocationEntity Location
category CategoryEntity Category

Dmytro Bondarev wrote:

Correct there is not status field.

Marie Rajon wrote:

Thank you for your answer @dmytro Bondarev!
Could you please tell us which field we can use to get the answer?

We can see is_confirmed as an expected field but we do not receive it … is that planned for later?

Dmytro Bondarev wrote:

Hi, yes is_confirmed field will be fixed soon.

Marie Rajon wrote:

Hi again,
Sorry, so just to be sure, is_confirmed is not available now?
Do you have an idea when it will be? Is it a question of days or months?
Thanks again

Dmytro Bondarev wrote:

Hi, it will be available early next week.

Marie Rajon wrote:

Hi again Dmytro,

Sorry we still do not understand and would really need your help as our customers on site are blocked …

1- So is there a field “status” on your side still (we get it during our tests) or not? (I ask because Irenen mentionned there was no such field and we are lost and wondering if the problem is somewhere else)
2- Would a rollback to the version of few days ago be possible until the new filed “is_confirmed” gets available?
3- As a workaround, is there another “endpoint” we could call to get the confirmation status of the booking?
Could we use this one as an alternativ? GET /admin/bookings/{id} (API documentation | SimplyBook.me Online Scheduling) qui renvoie API documentation | SimplyBook.me Online Scheduling

Thanks a lot for your help!!

Dmytro Bondarev wrote:

Hi,

1- So is there a field “status” on your side still (we get it during our tests) or not? (I ask because Irenen mentionned there was no such field and we are lost and wondering if the problem is somewhere else)
We didn’t have such field, but currently (since 2025-02-12) there is such field, but it contains Status feature data, which is incorrect according to our naming rules and will be removed in nearest update.

2- Would a rollback to the version of few days ago be possible until the new filed “is_confirmed” gets available?
It does not make sense, as old version didn’t contain neither status and is_confirmed fields, so you can just use as you used before and ignore new fields.

3- As a workaround, is there another “endpoint” we could call to get the confirmation status of the booking?
You can get booking details and see all data, including status. API documentation | SimplyBook.me Online Scheduling

Could we use this one as an alternativ? GET /admin/bookings/{id} (API documentation | SimplyBook.me Online Scheduling) qui renvoie API documentation | SimplyBook.me Online Scheduling
Yes

Marie Rajon wrote:

Thanks for your fast feedback Dmytro.
Do you know if via the SBM interface (SimplyBook.me - Système de rendez-vous) someone (on our side or yours) could have added a custom field/parameters in the past, that would have been overridden by your newly added field “status” on the 12/2?
Because I confirm, it used to work until the 12/2 morning for us … and this is really during that day with no change on our side that the order creation flow got broken on our side.

Dmytro Bondarev wrote:

No way to change it in interface.
Could be that in your code you rely that status will be null or string, and since never came it worked fine, but now it comes as array and it broken your code.

Marie Rajon wrote:

Sorry for the late reply.
Our development team is working on a fix now, you were right, now receiving the array is breaking our code.
As mentionned to Irène, we’ll see next week how we can better get informed on our side about changes coming in SBM as activities are crutial for our sites to work… and our developping Teams spent a lot of time on this issue past 3 days unfortunately.
I hope we will not have similar issues in the coming weeks as this is peak season for us.
Thanks for your help for now

Marie Rajon wrote:

Hello Dmytro,
We deployed a change in our code and our sites can create orders with bookable activites again since this afternoon.
Now we are wondering how to secure that a new change will not break our flow again.
→ You mentionned that the field status would be deprecated soon and that the new field is_confirmed would be available early this week
=> Would you have more information about these coming changes and when they are expected? (or where to find the information)
Thanks a lot!
Marie

Dmytro Bondarev wrote:

Hi, release will be tomorrow.
Usually adding new fields should not affect old code, because old code should rely only on fields that were in the response during development.
Your case is a little bit more complex as it seems you code was rely on status field, which was not intended to be there. And adding this field from our side caused the issue.