Skip to content

Sites

Retrieves a paginated list of sites.

Endpoint: GET /sites

Authentication: Required (API Key)

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.

Returns a paginated response with the following structure:

{
"data": [
{
"id": "integer",
"company_id": "integer",
"name": "string"
}
],
"pagination": {
"page": "integer",
"pageSize": "integer",
"rowCount": "integer",
"pageCount": "integer"
}
}
  • id: Integer ID of the site
  • company_id: Integer ID of the company that owns the site
  • name: Name of the site

List all sites:

Terminal window
curl -X GET "https://api.sitemark.com/sites?_page=1&_pageSize=25" \
-H "Authorization: ApiKey your-api-key-here"

Filter by single site ID:

Terminal window
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):

Terminal window
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):

Terminal window
curl -X GET "https://api.sitemark.com/sites?id[]=1234&id[]=1235&_page=1&_pageSize=25" \
-H "Authorization: ApiKey your-api-key-here"
{
"data": [
{
"id": 1234,
"company_id": 5678,
"name": "Downtown Construction Site"
},
{
"id": 1235,
"company_id": 5678,
"name": "Industrial Park Development"
}
],
"pagination": {
"page": 1,
"pageSize": 25,
"rowCount": 2,
"pageCount": 1
}
}
Status Code Description
401 Unauthorized - Invalid or missing API key
400 Bad Request - Invalid query parameters
500 Internal Server Error