Skip to main content

Ordering and Filtering contactAutomations in API v3

  • October 6, 2024
  • 6 replies
  • 709 views

Endpoint: /contacts/{contactID}/contactAutomations?limit=20&orders[lastdate]=DESC

Is there a way to filter by seriesid or automation (id)?

Thanks.

6 replies

  • October 7, 2024

@a-msystems Thanks for reaching out! If you use this API Endpoint instead, you can filter for a specific contact AND automation ID, which will effectively give you the same results! The call might look like: https://youraccount.api-us1.com/api/3/contactAutomations?filters[seriesid]=AutomationID&filters[subscriberid]=ContactID

Hopefully, this helps you pull the data you’re looking for efficiently! 🙂


  • Author
  • October 7, 2024

You’re a life saver. Thanks Abby!


  • Author
  • October 7, 2024

With that endpoint, the orders[lastdate]=DESC doesn’t seem to work. Is there another way to sort in a descending order?

Thanks.


  • October 7, 2024

Hi @a-msystems Great question!! I double-checked, as I was hoping I could use the “adddate”, and unfortunately it doesn’t look like there are any order options for this call. I shared the suggestion with my team. Because this call will allow use to use the filters we need, I would still recommending using this call over the other - my apologies!


  • Author
  • October 7, 2024

It looks like adddate is working for me. Thanks Abby!


  • October 9, 2024

Fantastic! Even better! I am so happy to hear that worked well! 🙂 Thanks so much for letting me know!