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"
}
]
}Proxy Interno - Listar ciudades disponibles
Devuelve la lista de ciudades disponibles para usar en los campos
proxy_managed_country, proxy_managed_state y proxy_managed_city de los endpoints
POST /instance/connect.
Las respuestas exitosas envían Cache-Control: public, max-age=300. Si el
catálogo de ciudades está temporalmente no disponible, intente nuevamente
después del intervalo indicado en la respuesta.
- Autenticación: endpoint público, sin
token. - Protección: límite de 120 solicitudes por minuto por IP; el exceso devuelve
429conRetry-After. - Query
country(opcional): ISO alpha-2 en minúsculas. Defaultbr. - Query
state(opcional): estado/subdivisión en minúsculas, comosp. - Query
search(opcional): filtro parcial por nombre/slug, sin distinguir acentos ni mayúsculas.
Cómo elegir la ciudad:
- Use
brenproxy_managed_country. - Llame a
GET /proxy-managed/cities?country=brpara obtener las ciudades brasileñas. - Cuando la ciudad devuelva
state, envíe también ese valor enproxy_managed_state. - Cuando el usuario elija una ciudad, envíe en
/instance/connect:proxy_managed_country: el país elegido, ej.brproxy_managed_state: elstatedevuelto por la ciudad, ej.sp, cuando esté disponibleproxy_managed_city: siempre elcities[].value
Si state no viene en la ciudad seleccionada, envíe solo proxy_managed_country y proxy_managed_city.
La API valida la combinación y devuelve un error si falta algún dato necesario.
Ejemplo de solicitud:
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"
}
]
}Parámetros de consulta
ISO alpha-2 (minúsculas). Predeterminado br.
^[a-z]{2}$Filtra por estado/subdivisión cuando el catálogo incluye state. Para Brasil, use valores como sp, rj, mg.
^[a-z0-9-]{1,16}$Filtro parcial por nombre/slug (no distingue acentos ni mayúsculas).
