Trouble with filtering external API collection with query parameters (WP Geodirectory)

I’m pretty new with working with external APIs here on adalo (well, API in general) and I’m not quite sure how to make this work right.

Using WP Geodirectory on a Wordpress site, I want to use the businesses that get listed on the website as a collection on an adalo app. I’ve been able to get all of the results from the API, but now I’m stuck trying to figure out how to filter these results with the query parameters.

There are 2 external collections: Businesses and Categories.

I created 2 lists on the home screen: A horizontal chip list with categories on the top and a card list with businesses listed below.

When a user clicks the event category, it’s supposed to go to another screen that has all businesses within that category, of course.

So looking at the API, both collections have “post_category” and nested has 3 values: ID, name, and slug.

I feel like the documentation on external API could be much more detailed.

I’ve tried dozens of combinations following several different forum posts about external collections and relationships and I can’t seem to get this right.

For example, in this screenshot using postman to get the API data, this business has a post_category ID of 22. https://snipboard.io/fMvOpZ.jpg

What are the query params that I would use to get all businesses that have a post category of 22 to display when a user clicks on that category on the chip list?

Hello,

Were you able to find a solution to filter the results by categories?

Thanks

I sure did. Since I’m using the wp geodirectory plugin, I was able to create external collections for the posts and post categories, which I was able to filter using a gd_placecategory query parameter.

2 Likes

Hello,

Thanks a lot.
How did you manage the pagination? To have more than 100 records.