Skip to content

Sites

A site is a top-level physical location (warehouse, factory floor, campus). Sites contain Areas; areas contain everything else.

Quick reference

Method What it does
client.sites.list() All sites in scope.
client.sites.create(name, *, shift=None, **fields) Create a site.
client.sites.update(uid, *, name=None, shift=None) Update — name and shift only (conservative allowlist).
client.sites.delete(uid) Delete; cascades server-side to areas, floorplans, anchors, zones.

Reading and writing

sites = client.sites.list()
site = client.sites.create(name="Warehouse 12")
client.sites.update(site.uid, name="Warehouse 12 — Bay 2")
client.sites.delete(site.uid)

create accepts wider fields (address, country, timezone, …) via **fields because the server's create surface is wider than its update surface. update strictly accepts only name and shift — passing anything else raises ValueError before the HTTP call. This matches the JS reference client's intentional conservatism on location updates (RESEARCH Discrepancy #13).

Cascade contract

Deleting a site removes the site and every area, floorplan, anchor, and zone scoped under it — server-side. The SDK does not pre-emptively delete children; it issues one DELETE.

Model — Site

Field Type Notes
uid str Server-assigned.
name str \| None Display name.
shift Any Shift configuration (deployment-variable: dict or list).
address str \| None Optional.
country str \| None Optional.
timezone str \| None Optional.

Full field list.

  • Parent of: Areas, which in turn contain Floorplans, Anchors, and Zones.
  • Alarms: client.alarms.list_for_site(uid=...) and reports.alarms_csv(site_uid=...).

See also

  • Error handlingValueError from the conservative update allowlist.