curl --request GET \
--url https://api.wppfy.com/proxy-managed/citiesimport requests
url = "https://api.wppfy.com/proxy-managed/cities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.wppfy.com/proxy-managed/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wppfy.com/proxy-managed/cities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/proxy-managed/cities"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wppfy.com/proxy-managed/cities")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/proxy-managed/cities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"country": "br",
"state": "sp",
"cities": [
{
"value": "campinas",
"label": "Campinas",
"state": "sp",
"state_label": "São Paulo",
"raw_city": "campinas"
},
{
"value": "saopaulo",
"label": "São Paulo",
"state": "sp",
"state_label": "São Paulo",
"raw_city": "sao_paulo"
}
]
}Internal Proxy - List available cities
Returns the list of cities available for use in the
proxy_managed_country, proxy_managed_state and proxy_managed_city fields of the
POST /instance/connect endpoints.
Successful responses send Cache-Control: public, max-age=300. If the
city catalog is temporarily unavailable, try again
after the interval indicated in the response.
- Authentication: public endpoint, no
token. - Protection: limit of 120 requests per minute per IP; exceeding it returns
429withRetry-After. - Query
country(optional): lowercase ISO alpha-2. Defaultbr. - Query
state(optional): lowercase state/subdivision, such assp. - Query
search(optional): partial filter by name/slug, accent- and case-insensitive.
How to choose the city:
- Use
brinproxy_managed_country. - Call
GET /proxy-managed/cities?country=brto get the Brazilian cities. - When the city returns
state, also send that value inproxy_managed_state. - When the user chooses a city, send in
/instance/connect:proxy_managed_country: the chosen country, e.g.brproxy_managed_state: thestatereturned by the city, e.g.sp, when availableproxy_managed_city: alwayscities[].value
If state is not present in the selected city, send only proxy_managed_country and proxy_managed_city.
The API validates the combination and returns an error if any required data is missing.
Request example:
GET /proxy-managed/cities?country=br&state=sp&search=camp
curl --request GET \
--url https://api.wppfy.com/proxy-managed/citiesimport requests
url = "https://api.wppfy.com/proxy-managed/cities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.wppfy.com/proxy-managed/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wppfy.com/proxy-managed/cities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/proxy-managed/cities"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wppfy.com/proxy-managed/cities")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/proxy-managed/cities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"country": "br",
"state": "sp",
"cities": [
{
"value": "campinas",
"label": "Campinas",
"state": "sp",
"state_label": "São Paulo",
"raw_city": "campinas"
},
{
"value": "saopaulo",
"label": "São Paulo",
"state": "sp",
"state_label": "São Paulo",
"raw_city": "sao_paulo"
}
]
}Query Parameters
ISO alpha-2 (lowercase). Default br.
^[a-z]{2}$Filters by state/subdivision when the catalog provides state. For Brazil, use values such as sp, rj, mg.
^[a-z0-9-]{1,16}$Partial filter by name/slug (accent- and case-insensitive).
