Sites
List Sites
Section titled “List Sites”Retrieves a paginated list of sites.
Endpoint: GET /sites
Authentication: Required (API Key)
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer[] | No | Filter sites by one or more site IDs. |
_page |
integer | No | Page number (positive integer, defaults to 1) |
_pageSize |
integer | No | Number of items per page (positive integer, max varies by configuration) |
_sortBy |
string | No | Sort order. Format: +field for ascending or -field for descending. |
Response Format
Section titled “Response Format”Returns a paginated response with the following structure:
{ "data": [ { "id": "integer", "company_id": "integer", "name": "string", "type": "string", "stage": "string", "coordinates": { "type": "Point", "coordinates": ["number", "number"] } | null, "geo_area": "number", "peak_power": "number | null", "ac_power": "number | null", "address_line1": "string | null", "address_line2": "string | null", "address_line3": "string | null" } ], "pagination": { "page": "integer", "pageSize": "integer", "rowCount": "integer", "pageCount": "integer" }}Response Fields
Section titled “Response Fields”Every site in data contains all of the fields below. Fields that have no value are returned as
null; they are never omitted.
- id: Integer ID of the site
- company_id: Integer ID of the company that owns the site
- name: Name of the site
- type: Site type, one of
SOLAR,GENERIC,AGRICULTURE,WIND,HYDRO,STORAGE,CHARGING,ROAD. Nevernull - stage: Site stage, one of
PLANNING,CONSTRUCTION,OPERATION. Nevernull - coordinates: GeoJSON Point at the centroid of the site boundary. The
coordinatesarray is[longitude, latitude](WGS 84), longitude first as GeoJSON requires.nullwhen the site boundary is empty - geo_area: Area of the site boundary in square metres (m²).
0when the site boundary is empty - peak_power: Peak power of the site in megawatt-peak (MWp).
nullwhen not set - ac_power: AC power of the site in megavolt-ampere (MVA).
nullwhen not set - address_line1, address_line2, address_line3: Address lines of the site.
nullwhen not set
Example Requests
Section titled “Example Requests”List all sites:
curl -X GET "https://api.sitemark.com/sites?_page=1&_pageSize=25" \ -H "Authorization: ApiKey your-api-key-here"Filter by single site ID:
curl -X GET "https://api.sitemark.com/sites?id=1234&_page=1&_pageSize=25" \ -H "Authorization: ApiKey your-api-key-here"Filter by multiple site IDs (without brackets):
curl -X GET "https://api.sitemark.com/sites?id=1234&id=1235&_page=1&_pageSize=25" \ -H "Authorization: ApiKey your-api-key-here"Filter by multiple site IDs (with brackets):
curl -X GET "https://api.sitemark.com/sites?id[]=1234&id[]=1235&_page=1&_pageSize=25" \ -H "Authorization: ApiKey your-api-key-here"Example Response
Section titled “Example Response”{ "data": [ { "id": 1234, "company_id": 5678, "name": "Downtown Construction Site", "type": "SOLAR", "stage": "CONSTRUCTION", "coordinates": { "type": "Point", "coordinates": [4.3517, 50.8503] }, "geo_area": 452310.75, "peak_power": 12.5, "ac_power": 10, "address_line1": "Rue de la Loi 16", "address_line2": null, "address_line3": "1000 Brussels" }, { "id": 1235, "company_id": 5678, "name": "Industrial Park Development", "type": "GENERIC", "stage": "PLANNING", "coordinates": { "type": "Point", "coordinates": [5.5796, 50.6326] }, "geo_area": 128004.2, "peak_power": null, "ac_power": null, "address_line1": null, "address_line2": null, "address_line3": null } ], "pagination": { "page": 1, "pageSize": 25, "rowCount": 2, "pageCount": 1 }}Error Responses
Section titled “Error Responses”| Status Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 400 | Bad Request - Invalid query parameters |
| 500 | Internal Server Error |