Hi,
Hopefully a quick one. I’m using the https://a.klaviyo.com/api/events endpoint to replace the old /v1/person/<person_id>/metric/<metric_id>/timeline endpoint (so I’m on a deadline here!)
The objective is to find out if a profile has ever unsubscribed. I know the profile ID.
So I’m trying to use filtering to narrow the results down to just one profile and just the unsubbing event.
https://a.klaviyo.com/api/events?filter=equals(profile_id,'PROFILE_ID_HERE') works fine and gets me a block of json related to the profile with data on events etc.
But I also want to filter by the event - I’m only interested in the unsubbing event for the purposes of this call.
I’ve tried a bunch of variations of: https://a.klaviyo.com/api/events?filter=equals(profile_id,'PROFILE_ID_HERE'),equals(metric_id, 'X9cV7Q') where ‘X9cV7Q’ is the metric ID for unsubscribing. I’ve tried that with and() around the two filters. I’ve tried filter=equals() twice separated with &.
However I always get an ‘Invalid filter provided’ error: {"errors":[{"id":"3dc44d8c-e241-4090-9d85-643184919ba9","status":400,"code":"invalid","title":"Invalid input.","detail":"Invalid filter provided. Verify your parentheses match.","source":{"parameter":"filter"},"links":{},"meta":{}}]}
Anyone with a practised eye able to see where I’m going splat?
Many thanks,
Gareth