View Single Post
Old 05-06-2022, 09:19 AM  
drexl
Whale Hunter
 
drexl's Avatar
 
Industry Role:
Join Date: Jan 2016
Posts: 930
I found out how do do this: as I assumed, pass the country code like so to filter the list by geo blocks: country=XX

I've done a couple of tests and it worked: adding country=co then models with geobans like [co] disappeared from the response.

Another way is to add fields=geobans to your querystring and then add a piece of code to filter out models in the response that have a geoban in the country where your visitor is.

I'll go with option 1 since the logic is on the API side. Anyway if you don't specify a value, the documentation states it's going to take the ip of the caller by default, which, in the case of a server side implementation (LAMP for example) is going to be the ip of the server (which is not what you want).

That's for the list page.

Don't take my word for it, verify for yourself and/or ask your AM.
drexl is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote