Migrated from Redmine #1251 | Author: Shubham Kamble
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2024-07-05
I trying to get the data from the getBookingReport () using python script. I am getting the data successfully but i want the data from the specific date and that is not being working at my end. Below is the documentation link.
COMPANY_LOGIN =
API_KEY =
USER_LOGIN =
USER_PASSWORD =
SECRET_KEY =
class JSONRpcClient:
def init (self, url, headers):
self.url = url
self.headers = headers
def call(self, method, params=None):
payload = {
'jsonrpc': '2.0',
'method': method,
'params': params or [],
'id': 0
}
response = requests.post(self.url, headers=self.headers, json=payload)
return response.json()
api = SimplyBookAPI(COMPANY_LOGIN, API_KEY, USER_LOGIN, USER_PASSWORD, SECRET_KEY)
admin_client = JSONRpcClient(
‘https://user-api.simplybook.pro/admin/ ’,
headers={
‘X-Company-Login’: COMPANY_LOGIN,
‘X-User-Token’: api.user_token
}
)
filters = [{
“created_date_from”: “2024-05-09”,
} ]
booking_report = admin_client.call(‘getBookingReport’, [filters])
print(“Booking Reports:”, json.dumps(booking_report, indent=4))
Dmytro Bondarev wrote:
Hi, please try
booking_report = admin_client.call(‘getBookingReport’, [{
“filter”: {“created_date_from”: “2024-05-09”}
}])
Dmytro Bondarev wrote:
Could you please provide HTTP request?
Shubham Kamble wrote:
Shubham Kamble wrote:
I trying to get the data from the getBookingReport () using python script. I am getting the data successfully but i want the data from the specific date and that is not being working at my end. Below is the documentation link.
API documentation | SimplyBook.me Online Scheduling
COMPANY_LOGIN =
API_KEY =
USER_LOGIN =
USER_PASSWORD =
SECRET_KEY =
class JSONRpcClient:
def init (self, url, headers):
self.url = url
self.headers = headers
def call(self, method, params=None):
payload = {
'jsonrpc': '2.0',
'method': method,
'params': params or [],
'id': 0
}
response = requests.post(self.url, headers=self.headers, json=payload)
return response.json()
api = SimplyBookAPI(COMPANY_LOGIN, API_KEY, USER_LOGIN, USER_PASSWORD, SECRET_KEY)
admin_client = JSONRpcClient(
‘https://user-api.simplybook.pro/admin/ ’,
headers={
‘X-Company-Login’: COMPANY_LOGIN,
‘X-User-Token’: api.user_token
}
)
filters = [{
“created_date_from”: “2024-05-09”,
} ]
booking_report = admin_client.call(‘getBookingReport’, [filters])
print(“Booking Reports:”, json.dumps(booking_report, indent=4))
Dmytro Bondarev wrote:
Could you please provide HTTP request?
Dmytro Bondarev wrote:
Could you please provide HTTP request?
I have already added the full code above
Dmytro Bondarev wrote:
We need HTTP request to be able to help you.
We do not provide support with code.
Shubham Kamble wrote:
Dmytro Bondarev wrote:
We need HTTP request to be able to help you.
We do not provide support with code.
‘https://user-api.simplybook.pro/admin/ ’,
Dmytro Bondarev wrote:
Hi,
It is just endpoint where you make request. We need full HTTP request.
system
July 5, 2024, 8:35am
10
Shubham Kamble wrote:
Below is the link for the documentation of booking_report. I guess this can answer your question
system
July 5, 2024, 8:38am
11
Dmytro Bondarev wrote:
This is the link to our documentation.
We are aware about this link.
We need HTTP request that you make to our server.
system
July 5, 2024, 8:45am
12
Shubham Kamble wrote:
Dmytro Bondarev wrote:
This is the link to our documentation.
We are aware about this link.
We need HTTP request that you make to our server.
If possible for you can we have a catchup call?
system
July 5, 2024, 8:56am
13
Dmytro Bondarev wrote:
Hi, unfortunately we do not provide support by call.
If you have questions regarding the system, please contact live support or your account manager.
If you have questions regarding API we are here to help, but we need some information from you.
We are not aware what technologies you are using, but usually you can find HTTP request in logs, or in browser console, etc.
Your can read more information here: HTTP messages - HTTP | MDN
system
July 10, 2024, 7:09am
14
system
July 10, 2024, 8:03am
16
Dmytro Bondarev wrote:
We need HTTP request that you make to our server.