system
August 30, 2021, 6:28pm
1
Migrated from Redmine #772 | Author: Rahim Ali
Status: New | Priority: High, I’m very impatient | Created: 2021-08-30
Support,
I am trying to get the token using following auth end point but getting error : Invalid type given
https://user-api-v2.simplybook.me/admin/auth
Even tried with end point(.plus domain) but no luck : https://user-api-v2.simplybook.plus/admin/auth
{“code”:400,“message”:“”,“data”:{“company”:[“Invalid type given, value should be float, string, or integer”],“login”:[“Invalid type given, value should be float, string, or integer”],“password”:[“Invalid type given, value should be float, string, or integer”]},“message_data”: }
I am attaching my postman collection as well for your review.
system
August 30, 2021, 6:51pm
2
Redmine Admin wrote:
hi, it seems your http request is wrong, please provide raw http request
system
August 30, 2021, 7:02pm
3
Rahim Ali wrote:
Here is the raw request
{
“company”: “aseast”,
“login”: “rahim.ali@mrm.com ”,
“password”: “12345Op”
}
system
August 30, 2021, 7:36pm
4
Redmine Admin wrote:
this doesent look like raw http request, please provide it in curl or any other common format
system
August 30, 2021, 9:05pm
5
Rahim Ali wrote:
Here you go, i pull this from the Postman console of my collection
POST https://user-api-v2.simplybook.plus/admin/auth
POST /admin/auth HTTP/1.1
Content-Type: application/json
User-Agent: PostmanRuntime/7.28.4
Accept: /
Postman-Token: 8ad5f6d7-6096-4d0c-b05b-1db64b331b31
Host: user-api-v2.simplybook.plus
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 82
{
“company”: “aseast”,
“login”: “rahim.ali@mrm.com ”,
“password”: “12345Op”
}
HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 30 Aug 2021 21:00:40 GMT
Content-Type: application/json
Content-Length: 78
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
{“code”:400,“message”:“Invalid login or password”,“data”: ,“message_data”: }
system
August 30, 2021, 9:21pm
6
Nicholas Alias wrote:
Please use the correct login and password for your company “aseast”
system
August 30, 2021, 9:34pm
7
Rahim Ali wrote:
These are credentials which i am using to login to portal - https://altardstate.cluster.simplybook.plus/
Do we need a separate credential to make the Rest API call? if so where we can get new credentials?
system
August 31, 2021, 7:25am
8
Redmine Admin wrote:
you need to use your account name, its user login and password
system
August 31, 2021, 11:57am
9
Rahim Ali wrote:
Where i could find those credentials
system
August 31, 2021, 12:01pm
10
Redmine Admin wrote:
you need to contact your cluster admin or account admin to get it.
system
August 31, 2021, 1:58pm
11
Rahim Ali wrote:
Thanks for the response i was able to get the credentials from cluster admin and my auth end point is working now
I am trying to pull the all upcoming booking using end point - https://user-api-v2.simplybook.plus/admin/bookings?filter[upcoming_only]=1 but it is returning 0 booking but i can see the future booking under account: “aseast”, please advise
Here is complete request/response log
GET https://user-api-v2.simplybook.plus/admin/bookings?filter[upcoming_only]=1
200
30 ms
GET /admin/bookings?filter[upcoming_only]=1 HTTP/1.1
Content-Type: application/json
X-Company-Login: admin
X-Token: 26198b5733b9f3c459606c691a0ea3e32be9857cdfd59e7c5ae6c522c1c25d8d
User-Agent: PostmanRuntime/7.28.4
Accept: /
Postman-Token: 0d251bbc-4ab1-48ad-b2a1-de7b482ed1e9
Host: user-api-v2.simplybook.plus
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 31 Aug 2021 13:46:30 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Keep-Alive: timeout=20
X-XSS-Protection: 1; mode=block
system
August 31, 2021, 2:00pm
12
Redmine Admin wrote:
X-Company-Login: aseast
you need to use aseast as compoany login
system
August 31, 2021, 3:37pm
13
Rahim Ali wrote:
Thanks for the feedback i am able to pull the data. one more question
Can we have one main account to access all the companies and return all the bookings under those companies?
system
August 31, 2021, 4:11pm
14
system
August 31, 2021, 4:53pm
15
Rahim Ali wrote:
Thanks for the details
Do we have documentation link for cluster api. I don’t have key so will go with credentials, What kind of credentials needed for cluster API call?
We have following scenario. We have 6 companies in our account and we need the upcoming Booking of 4 companying, what is recommended way to get the upcoming bookings?
Another question, I have fetched few appointment objects through the rest api, is thee a way to get/generate hash like you are generating in the email for Example - Altar'd State | Scheduling and Booking Website
system
September 1, 2021, 6:48am
16
Redmine Admin wrote:
you need to call each account separately to get bookings
there is no API to make such link
system
September 1, 2021, 8:35am
17
Nicholas Alias wrote:
here you can generate api key
system
September 1, 2021, 8:38am
18
system
September 1, 2021, 12:16pm
19
Rahim Ali wrote:
Thanks for the feedback.
On the 2nd question, i am already connected to specific company account.Let add some more details.
When a user made a booking he/she got an email and in email details - links have some hash key in it. for example
is three a way to get the same hash key through the rest api?
system
September 1, 2021, 12:18pm
20
Redmine Admin wrote:
there is no API to get such links/hash