Areas

Base URL: $PUBLIC_API

The object

tenant_idstring · required

Identifier of the utility serving the area

tenant_slugstring · optional

Utility slug for its public brand files (GET /branding/tenants/{slug}/assets/{kind})

utility_namestring · required

The utility's trading name

localitystring · required

Name of the matching service area

profiledboolean · required

Whether the utility has a public profile; basic listings are false

coverage_notestring · optional

Optional note about coverage in the area

contact_phonestring · optional

Optional public contact phone

estimate_min_centsinteger (int64) · optional

Optional lower bound of a new connection estimate

estimate_max_centsinteger (int64) · optional

Optional upper bound of a new connection estimate

currencystring · optional

Currency of the estimate

The object
{
  "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"
}

Find the utilities that serve a place

Logs

GET /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.

Parameters

qstring · query · required

Place name to look for, 2 to 100 characters; matched against service area names.

limitinteger · query · optional · default 5

Maximum number of listings, default 5. Values above 20 are reduced to 20; zero, negative or non-numeric values return 400.

Returns

200 Matching area listings

Show attributes
dataarray of PublicAreaListing · required

Matching listings

Show child attributes
tenant_idstring · required

Identifier of the utility serving the area

tenant_slugstring · optional

Utility slug for its public brand files (GET /branding/tenants/{slug}/assets/{kind})

utility_namestring · required

The utility's trading name

localitystring · required

Name of the matching service area

profiledboolean · required

Whether the utility has a public profile; basic listings are false

coverage_notestring · optional

Optional note about coverage in the area

contact_phonestring · optional

Optional public contact phone

estimate_min_centsinteger (int64) · optional

Optional lower bound of a new connection estimate

estimate_max_centsinteger (int64) · optional

Optional upper bound of a new connection estimate

currencystring · optional

Currency of the estimate

querystring · required

The trimmed search text

Errors 400

curl -X GET "$PUBLIC_API/areas/search"
Response 200
{
  "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"
}