system
October 13, 2020, 5:53pm
1
Migrated from Redmine #588 | Author: Unnur Sól Ingimarsdóttir
Status: New | Priority: High, I’m very impatient | Created: 2020-10-13
Headers:
:authority: user-api.simplybook.me
:method: POST
:path: /
:scheme: https
accept: /
accept-encoding: gzip, deflate, br
accept-language: is-IS,is;q=0.9,en-US;q=0.8,en;q=0.7
cache-control: no-cache
content-length: 101
content-type: application/json
origin: http://localhost:8000
pragma: no-cache
referer: http://localhost:8000/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
x-company-login: bonstodinhofdatorg
x-token: 8735166fc739c0475e0d5094a1867fb4c5c6594c785dabe19f39ed481b7757ca
Body:
{“jsonrpc”:“2.0”,“method”:“getStartTimeMatrix”,“params”:[“2020-10-14”,“2020-10-14”,“19”,[“2”]],“id”:87}
I also tried:
{“jsonrpc”:“2.0”,“method”:“getStartTimeMatrix”,“params”:[“2020-10-14”,“2020-10-14”,“19”,{productIds: [“2”]}],“id”:87}
system
October 13, 2020, 6:24pm
2
Dmytro Bondarev wrote:
Hi. You should pass Service addons here only in case you want to calculate additional time (service addon time).
Also make sure that service addons are connected to selected service.
system
October 13, 2020, 6:38pm
3
Redmine Admin wrote:
seems you are not passing unit id
request must be like this
POST https: HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 101
X-Company-Login: mib
X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept: application/json
{"jsonrpc":"2.0","method":"getStartTimeMatrix","params":["2020-10-14","2020-10-14","19","1",1],"id":5}
Provider id MUST be 1 as this service is linked to one provider only
But it seems you simply don’t have slots for tomorrow
system
October 13, 2020, 7:20pm
4
Unnur Sól Ingimarsdóttir wrote:
Redmine Admin wrote:
seems you are not passing unit id
request must be like this
[…]
Provider id MUST be 1 as this service is linked to one provider only
But it seems you simply don’t have slots for tomorrow
Yes, tomorrow is full but not the day after or 19th for example.
I added the unitId but I get the same empty array with every request.
I need to be able to calculate the additional time, it is a crucial part of the system and yes the addOns are connected to the service selected.
Any other ideas?
system
October 13, 2020, 7:22pm
5
Redmine Admin wrote:
in code you sent us you are passing “2020-10-14” date which is tomorrow
system
October 14, 2020, 5:14pm
6
Unnur Sól Ingimarsdóttir wrote:
Redmine Admin wrote:
in code you sent us you are passing “2020-10-14” date which is tomorrow
Yes then I was testing it and booked the slots that were empty.
You can try for example:
POST https: HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 101
X-Company-Login: mib
X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept: application/json
{“jsonrpc”:“2.0”,“method”:“getStartTimeMatrix”,“params”:[“2020-10-16”,“2020-10-16”,“19”,“1”,1],“id”:5}
How would you call the function with addOns/products to calculate the total time?
system
October 14, 2020, 6:42pm
7
Unnur Sól Ingimarsdóttir wrote:
Dmitry Bondarev wrote:
Hi. You should pass Service addons here only in case you want to calculate additional time (service addon time).
Also make sure that service addons are connected to selected service.
Hi thank you! I want to be able to calculate additional time, it is crucial for the system to work properly
The addons are connected to selected service
POST https: HTTP/1.1
Host: user-api.simplybook.me
Content-Type: application/json; charset=UTF-8
Content-Length: 101
X-Company-Login: mib
X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept: application/json
{“jsonrpc”:“2.0”,“method”:“getStartTimeMatrix”,“params”:[“2020-10-16”,“2020-10-16”,“19”,“1”,1],“id”:5}
How would you call the method with addons/products to calculate the total time?
system
October 15, 2020, 10:04am
8
Nicholas Alias wrote:
{“jsonrpc”: “2.0”, “method”: “getStartTimeMatrix”, “params”: [“2020-10-16”, “2020-10-16”, “19”, “1”, 1, null, [2]], "id ": 5}
[2] = productIds