Migrated from Redmine #497 | Author: Renaldas Cypas Status: Closed | Priority: Immediate, there is BUG! | Created: 2020-03-18
could you check if I’m calling API correctly, getting:
{“error”:{“code”:-32000,“message”:“Company does not exist”,“data”:},“id”:“1”}
parameters:
company: servicestore
api key: b43aacfe9c47ae2aed851aee88421f6dee9b5d7c43fda1f6f33c891c14833545
Talked with support already, and they said:
irina 2:50 PM @Renaldas I checked it with our techies and seems that use use the wrong company server and that is why you get an error. Please register all API requests you have here https://support.dev.simplybook.me/ and our developers will reply you asap
There is no addUser method.
If you need to pass parameters to addClient please see example above it works properly. (The @params@ is array and first param is object with client data)
There is no addUser method.
If you need to pass parameters to addClient please see example above it works properly. (The @params@ is array and first param is object with client data)
Please use admin API where ypu have to pass X-User-Token
Thanks it worked, I need bit help with what I need to achieve, so when user is registered trough our site using API, I want them to be able to login, how normally we should store login data when later we want to pass it to booking service and etc.
I saw this call: getClientByLoginHash ($hash) but no idea how to get login hash?
Another issue I see, user can register multiple times, how to prevent it, I tried to find API call where I can check if user exist based on email, but couldn’t find.
You should use “Client login” custom feature. it will prevent to register client multiple times.
Please use @addClient@ in Public service. (It will return client info with @client_hash@)
To get client use @getClientInfo@ and pass client @id@ and @sign@, where @sign = md5(clientId + clientHash + secretKey);@
If you prefer to use Admin service, then you can just add client as soon as your client sign up with you and then call @book@ method of Admin service and just pass client id.
which API call should I use to get all available time slots for service by using ANY service provider? I want to see example like this:
I enabled functionality to use ANY provider, tried this API call:
{“jsonrpc”:“2.0”,“method”:“getServiceAvailableTimeIntervals”,“params”:[“2020-03-23”,“2020-03-31”,“9”,“2”,100],“id”:1}