Hi there,
We have a similar topic here. You can take a look at it on how to pass parameters into query of API.
Thanks