Question

Query for a certain field within a nested result

  • 7 March 2023
  • 2 replies
  • 39 views

Hello,

 

I’m currently trying to get certain info from an API, but using the GET webhook in the Webhooks by Zapier action is returning all events from that API. 

I’m new to Zapier, and know that Query string parameters will most likely need to be used, but unsure how to format it. Below is an example of data we are receiving from the API. It seems that each “event” is numbers, and has nested objects.

As an example here, how would I query for a specific code under coupons and only return information from that event? Do I need a code step before or after or would I be able to just use the Query string parameters?

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +8

Hi @Pedro Otero 

 

I  order to help you, we actually need to check the API documentation and understand your process more. Not every API is the same, some might not even allow for query parameters. 

Hello,

Thank you for your reply, @MohSwellam , I’m using Thought Industries course-actions API, https://api.thoughtindustries.com/#course-actions. I know that at least some allow for query parameters, so you may be right that this one in particular might not allow for it.

If that were the case, would one use a code step to filter the results? Unsure how that would work if query parameters are not allowed.