[#772] API Authentication failed - Please advise

Rahim Ali wrote:

Thanks for feedback.

Let me elaborate my complete scenario here so that you can better suggest

My booking(CRUD) operation are done through the simple booking hosted page(widget). I have fetched the user upcoming booking through Rest API, i want to add ‘Manage Booking’ link when pressed it will redirect simple booking hosted page(Widget) where he/she can update upcoming booking, please advise?

Rahim Ali wrote:

I think i am able to figure it but we have to generate another request ;(

GET https://user-api-v2.simplybook.plus/admin/bookings/52/links
200
131 ms
GET /admin/bookings/52/links HTTP/1.1
Content-Type: application/json
X-Company-Login: aseast
X-Token: 4eb71dfa8cf981e03c309977eed4931085cc7ece29d3e8133f9b6bc22ddc27ee
User-Agent: PostmanRuntime/7.28.4
Accept: /
Postman-Token: 12ce4006-ffb4-4e4b-9451-660df74d4603
Host: user-api-v2.simplybook.plus
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 07 Sep 2021 13:00:24 GMT
Content-Type: application/json
Content-Length: 287
Connection: keep-alive
Keep-Alive: timeout=20
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, PUT, DELETE, GET, OPTIONS
Access-Control-Allow-Headers: content-type, x-company-login, x-token, x-requested-with
X-XSS-Protection: 1; mode=block

{“booking_link”:“https://aseast.simplybook.plus/v2/client/show-booking/id/52/hash/678dbb6a028c6fb2c2d78ad621d88195/”,“cancel_link”:“https://aseast.simplybook.plus/v2/client/cancel-booking/id/52/hash/678dbb6a028c6fb2c2d78ad621d88195/”,“reschedule_link”:null,“id”:null}

Can we have the booking link in the response of request: https://user-api-v2.simplybook.plus/admin/bookings?filter[upcoming_only]=1&filter[search]=rahim.ali@mrm.com&filter[status]=confirmed&on_page=2&page=2

Redmine Admin wrote:

it is impossible because booking link does not exists anymore for booking which has being made

Rahim Ali wrote:

so you are saying you guys are going to retire this end point

GET https://user-api-v2.simplybook.me/admin/bookings/1/links
Content-Type: application/json
X-Company-Login:
X-Token:

I made a appointment yesterday and calling this end point with booking id i am getting booking/cancel booking links

Redmine Admin wrote:

not sure what you mean and how it related to “Can we have the booking link in the response of request?” question…

Rahim Ali wrote:

Let me add some more details here.

There are 2 end points

GET https://user-api-v2.simplybook.me/admin/bookings?filter[upcoming_only]=1 - Return upcoming bookings
GET https://user-api-v2.simplybook.me/admin/bookings/1/links - Return Booking links of detail/cancel

Response of upcoming booking end point does not have detail about the booking links we want to have booking links in the response of upcoming booking booking, we have http quota limitation in our system(can’t not more than 8 calls)

Please advise?

Dmytro Bondarev wrote:

Unfortunately we do not have such functionality.