Create Site
Create a new site record belonging to an account.
Required fields:
- `accountId`: The account this site belongs to.
- `fullAddress` or `geoLocation`: At least one must be provided. The backend geocodes `fullAddress` to derive coordinates.
If a site with the same address already exists for the same account, the existing site is returned instead of creating a duplicate (`200` instead of `201`).
Authentication
x-api-keystring
API Key authentication via header
Request
This endpoint expects an object.
accountId
ID of the account this site belongs to.
fullAddress
Full address string. Either fullAddress or geoLocation must be provided.
geoLocation
Latitude/longitude as “lat,lng”. Either fullAddress or geoLocation must be provided.
title
Human-readable label for the site.
street
city
state
zipcode
Response
Duplicate site found — existing site returned
id
Unique site ID.
accountId
ID of the account this site belongs to.
title
Human-readable label for the site (e.g. “Main Office”).
fullAddress
Full formatted address string.
street
city
state
zipcode
geoLocation
Latitude/longitude as “lat,lng” (e.g. “37.7749,-122.4194”).
timezone
IANA timezone string (e.g. “America/Los_Angeles”).
createdAt
updatedAt
Errors
400
Bad Request Error
401
Unauthorized Error
