Skip to content

Create location​

POST
/locations

Creates a location in the selected organization and initializes its durable object. Name and timezone are required; geographic details, public or roaming settings, and pricing can be supplied when available.

Use cases

  • Set up a charging site before associating chargers with it.
  • Publish a location with its tariff and electricity-cost data.

Related endpoints

  • GET /locations/{locationId} — inspect the created location.
  • PATCH /locations/{locationId} — add or change location details.
  • GET /chargers — find chargers associated with locations.

Authorizations​

bearerAuth

Generate an API token here

Type
HTTP (bearer)

Parameters​

Header Parameters

compatibility-date*

API compatibility date in YYYY-MM-DD format. Must be a date after 2025-11-01.

Type
string
Required
Example"2025-11-02"
Pattern
^\d{4}-\d{2}-\d{2}$
organization-id*

Routes the request to the organization named by this ID. The bearer token must be authorized for that organization.

Type
string
Required
Example"3b241101-e2bb-4255-8caf-4136c566a962"
Min Length
1
Max Length
40

Request Body​

application/json
Min Length1
Max Length40

IANA timezone used to interpret tariff dates and local-time restrictions.

Default"Etc/UTC"

Responses​

success.location.create

application/json

Playground​

Authorization
Headers
Body

Samples​