Hi, I plan on fetching deals this way via API:
- Create a filter with given criteria (via /filters endpoint)
- Get back the ID of the filter
- Get deals from this filter (via /deals endpoint)
- Delete the filter.
Is this a valid workflow? Asking in case there’s something inherently wrong with it (e.g. a created filter needs time-consuming indexing or something like that).
Hi @darekmmm
The workflow seems reasonable and you will get deals by filter. Also, there is no need to delete a filter if you will need it again.
Ok thanks, @mykhailo
If I don’t delete the filter, and send the same post request to /filters when code is restarted, it will create another filter with the same parameters though, right?
Correct. POST /filter will allow to create a filter with similar conditions.