# \[#1254\] Unable to filter the data based on date\_from in getBookingReport () 

**URL:** https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254
**Category:** Bug Reports
**Tags:** migrated, redmine-1254
**Created:** [July 10, 2024, 7:39am UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254 "2024-07-10T07:39:49Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 7:39am UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/1 "2024-07-10T07:39:49Z")

</div>

**Migrated from Redmine #1254** | _Author: Shubham Kamble_  
_Status: Feedback | Priority: Low, I can wait | Created: 2024-07-10_

* * *

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.

> **[getBookingReport () - API documentation | SimplyBook.me Online Scheduling](https://simplybook.me/en/api/developer-api/tab/doc_api#getBookingReportdefaultadmin)**
>
> Get user db data (id, phone, is\_validated) | See a full list of SimplyBook.me rich API options. We offer up to 200 different API functions.

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/](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))

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 8:03am UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/2 "2024-07-10T08:03:31Z")

</div>

**Dmytro Bondarev** wrote:

Hi,  
We need HTTP request that you make to our server.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 8:25am UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/3 "2024-07-10T08:25:31Z")

</div>

**Shubham Kamble** wrote:

Dmytro Bondarev wrote:

> Hi,  
> We need HTTP request that you make to our server.

POST /admin/ HTTP/1.1  
Host: user-api.simplybook.pro  
X-Company-Login: [COMPANY\_LOGIN]  
X-User-Token: [USER\_TOKEN]  
Content-Type: application/json

{  
“jsonrpc”: “2.0”,  
“method”: “getBookingReport”,  
“params”: [  
{  
“created\_date\_from”: “2024-05-09”  
}  
],  
“id”: 0  
}

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 8:31am UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/4 "2024-07-10T08:31:46Z")

</div>

**Dmytro Bondarev** wrote:

Hi, as i mentioned in another ticket you should pass it under filter object:  
Please try:

```
POST /admin/ HTTP/1.1
Host: user-api.simplybook.pro
X-Company-Login: [COMPANY_LOGIN]
X-User-Token: [USER_TOKEN]
Content-Type: application/json

{
"jsonrpc": "2.0",
"method": "getBookingReport",
"params": [ {
    "filter": {
        "created_date_from": "2024-05-09"
    }
}], "id": 0}
```

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 12:42pm UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/5 "2024-07-10T12:42:10Z")

</div>

**Shubham Kamble** wrote:

How to get entire page data

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 12:47pm UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/6 "2024-07-10T12:47:30Z")

</div>

**Dmytro Bondarev** wrote:

What is entire page data?

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 12:51pm UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/7 "2024-07-10T12:51:02Z")

</div>

**Shubham Kamble** wrote:

after applying the filter i am getting the single page data only. i want to get the data from next pages as well.

payload = {  
‘jsonrpc’: ‘2.0’,  
‘method’: method,  
‘params’: [ {  
“filter”: {  
‘date\_from’: one\_day\_back\_str,  
‘date\_to’: four\_months\_later,  
‘Order’:‘date\_start\_asc’,  
# ‘booking\_type’:‘all’  
}  
}],

```
        'id': 1
    }

```

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 12:53pm UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/8 "2024-07-10T12:53:00Z")

</div>

**Dmytro Bondarev** wrote:

You can use page parameter:

```
'params': [{
   "page": 2,
   "filter": {.....
```

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [July 10, 2024, 3:01pm UTC](https://tech-support.simplybook.me/t/1254-unable-to-filter-the-data-based-on-date-from-in-getbookingreport/1254/9 "2024-07-10T15:01:53Z")

</div>

**Shubham Kamble** wrote:

Thank You…

_(Short original content)_
