Skip to content

Regions

Geographic regions and region groups used for program eligibility and tariffs.

List regions

Request

List the regions created by your organisation plus public reference regions maintained by ev.energy (geometry omitted — retrieve a single region for its GeoJSON boundary).

Security
oauth2(Required scopes: region:read)
Query
page_beforestring[a-z]{4}[A-Z\d]{26}

Return results from the page after this ID.

Example:page_before=xmpl01HNFZM7Q8FXASZXYZ6XM3TQRR
page_afterstring[a-z]{4}[A-Z\d]{26}

Return results from the page before this ID.

Example:page_after=xmpl01HNFZM7Q8FXASZXYZ6XM3TQRR
page_sizeinteger, [ 1 .. 100 ]

Specify the number of results to return per page.

Default:25
Example:page_size=10
namestring

Exact region name.

name__instring

Comma-separated list of exact region names.

region_group_idstringrgrp[A-Z\d]{26}

Only regions belonging to this region group (uid). A group your organisation cannot read matches no regions.

typestring
Enum:"OTHER""ELECTRICITY"
containsstring^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(1...

latitude,longitude — only regions strictly containing this point (a point exactly on a region's boundary does not match).

Example:contains=42.2793,-71.1631
Headers
EvEnergy-Versionnumber

Specify the version of this endpoint to use.

Value:2
curl -i -X GET \
  'https://developers.ev.energy/_mock/ev.energy-api-v2/regions?page_before=xmpl01HNFZM7Q8FXASZXYZ6XM3TQRR&page_after=xmpl01HNFZM7Q8FXASZXYZ6XM3TQRR&page_size=10&name=string&name__in=string&region_group_id=string&type=OTHER&contains=42.2793%2C-71.1631' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'EvEnergy-Version: 2'

Responses

OK

Headers
EvEnergy-Versionnumber

Indicates the version of the API that generated this response. If EvEnergy-Version was not specified in the request, this will be your OAuth application's default version.

Value:2
X-RateLimit-Limitnumber

The maximum number of requests that can be made to this endpoint per hour. Defaults to 1000 but may vary per client.

Default:1000
X-RateLimit-Remainingnumber

The number of requests remaining until this client's rate limit is reached.

Default:999
Bodyapplication/json
Array [
idstringregn[A-Z\d]{26}read-only
Example:"regn01JCK1HPNAANB8WN253G27SFPC"
urlstring, (uri)read-only
Example:"https://api.ev.energy/v2/regions/regn01JCK1HPNAANB8WN253G27SFPC"
namestring

Globally unique region name. Immutable after creation.

Example:"WEST ROXBURY"
typestring or null

Optional classification of the region.

Enum:"OTHER""ELECTRICITY"null
region_groupsArray of strings, (uri)read-only

URLs of the region groups this region belongs to that your organisation can read.

is_publicbooleanread-only

True for reference regions maintained by ev.energy and listed to every organisation; false for regions only your organisation can see.

Example:false
created_atstring, (date-time)read-only
updated_atstring, (date-time)read-only
]
Response
[ { "id": "regn01JCK1HPNAANB8WN253G27SFPC", "url": "https://api.ev.energy/v2/regions/regn01JCK1HPNAANB8WN253G27SFPC", "name": "WEST ROXBURY", "type": "OTHER", "region_groups": [ … ], "is_public": false, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]