[#987] We are unable to do bookings in https://magrabi.com/sa-en site

Migrated from Redmine #987 | Author: Nishant Singh
Status: Closed | Priority: Immediate, there is BUG! | Created: 2022-12-13


While trying to do the eye test booking using the https://jedmadinaroad.secure.magrabi.enterpriseappointments.com/

we are getting error in the response. The error is :

{“instant”:{“epochSecond”:1670843619,“nanoOfSecond”:827703000},“thread”:“hybrisHTTP34”,“level”:“INFO”,“loggerName”:“com.itelligence.magrabi.service.impl.MagrabiSimplyBookApiServiceImpl”,“message”:“{"id":"14","jsonrpc":"2.0","error":{"code":"-32051","message":"Selected event id is not available","data":},"result":null}”,“endOfBatch”:false,“loggerFqcn”:“org.apache.log4j.Category”,“contextMap”:{“RemoteAddr”:“[81.29.109.100] “,“Tenant”:””},“threadId”:241,“threadPriority”:5,“origin”:“PLATFORM”}

Can you please help us to get it resolved ASAP

Redmine Admin wrote:

hi, it does not seems to be response from our API.
Please provide raw http request and response from our API.

Nishant Singh wrote:

Hi Please find the raw request and response:
Request:
{
“jsonrpc”:“2.0”,
“method”:“getStartTimeMatrix”,
“params”:[
“2022-12-23”,
“2022-12-23”
],
“id”:15
}
Response:
{
“id”:“15”,
“jsonrpc”:“2.0”,
“error”:null,
“result”:{
“2022-12-23”:[

  ]

}
}

Just to add now we are not getting the time slot itself for any of the simplybookme point of service.

Nishant Singh wrote:

For Alhamra Mall :

We are getting time slot but when trying with the selected time slot getting below response:
Request:
{
“jsonrpc”:“2.0”,
“method”:“book”,
“params”:[
null,
null,
“2022-12-16”,
“22:10:00”,
{
“name”:“Nishant Singh”,
email":"nishant@juneits.com”,
“phone”:“966521234455”
}
],
“id”:14
}

Response:

{
“id”:“14”,
“jsonrpc”:“2.0”,
“error”:{
“code”:“-32051”,
“message”:“Selected event id is not available”,
“data”:[

  ]

},
“result”:null
}

Redmine Admin wrote:

As I can see this slot is not available because you asking for Dec 23 but trying to book Dec 16

Nishant Singh wrote:

No, it is not like that. Both are different request and response.
The first one i.e on the top is of jedmadinaroad which we tried to book for Dec 23 but got no slot available.
The second one is of Alhamra Mall where we are getting the slot, but on going further with the slot selected we are getting error as “selected event id is not available”

Redmine Admin wrote:

please provide your booking site link to this account

Nishant Singh wrote:

Can we schedule a small meeting for this so that we can check together?

Redmine Admin wrote:

unfortunately it is not possible to help with API during a meeting. Please provide you booking site link and raw http request to get time slots and its result. Also book request

Nishant Singh wrote:

Please find the booking site link:

Request: {
“jsonrpc”:“2.0”,
“method”:“getStartTimeMatrix”,
“params”:[
“2022-12-16”,
“2022-12-16”
],

Redmine Admin wrote:

we need response too

Redmine Admin wrote:

i do not see service/provider id in your request as well

Nishant Singh wrote:

Hi please check the below booking site for JED MO Madina Road :

1st request goes to:
SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/login]
Request:
{
“jsonrpc”:“2.0”,
“method”:“getToken”,
“params”:[
“jedmadinaroad”,
“3404aafb4ea3430d0a3483185d68daa3887a836fe08fab5416fe259ddfa24732”
],
“id”:2
}

Response:
{
“result”:“f1e82e552ba9556cf82186be6cab0fa6c975c6c8a5088fecf9aa510bd3c50351”,
“id”:“2”,
“jsonrpc”:“2.0”,
“error”:null
}

2nd request goes to : SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com]
Request:
{
“jsonrpc”:“2.0”,
“method”:“getStartTimeMatrix”,
“params”:[
“2022-12-23”,
“2022-12-23”
],
“id”:15
}

Response:
{
“id”:“15”,
“jsonrpc”:“2.0”,
“error”:null,
“result”:{
“2022-12-23”:[

  ]

}
}

Redmine Admin wrote:

it says you have no slots for this service on this date

Nishant Singh wrote:

Hi please also check the below booking site for JUB MO Jubail Street:

1st request goes to:
SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/login]
Request: {
“jsonrpc”:“2.0”,
“method”:“getToken”,
“params”:[
“qjbjubailhighstreet”,
“ecdab9e4ac8f6f8dea07dbfafed3f22c10426e62569fb8fd09922127dc4e62c1”
],
“id”:2
}

Response: {
“result”:“04f89e423afdc7e39ac6994372886adf333a32c518e0d174b922bcad97c1b2b7”,
“id”:“2”,
“jsonrpc”:“2.0”,
“error”:null
}

2nd request goes to : SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com]
Request: {
“jsonrpc”:“2.0”,
“method”:“getStartTimeMatrix”,
“params”:[
“2022-12-30”,
“2022-12-30”
],
“id”:15
}

Response: {
“id”:“15”,
“jsonrpc”:“2.0”,
“error”:null,
“result”:{
“2022-12-30”:[
“10:00:00”,
“10:30:00”,
“11:00:00”,
“11:30:00”,
“12:00:00”,
“12:30:00”,
“13:00:00”,
“13:30:00”,
“14:00:00”,
“14:30:00”,
“15:00:00”,
“15:30:00”,
“16:00:00”,
“16:30:00”,
“17:00:00”,
“17:30:00”,
“18:00:00”,
“18:30:00”,
“19:00:00”,
“19:30:00”,
“20:00:00”,
“20:30:00”,
“21:00:00”
]
}
}
3rd Request goes to :SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/login]
request:
{
“jsonrpc”:“2.0”,
“method”:“getUserToken”,
“params”:[
“qjbjubailhighstreet”,
“magrabistoreaccount”,
“Magrabi@123”
],
“id”:1
}
response:
{
“result”:“d4e294cfd53d07f821fed7a3d62aa15d5aaf08e5983f2afdac453f06f890ae05”,
“id”:“1”,
“jsonrpc”:“2.0”,
“error”:null
}
4th request goes to: SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/admin]
request:
{
“jsonrpc”:“2.0”,
“method”:“getEventList”,
“params”:[

],
“id”:9
}
response:
{
“id”:“9”,
“jsonrpc”:“2.0”,
“error”:null,
“result”:{
“3”:{
“id”:“3”,
“name”:“EYE TEST”,
“duration”:“30”,
“buffertime_before”:“0”,
“buffertime_after”:“0”,
“hide_duration”:“0”,
“description”:“”,
“is_public”:“1”,
“is_active”:“1”,
“position”:“2”,
“file_id”:null,
“seo_url”:null,
“is_recurring”:“0”,
“picture”:null,
“picture_sub_path”:null,
“is_visible”:“1”,
“picture_path”:null,
“classes_plugin_info”:{
“unit_group_binded_in_class”:null,
“unit_groups_binded_in_classes”:[

        ],
        "event_binded_in_class":null,
        "events_binded_in_classes":null
     },
     "phone":null,
     "email":null,
     "station_id":null,
     "qty":null
  }

}
}

Nishant Singh wrote:

Nishant Singh wrote:

Hi please also check the below booking site for JUB MO Jubail Street:
Appointment booking service and free online booking service

1st request goes to:
SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/login]
Request: {
“jsonrpc”:“2.0”,
“method”:“getToken”,
“params”:[
“qjbjubailhighstreet”,
“ecdab9e4ac8f6f8dea07dbfafed3f22c10426e62569fb8fd09922127dc4e62c1”
],
“id”:2
}

Response: {
“result”:“04f89e423afdc7e39ac6994372886adf333a32c518e0d174b922bcad97c1b2b7”,
“id”:“2”,
“jsonrpc”:“2.0”,
“error”:null
}

2nd request goes to : SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com]
Request: {
“jsonrpc”:“2.0”,
“method”:“getStartTimeMatrix”,
“params”:[
“2022-12-30”,
“2022-12-30”
],
“id”:15
}

Response: {
“id”:“15”,
“jsonrpc”:“2.0”,
“error”:null,
“result”:{
“2022-12-30”:[
“10:00:00”,
“10:30:00”,
“11:00:00”,
“11:30:00”,
“12:00:00”,
“12:30:00”,
“13:00:00”,
“13:30:00”,
“14:00:00”,
“14:30:00”,
“15:00:00”,
“15:30:00”,
“16:00:00”,
“16:30:00”,
“17:00:00”,
“17:30:00”,
“18:00:00”,
“18:30:00”,
“19:00:00”,
“19:30:00”,
“20:00:00”,
“20:30:00”,
“21:00:00”
]
}
}
3rd Request goes to :SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/login]
request:
{
“jsonrpc”:“2.0”,
“method”:“getUserToken”,
“params”:[
“qjbjubailhighstreet”,
“magrabistoreaccount”,
“Magrabi@123”
],
“id”:1
}
response:
{
“result”:“d4e294cfd53d07f821fed7a3d62aa15d5aaf08e5983f2afdac453f06f890ae05”,
“id”:“1”,
“jsonrpc”:“2.0”,
“error”:null
}
4th request goes to: SIMPLY_BOOK-API |POST: [https://user-api.enterpriseappointments.com/admin]
request:
{
“jsonrpc”:“2.0”,
“method”:“getEventList”,
“params”:[

],
“id”:9
}

response:
{
“id”:“9”,
“jsonrpc”:“2.0”,
“error”:null,
“result”:{
“3”:{
“id”:“3”,
“name”:“EYE TEST”,
“duration”:“30”,
“buffertime_before”:“0”,
“buffertime_after”:“0”,
“hide_duration”:“0”,
“description”:“”,
“is_public”:“1”,
“is_active”:“1”,
“position”:“2”,
“file_id”:null,
“seo_url”:null,
“is_recurring”:“0”,
“picture”:null,
“picture_sub_path”:null,
“is_visible”:“1”,
“picture_path”:null,
“classes_plugin_info”:{
“unit_group_binded_in_class”:null,
“unit_groups_binded_in_classes”:[

        ],
        "event_binded_in_class":null,
        "events_binded_in_classes":null
     },
     "phone":null,
     "email":null,
     "station_id":null,
     "qty":null
  }

}
}

Dmytro Bondarev wrote:

What exactly is wrong with these requests?
Everything looks correct.

Nishant Singh wrote:

We also get below as a response as well

{
“id”:“14”,
“jsonrpc”:“2.0”,
“error”:{
“code”:“-32051”,
“message”:“Selected event id is not available”,
“data”:[

  ]

},
“result”:null
}

Nishant Singh wrote:

Nishant Singh wrote:

We also get below as a response as well, is this also seems to be ok?

{
“id”:“14”,
“jsonrpc”:“2.0”,
“error”:{
“code”:“-32051”,
“message”:“Selected event id is not available”,
“data”:[

  ]

},
“result”:null
}

Redmine Admin wrote:

Please explain why do you think it is wrong? Please provide API request which shows this slot as available and your book request. Link to your booking website is also necessary