Procurar empresas de água por local
RegistosGET /areas/search
Answers "who serves this place?" without sign-in: matches the text against the active service areas of approved, active utilities and returns one listing per matching area, with the utility's name, its slug for public brand files and the area's name. No customer data or counts are returned. q must be 2 to 100 characters after trimming, or the response is 400.
Parâmetros
qPlace name to look for, 2 to 100 characters; matched against service area names.
limitMaximum number of listings, default 5. Values above 20 are reduced to 20; zero, negative or non-numeric values return 400.
Devolve
200 Matching area listings
Mostrar atributos
dataMatching listings
Mostrar atributos filhos
tenant_idIdentifier of the utility serving the area
tenant_slugUtility slug for its public brand files (GET /branding/tenants/{slug}/assets/{kind})
utility_nameThe utility's trading name
localityName of the matching service area
profiledWhether the utility has a public profile; basic listings are
falsecoverage_noteOptional note about coverage in the area
contact_phoneOptional public contact phone
estimate_min_centsOptional lower bound of a new connection estimate
estimate_max_centsOptional upper bound of a new connection estimate
currencyCurrency of the estimate
queryThe trimmed search text
Erros 400
curl -X GET "$PUBLIC_API/areas/search"
# Sem comando CLI equivalente; use cURL ou HTTP directo.
const res = await fetch("$PUBLIC_API/areas/search", {
method: "GET"
});
const data = await res.json();
import requests
res = requests.get(
"$PUBLIC_API/areas/search"
)
data = res.json()
req, _ := http.NewRequest("GET", "$PUBLIC_API/areas/search", nil)
resp, err := http.DefaultClient.Do(req)
{
"data": [
{
"tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
"tenant_slug": "tenant slug",
"utility_name": "Ana Matsinhe",
"locality": "Machava",
"profiled": true,
"coverage_note": "coverage note",
"contact_phone": "+258841234567",
"estimate_min_cents": 1,
"estimate_max_cents": 1,
"currency": "MZN"
}
],
"query": "query"
}