infusionsoft / infusionsoft-php

PHP client library for the Infusionsoft API.
https://developer.infusionsoft.com/
Other
129 stars 126 forks source link

how to filter result by date? #251

Open xemacscode opened 4 years ago

xemacscode commented 4 years ago

I'm trying to get contacts / orders with DateCreatedas filter: $noofcontacts = $infusionsoft->orders()->with('DateCreated','~>=~2020-04-25T00:00:00')->count();

But it ignores the date and returns all contacts / orders.

$noofcontacts = $infusionsoft->contracts()->where('DateCreated','~>=~2020-04-25T00:00:00')->count();

I tried place in where still the same output. Any ideas?

ajohnson6494 commented 4 years ago

@xemacscode Based on the REST API documentation It looks like you cannot filter by DateCreated. If you want to do that you would have to use the legacy XMLRPC API.