# Job Sites

Manage job sites (geofences) — the circles the GPS tracking report matches stored points against, and the source of its `job_site_id` filter values. Matching is recomputed on every report request and never stored, so creating, moving or deleting a site also changes how already-recorded points are attributed. A site with no assigned members applies to EVERYONE — read `applies_to_everyone`; team-level assignments made in the dashboard count towards that flag but are not exposed here. Every action 404s while the workspace's Mobile GPS Tracking toggle (Settings → Features) is off — nothing is deleted, access returns with the toggle. No plan restriction. The public id is an opaque encoded string (422 on an invalid one); `project_id` and `member_ids` are raw integers. Owner / Executive Manager only, including the reads.

 - [GET /job-sites](https://api-docs.webwork-tracker.com/api/job-sites/getjobsites.md): List the workspace's job sites (geofences), paginated — each row's `id` is the `job_site_id` the GPS tracking report filters on. Optional filters: `project_id` and `search` (substring of the name; `%`
 - [POST /job-sites](https://api-docs.webwork-tracker.com/api/job-sites/createjobsite.md): Create a job site: a circle defined by `name`, `latitude` (-90..90), `longitude` (-180..180) and `radius` in metres (50–50000, whole numbers). Coordinates are stored as decimal(10,7); the response ret
 - [GET /job-sites/{job_site_id}](https://api-docs.webwork-tracker.com/api/job-sites/getjobsite.md): Retrieve one job site with its project, assigned members, and who is inside it right now. A malformed or cross-workspace id answers 422; a deleted site answers 404. **Access**: Owner/Executive Manager
 - [PUT /job-sites/{job_site_id}](https://api-docs.webwork-tracker.com/api/job-sites/updatejobsite.md): Update a job site. PARTIAL — send only the fields that change; omitted fields keep their value, and an empty body returns 422. Member assignments are untouched unless `member_ids` is present; an empty
 - [DELETE /job-sites/{job_site_id}](https://api-docs.webwork-tracker.com/api/job-sites/deletejobsite.md): Hard-delete a job site and its assignments — there is no soft delete. GPS points survive; the report just stops attributing them to the site, for past dates as well as future ones. **Access**: Owner/E
