Skip to main content

Create or update location

POST 

/site

Create or update a site. Requires admin permissions. Omit id to create a site.

The site is saved as sent: facilities replaces the stored facilities. locations replaces the site-level locations when it is present; leaving it out keeps the stored ones, and sending [] removes them all. Ids are assigned to any facility or location that lacks one, and ids you send back are kept.

A site, a facility and a location are separate levels. A site is a grouping label with no position. A facility has an outline (see /geo), an optional landing point and its locations. A location is a point under a facility or directly under the site. A gate is a location. Appointments belong to a facility or a location inside one, never to a site.

The save is refused with 409 (place_referenced) when it would remove a facility or location that something still uses, or turn a facility or facility location into a site-level location while appointment configuration is keyed to it. A gate or an asset does not block moving a place to the site level, because the id is kept.

Request​

Responses​

successful operation