sites

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).

post/sites

Request

  • Base URL: https://api.coperniq.io/v1
  • URL: https://api.coperniq.io/v1/sites
  • Auth: API key in header x-api-key

Request body

accountIdinteger required

ID of the account this site belongs to.

fullAddressstring

Full address string. Either fullAddress or geoLocation must be provided.

geoLocationstring

Latitude/longitude as "lat,lng". Either fullAddress or geoLocation must be provided.

titlestring

Human-readable label for the site.

streetstring
citystring
statestring
zipcodestring

Response

Duplicate site found — existing site returned

idinteger

Unique site ID.

accountIdinteger

ID of the account this site belongs to.

titlestring nullable

Human-readable label for the site (e.g. "Main Office").

fullAddressstring nullable

Full formatted address string.

streetstring nullable
citystring nullable
statestring nullable
zipcodestring nullable
geoLocationstring nullable

Latitude/longitude as "lat,lng" (e.g. "37.7749,-122.4194").

timezonestring nullable

IANA timezone string (e.g. "America/Los_Angeles").

createdAtstring date-time nullable
updatedAtstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.