> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dalyenergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Location

> Create a new location with automatic elevation and timezone enrichment

# POST /locations

Create a new project location. The API automatically fetches elevation and timezone data from the provided coordinates if those fields are not supplied in the request body.

## Notes

* Requires a valid JWT with write access.
* `name` is required. `latitude` and `longitude` are expected for most workflows; the deprecated `lat`/`lng` aliases are still accepted but should not be used for new integrations.
* If `elevation` is omitted, it is auto-fetched from an elevation service based on coordinates.
* Timezone (`timeZone` and `timeZoneName`) is always auto-detected from coordinates in the response.
* You can optionally include a nested `weatherData` object in the request body to create and link a weather data record in a single call. This follows the legacy creation pattern -- for more control, create weather data separately via `POST /weatherdata` and associate it by `locationId`.
* Optional fields include `streetAddress`, `ashrae` (ASHRAE climate zone index), `farShading` (horizon profile), and `soiling` (monthly soiling factors).
* See `GET /locations/{location_id}` to retrieve the created location.
* See `POST /weatherdata` or `POST /weatherdata/fetch` to create weather data independently.
