Hello, @dani, @mykhailo
How to filter products by modification date via API?
I can create a filter by product. But the method Pipedrive API v1 Reference doesn’t return a field that shows the update date. To create a filter, you need to specify the field ID by which we will filter.
What do you advise?
“update_time”: “2020-01-23 01:12:51”,
@Kurt_Jones What does your comment mean?
To create a filter for the
update_time field, you need to specify the
update_time field ID. The field list of the method Pipedrive API v1 Reference, there is no field with
Sorry, I was in a hurry.
There is no filter. You need to use the api to get all products then filter them yourself using that key.
You are right,
update_time is not exposed in Product fields. As an alternative workaround for filtering by Date, you could create a custom field, “Modification date” with type Date, and use it in Custom Filter with Date condition you need (see below)
After that, you can get a filter id, by calling
GET /filters, and use a newly created filter in
GET /products?filter_id=<filter id with modification date>.
As a downside, you need to update the “Modification field” every time a Product is updated.
I just had to check because I wasn’t sure. update_time is exposed on the product:
“add_time”: “2020-01-06 23:51:28”,
"update_time": “2020-01-23 01:12:51”,
You can use that to filter the returned API data programmatically.
You’re right Kurt,
update_time is present in the
GET /products response. I meant ProductFields, which is another entity, as @a.skibardin wanted to create a filter based on a ProductField.
As long as there are not that many Products, I think your suggestion, pulling all the products and filter them out afterwards, should work perfectly.