⌘K
POST /datasets/service-areas/:type
Returns the water or sewerage service area(s), and the company operating each, that intersect a given site geometry.
Base URL: https://api.geocerta.io
Sandbox URL: https://api-staging.geocerta.io
Authentication required. Include your API key in the
api-keyheader. See Authentication.
Endpoint
POST /datasets/service-areas/:type
Content-Type: application/json
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
type | "water" | "sewerage" | Yes | Which service-area dataset to query. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
wkt | string | Yes | The site geometry as a WKT string in British National Grid (EPSG:27700), with coordinates as easting northing. Typically a POLYGON but MULTIPOLYGON and POINT are also accepted. Use POST /geometry/data to convert a WGS84 GeoJSON geometry into a ready-to-submit BNG WKT string. |
Response
200 OK — returns an array of matching service-area rows. Empty array [] when no service area intersects the site.
Response Fields
| Field | Type | Description |
|---|---|---|
service_area | string | Name of the service area polygon that intersects the site. |
company | string | The company that operates this service area. |
company_type | string | The kind of operator (e.g. water, sewerage). |
A site can intersect more than one service area at boundary regions; in that case multiple rows are returned.
Errors
| Status | Message | Cause |
|---|---|---|
400 | Bad Request | :type is not water or sewerage, or the body is missing/empty wkt. |
401 | Unauthorized | Missing or invalid API key. |
Example
Water service area:
curl -X POST https://api.geocerta.io/datasets/service-areas/water \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-d '{
"wkt": "POLYGON((529968 179968, 530033 179968, 530033 180033, 529968 180033, 529968 179968))"
}'Sewerage service area:
curl -X POST https://api.geocerta.io/datasets/service-areas/sewerage \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-d '{
"wkt": "POLYGON((529968 179968, 530033 179968, 530033 180033, 529968 180033, 529968 179968))"
}'