{
  "openapi": "3.1.0",
  "info": {
    "description": "This API allows managing sites.",
    "title": "Sites API",
    "version": "1.0"
  },
  "externalDocs": {
    "description": "Trackunit Developer Hub",
    "url": "https://developers.trackunit.com/"
  },
  "servers": [
    {
      "url": "https://iris.trackunit.com/api/site/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "authorizationBearer": []
    }
  ],
  "tags": [
    {
      "description": "Operating on files connected to site ",
      "name": "SiteImage"
    },
    {
      "description": "Site Insights API",
      "name": "SiteInsights"
    },
    {
      "description": "Sites Kpis API",
      "name": "SitesKPIs"
    },
    {
      "description": "History of intervals where Sites contained Assets.",
      "name": "SiteHistory"
    },
    {
      "description": "Site Assets API",
      "name": "SiteAssets"
    },
    {
      "description": "Site Users API",
      "name": "SiteUsers"
    },
    {
      "description": "Site Contacts API",
      "name": "SiteContacts"
    },
    {
      "description": "Owning depot API",
      "name": "Manage owning depots"
    },
    {
      "description": "Intervals where Sites contained Assets. Deprecated: Use history api",
      "name": "SiteIntervals"
    },
    {
      "description": "Site suggestions are automatically detected areas based on asset movement. They can be used to create a Site, where the polygon will be copied to the site.",
      "name": "SiteSuggestions"
    }
  ],
  "paths": {
    "/assets/sites": {
      "post": {
        "description": "Get a list of sites an asset is on, for one or multiple assets at a time.",
        "operationId": "getSitesForAssets",
        "parameters": [
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The number of assets to be returned. The list may be larger than page size, if an asset is on multiple sites.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1
            }
          },
          {
            "description": "A comma separated list containing sort columns, each optionally prepended with + or - for direction.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetSitesForAssetsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSiteAssetRepresentation"
                }
              }
            },
            "description": "A list of all sites that contains the assets. The list may be larger than page size, if an asset is on multiple sites."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Sites An Asset Is On",
        "tags": [
          "SiteAssets"
        ]
      }
    },
    "/sites": {
      "get": {
        "description": "Get a comprehensive list of sites, including detailed information such as name, area, location, and polygons associated with each site.",
        "operationId": "getSites",
        "parameters": [
          {
            "description": "A list containing siteIds of desired sites.",
            "in": "query",
            "name": "queryIds",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20,
              "minItems": 0,
              "uniqueItems": true
            }
          },
          {
            "description": "A list containing types of desired sites.",
            "in": "query",
            "name": "types",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "CONSTRUCTION_SITE",
                  "DEPOT",
                  "WORK_PLACE",
                  "AREA",
                  "CLASSIC_ZONE",
                  "CLASSIC_POI"
                ]
              },
              "maxItems": 20,
              "minItems": 0,
              "uniqueItems": true
            }
          },
          {
            "description": "A list containing status of desired sites.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PLANNED",
                  "ACTIVE",
                  "FINISHED",
                  "ARCHIVED"
                ]
              },
              "maxItems": 20,
              "minItems": 0,
              "uniqueItems": true
            }
          },
          {
            "description": "Limits to only include sites that existed _after_ `fromTime`. Is meant to be used with the `toTime` parameter in order to set a time range.",
            "in": "query",
            "name": "fromTime",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Limits to only include sites that existed _before_ `toTime`. Is meant to be used with the `fromTime` parameter in order to set a time range.",
            "in": "query",
            "name": "toTime",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Limits to only include items which name contains the given string. When both filters (nameContains and searchFilter) are filled in result will be filtered only using searchFilter. Comparison is case-insensitive.",
            "in": "query",
            "name": "nameContains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Limits the only include items which names and addresses data (country, city, zip code and street) contains the given string (words separated by space). When both filters (nameContains and searchFilter) are filled in result will be filtered only using searchFilter.",
            "in": "query",
            "name": "searchFilter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Reference used for third party integration",
            "in": "query",
            "name": "externalReference",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "description": "A comma separated list containing sort columns, each optionally prepended with + or - for direction.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 0
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSiteRepresentation"
                }
              }
            },
            "description": "Filtered list of all sites."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Sites"
      },
      "post": {
        "description": "Create a site within your account to gain access to on-site assets and their historical data.\n\nTo create a new site, you must provide either a polygon or a suggestionId. If both are provided, the polygon will take precedence.\n\nFor sites of type DEPOT, if an address is provided without a polygon or suggestionId, a polygon will be automatically generated from the address using Google’s Geocoding API.\n\nIf none of the required fields are provided, an error will be returned.\n",
        "operationId": "createSite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSiteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/SiteRepresentation"
                }
              }
            },
            "description": "Newly created site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create Site"
      }
    },
    "/sites/assets": {
      "post": {
        "description": "Get a list of assets currently located on-site, for one or multiple sites at a time.",
        "operationId": "getAssetsForSites",
        "parameters": [
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The number of assets to be returned. The list may be larger than page size, if an asset is on multiple sites.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1
            }
          },
          {
            "description": "A comma separated list containing sort columns, each optionally prepended with + or - for direction.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetAssetsForSitesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSiteAssetRepresentation"
                }
              }
            },
            "description": "A list of all assets within a site. The list may be larger than page size, if an asset is on multiple sites."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get On-Site Assets",
        "tags": [
          "SiteAssets"
        ]
      }
    },
    "/sites/history": {
      "get": {
        "description": "Retrieve comprehensive site history, encompassing either asset intervals within a list of sites or the sites visited by a list of assets.",
        "operationId": "getHistory",
        "parameters": [
          {
            "description": "A list containing siteIds of desired data. If null, all sites could be returned.",
            "in": "query",
            "name": "siteIds",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20,
              "minItems": 0
            }
          },
          {
            "description": "A list containing assetIds of desired data. If null, all assets could be returned.",
            "in": "query",
            "name": "assetIds",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20,
              "minItems": 0
            }
          },
          {
            "description": "Limits to only include history that ended _after_ `fromTime`. Is meant to be used with the `toTime` parameter in order to set a time range.",
            "in": "query",
            "name": "fromTime",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Limits to only include history that started _before_ `toTime`. Is meant to be used with the `fromTime` parameter in order to set a time range.",
            "in": "query",
            "name": "toTime",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Minimum length of interval, in seconds",
            "in": "query",
            "name": "minIntervalSeconds",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "Maximum length of interval, in seconds",
            "in": "query",
            "name": "maxIntervalSeconds",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "Zero-based page index (0..N)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 10000,
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedIntervalRepresentation"
                }
              }
            },
            "description": "A list of history."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site History",
        "tags": [
          "SiteHistory"
        ]
      }
    },
    "/sites/insights": {
      "get": {
        "operationId": "getInsightsForSites",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "query",
            "name": "siteIds",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20,
              "minItems": 0,
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InsightResponse"
                  }
                }
              }
            },
            "description": "A list of insights for site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Sites Insights",
        "tags": [
          "SiteInsights"
        ]
      },
      "post": {
        "operationId": "getInsights",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetInsightsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InsightResponse"
                  }
                }
              }
            },
            "description": "A list of insights for site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Sites Insights",
        "tags": [
          "SiteInsights"
        ]
      }
    },
    "/sites/intervals": {
      "get": {
        "deprecated": true,
        "description": "Retrieve comprehensive site history, encompassing either asset intervals within a list of sites or the sites visited by a list of assets.",
        "operationId": "searchIntervals",
        "parameters": [
          {
            "description": "A list containing siteIds of desired data. If null, all sites could be returned.",
            "in": "query",
            "name": "siteIds",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20,
              "minItems": 0
            }
          },
          {
            "description": "A list containing assetIds of desired data. If null, all assets could be returned.",
            "in": "query",
            "name": "assetIds",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20,
              "minItems": 0
            }
          },
          {
            "description": "Limits to only include intervals that ended _after_ `fromTime`. Is meant to be used with the `toTime` parameter in order to set a time range.",
            "in": "query",
            "name": "fromTime",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Limits to only include intervals that started _before_ `toTime`. Is meant to be used with the `fromTime` parameter in order to set a time range.",
            "in": "query",
            "name": "toTime",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Zero-based page index (0..N)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedIntervalRepresentation"
                }
              }
            },
            "description": "A list of intervals."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site Intervals",
        "tags": [
          "SiteIntervals"
        ]
      }
    },
    "/sites/kpis": {
      "get": {
        "operationId": "getKpisForSite",
        "parameters": [
          {
            "description": "A list containing types of desired data.",
            "in": "query",
            "name": "types",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "CONSTRUCTION_SITE",
                  "DEPOT",
                  "WORK_PLACE",
                  "AREA",
                  "CLASSIC_ZONE",
                  "CLASSIC_POI"
                ]
              },
              "maxItems": 20,
              "minItems": 0,
              "uniqueItems": true
            }
          },
          {
            "description": "A list containing status of desired data.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PLANNED",
                  "ACTIVE",
                  "FINISHED",
                  "ARCHIVED"
                ]
              },
              "maxItems": 20,
              "minItems": 0,
              "uniqueItems": true
            }
          },
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "description": "A comma separated list containing sort columns, each optionally prepended with + or - for direction.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 0
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedKpiResponse"
                }
              }
            },
            "description": "A list of kpis for site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Sites KPIs",
        "tags": [
          "SitesKPIs"
        ]
      }
    },
    "/sites/suggestions": {
      "post": {
        "description": "Get automatically detected sites based on your assets' locations. The suggested sites reflect locations where your assets are or have been previously.",
        "operationId": "getSiteSuggestions",
        "parameters": [
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "description": "A comma separated list containing sort columns, each optionally prepended with + or - for direction.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoundingBox"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSiteSuggestionRepresentation"
                }
              }
            },
            "description": "A list of site suggestion."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site Suggestions",
        "tags": [
          "SiteSuggestions"
        ]
      }
    },
    "/sites/suggestions/{id}": {
      "get": {
        "description": "Get automatically detected site. The suggested site reflect locations where your assets are or have been previously.",
        "operationId": "getSiteSuggestion",
        "parameters": [
          {
            "description": "Site suggestion id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/SiteSuggestionRepresentation"
                }
              }
            },
            "description": "Site suggestion metadata."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site Suggestion",
        "tags": [
          "SiteSuggestions"
        ]
      }
    },
    "/sites/{siteId}": {
      "delete": {
        "description": "Delete site by siteId. Once deleted, all linked information will be unavailable, including site history and metadata.",
        "operationId": "deleteSite",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Site was deleted."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete Site"
      },
      "get": {
        "description": "Get a site by siteId, including detailed information such as name, area, location and polygon associated with the site.",
        "operationId": "getSite",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/SiteRepresentation"
                }
              }
            },
            "description": "Site metadata."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site"
      },
      "patch": {
        "description": "Edit site information.",
        "operationId": "updateSite",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSiteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/SiteRepresentation"
                }
              }
            },
            "description": "Updated site metadata."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Update Site"
      }
    },
    "/sites/{siteId}/contacts": {
      "get": {
        "description": "Get a list of contacts for a site.",
        "operationId": "getContacts",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "description": "A comma separated list containing sort columns, each optionally prepended with + or - for direction.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 0
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedContactResponse"
                }
              }
            },
            "description": "A list of contacts for site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site Contacts",
        "tags": [
          "SiteContacts"
        ]
      },
      "post": {
        "description": "Add contact information of the person responsible for this site.",
        "operationId": "createContact",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            },
            "description": "Newly created contact."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Create Site Contact",
        "tags": [
          "SiteContacts"
        ]
      }
    },
    "/sites/{siteId}/contacts/{contactId}": {
      "delete": {
        "description": "Delete contact information of the person responsible for this site.",
        "operationId": "deleteContact",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Contact ID.",
            "in": "path",
            "name": "contactId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contact was deleted."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete Site Contact",
        "tags": [
          "SiteContacts"
        ]
      },
      "patch": {
        "description": "Update contact information of the person responsible for this site.",
        "operationId": "updateContact",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Contact ID.",
            "in": "path",
            "name": "contactId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            },
            "description": "Updated contact."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Update Site Contact",
        "tags": [
          "SiteContacts"
        ]
      }
    },
    "/sites/{siteId}/images": {
      "get": {
        "operationId": "getSiteImages",
        "parameters": [
          {
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {}
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get list of all images for a site",
        "tags": [
          "SiteImage"
        ]
      },
      "post": {
        "operationId": "uploadImage",
        "parameters": [
          {
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteImageResponse"
                }
              }
            },
            "description": "Site image uploaded"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "File image too large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Upload a new image for a site",
        "tags": [
          "SiteImage"
        ]
      }
    },
    "/sites/{siteId}/images/{imageId}": {
      "delete": {
        "operationId": "deleteImage",
        "parameters": [
          {
            "in": "path",
            "name": "imageId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Site image deleted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Delete site image",
        "tags": [
          "SiteImage"
        ]
      }
    },
    "/sites/{siteId}/insights": {
      "get": {
        "operationId": "getInsightsForSite",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/InsightResponse"
                }
              }
            },
            "description": "A list of insights for site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site Insight",
        "tags": [
          "SiteInsights"
        ]
      }
    },
    "/sites/{siteId}/owned-assets": {
      "get": {
        "description": "Returns all asset that are owned by depot site.",
        "operationId": "getOwnedAssets",
        "parameters": [
          {
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {}
            },
            "description": "Returns list of owning relation between depot site and assets"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Owned Assets",
        "tags": [
          "Manage owning depots"
        ]
      }
    },
    "/sites/{siteId}/owned-assets/{assetId}": {
      "delete": {
        "description": "Removes owning depot relation between asset and a site.",
        "operationId": "removeOwningDepotAsset",
        "parameters": [
          {
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "content": {
              "application/json": {}
            },
            "description": "Removing owning relation between depot site and asset"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Remove Owning Depot from Asset",
        "tags": [
          "Manage owning depots"
        ]
      },
      "post": {
        "description": "Assigns new owning relation between depot and asset if not exists. Overrides existing depot asset relation within the same account.",
        "operationId": "assignOwningDepotAsset",
        "parameters": [
          {
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {}
            },
            "description": "Newly created owning relation between depot site and asset"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Assign Owning Depot to Asset",
        "tags": [
          "Manage owning depots"
        ]
      }
    },
    "/sites/{siteId}/users": {
      "get": {
        "description": "Get users who has permissions to all assets on this site. People with access to all assets are NOT in the result. They will be able to see the assets on site as soon as it is created.",
        "operationId": "getUsersForSite",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Zero-based page index (0..N).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned.",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/SiteUsersResponse"
                }
              }
            },
            "description": "A list of all users that has view permissions to the assets on the site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get Site Users",
        "tags": [
          "SiteUsers"
        ]
      },
      "patch": {
        "description": "Add or remove users' permissions to all assets on this site.",
        "operationId": "patchUsers",
        "parameters": [
          {
            "description": "Site ID.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchUsersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Users were successfully added to the site."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Update Site Users",
        "tags": [
          "SiteUsers"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string",
            "example": "Aalborg",
            "maxLength": 255,
            "minLength": 0
          },
          "country": {
            "type": "string",
            "example": "DK",
            "maxLength": 255,
            "minLength": 0
          },
          "streetAddress": {
            "type": "string",
            "example": "Gasvaerksvej 24",
            "maxLength": 1024,
            "minLength": 0
          },
          "zipCode": {
            "type": "string",
            "example": 9000,
            "maxLength": 50,
            "minLength": 0
          }
        }
      },
      "AssetsReference": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          }
        }
      },
      "BoundingBox": {
        "type": "object",
        "description": "Geological representation of an area such that only polygons with center within that area matches.",
        "properties": {
          "northEast": {
            "$ref": "#/components/schemas/Location"
          },
          "southWest": {
            "$ref": "#/components/schemas/Location"
          }
        },
        "required": [
          "northEast",
          "southWest"
        ]
      },
      "ConstraintViolationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Alphanumeric code (snake case) describing use case specific error"
          },
          "message": {
            "type": "string",
            "description": "Detailed description of error"
          },
          "properties": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Additional properties to be included in the error response"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code"
          },
          "violations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Violation"
            }
          }
        }
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "example": "email@domain.com"
          },
          "fax": {
            "$ref": "#/components/schemas/Phone"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for contact.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "name": {
            "type": "string",
            "example": "Thomas Anderson"
          },
          "phone": {
            "$ref": "#/components/schemas/Phone"
          },
          "siteId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for the site the contact is for.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "title": {
            "type": "string",
            "example": "Manager"
          }
        },
        "required": [
          "id",
          "siteId"
        ]
      },
      "ContactsReference": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          }
        }
      },
      "CreateContactRequest": {
        "type": "object",
        "description": "Request for creating a contact for a site.",
        "properties": {
          "email": {
            "type": "string",
            "example": "email@domain.com"
          },
          "fax": {
            "$ref": "#/components/schemas/Phone"
          },
          "name": {
            "type": "string",
            "example": "Thomas Anderson",
            "maxLength": 100,
            "minLength": 0
          },
          "phone": {
            "$ref": "#/components/schemas/Phone"
          },
          "title": {
            "type": "string",
            "example": "Manager",
            "maxLength": 100,
            "minLength": 0
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateSiteRequest": {
        "type": "object",
        "description": "suggestionId or polygon must be set. If both is set, polygon will take precedence.",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "description": {
            "type": "string",
            "example": "Headquarter for Trackunit.",
            "maxLength": 2048,
            "minLength": 0
          },
          "externalReference": {
            "type": "string",
            "description": "Reference used for third party integration",
            "maxLength": 255,
            "minLength": 0
          },
          "name": {
            "type": "string",
            "example": "Trackunit HQ building",
            "maxLength": 255,
            "minLength": 0
          },
          "polygon": {
            "$ref": "#/components/schemas/Feature"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "suggestionId": {
            "type": "string",
            "format": "uuid",
            "description": "Reference to a suggestion. Use this to copy polygon from a suggestion. Can be omitted if polygon is set.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "type": {
            "type": "string",
            "enum": [
              "CONSTRUCTION_SITE",
              "DEPOT",
              "WORK_PLACE",
              "AREA",
              "CLASSIC_ZONE",
              "CLASSIC_POI"
            ],
            "example": "AREA"
          }
        },
        "required": [
          "name",
          "startDate",
          "type"
        ]
      },
      "DefaultError": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Alphanumeric code (snake case) describing use case specific error"
          },
          "message": {
            "type": "string",
            "description": "Detailed description of error"
          },
          "properties": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Additional properties to be included in the error response"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code"
          }
        }
      },
      "Feature": {
        "type": "object",
        "description": "GeoJSON feature",
        "externalDocs": {
          "url": "https://datatracker.ietf.org/doc/html/rfc7946#section-3.2"
        },
        "properties": {
          "geometry": {
            "$ref": "#/components/schemas/Geometry",
            "description": "GeoJSON Geometry type",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Point"
              },
              {
                "$ref": "#/components/schemas/Polygon"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "GeoJSON type"
          }
        }
      },
      "Geometry": {
        "description": "GeoJSON Geometry",
        "discriminator": {
          "propertyName": "type"
        },
        "externalDocs": {
          "url": "https://datatracker.ietf.org/doc/html/rfc7946#section-3.1"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/Point"
          },
          {
            "$ref": "#/components/schemas/Polygon"
          }
        ],
        "properties": {
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ]
      },
      "GetAssetsForSitesRequest": {
        "type": "object",
        "properties": {
          "siteIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 50,
            "minItems": 0,
            "uniqueItems": true
          }
        },
        "required": [
          "siteIds"
        ]
      },
      "GetInsightsRequest": {
        "type": "object",
        "properties": {
          "siteIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 50,
            "minItems": 0,
            "uniqueItems": true
          }
        },
        "required": [
          "siteIds"
        ]
      },
      "GetSitesForAssetsRequest": {
        "type": "object",
        "properties": {
          "assetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 50,
            "minItems": 0
          }
        },
        "required": [
          "assetIds"
        ]
      },
      "InsightResponse": {
        "type": "object",
        "properties": {
          "idleHoursLastDay": {
            "type": "number",
            "format": "double",
            "description": "Idle hours for site assets for the last day"
          },
          "idleHoursLastMonth": {
            "type": "number",
            "format": "double",
            "description": "Idle hours for site assets for the last month"
          },
          "idleHoursLastWeek": {
            "type": "number",
            "format": "double",
            "description": "Idle hours for site assets for the last week"
          },
          "siteId": {
            "type": "string",
            "format": "uuid"
          },
          "totalHoursLastDay": {
            "type": "number",
            "format": "double",
            "description": "Total hours for site assets for the last day"
          },
          "totalHoursLastMonth": {
            "type": "number",
            "format": "double",
            "description": "Total hours for site assets for the last month"
          },
          "totalHoursLastWeek": {
            "type": "number",
            "format": "double",
            "description": "Total hours for site assets for the last week"
          },
          "uniqueAssetsLastDay": {
            "type": "number",
            "format": "double",
            "description": "Unique asset for the last day"
          },
          "uniqueAssetsLastMonth": {
            "type": "number",
            "format": "double",
            "description": "Unique asset for the last month"
          },
          "uniqueAssetsLastWeek": {
            "type": "number",
            "format": "double",
            "description": "Unique asset or the last week"
          },
          "workingHoursLastDay": {
            "type": "number",
            "format": "double",
            "description": "Working hours for site assets for the last day"
          },
          "workingHoursLastMonth": {
            "type": "number",
            "format": "double",
            "description": "Working hours for site assets for the last month"
          },
          "workingHoursLastWeek": {
            "type": "number",
            "format": "double",
            "description": "Working hours for site assets for the last week"
          }
        },
        "required": [
          "siteId"
        ]
      },
      "IntervalRepresentation": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "format": "uuid"
          },
          "enteredAt": {
            "type": "string",
            "format": "date-time"
          },
          "leftAt": {
            "type": "string",
            "format": "date-time"
          },
          "siteId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "assetId",
          "enteredAt",
          "siteId"
        ]
      },
      "KpiResponse": {
        "type": "object",
        "properties": {
          "kpiType": {
            "type": "string",
            "enum": [
              "COUNT_BY_TYPE_AND_STATUS"
            ],
            "example": "COUNT_BY_TYPE_AND_STATUS"
          },
          "siteStatus": {
            "type": "string",
            "description": "Status of the site.",
            "enum": [
              "PLANNED",
              "ACTIVE",
              "FINISHED",
              "ARCHIVED"
            ],
            "example": "ACTIVE"
          },
          "siteType": {
            "type": "string",
            "description": "Type of site.",
            "enum": [
              "CONSTRUCTION_SITE",
              "DEPOT",
              "WORK_PLACE",
              "AREA",
              "CLASSIC_ZONE",
              "CLASSIC_POI"
            ],
            "example": "AREA"
          },
          "value": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "kpiType",
          "value"
        ]
      },
      "Location": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "latitude",
          "longitude"
        ]
      },
      "PaginatedContactResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/ContactResponse"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PaginatedIntervalRepresentation": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/IntervalRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PaginatedKpiResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/KpiResponse"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PaginatedSiteAssetRepresentation": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/SiteAssetRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PaginatedSiteRepresentation": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/SiteRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PaginatedSiteSuggestionRepresentation": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/SiteSuggestionRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PatchUsersRequest": {
        "type": "object",
        "properties": {
          "usersToAdd": {
            "type": "array",
            "description": "A list of users.",
            "items": {
              "$ref": "#/components/schemas/UserRepresentation"
            }
          },
          "usersToRemove": {
            "type": "array",
            "description": "A list of users.",
            "items": {
              "$ref": "#/components/schemas/UserRepresentation"
            }
          }
        }
      },
      "Phone": {
        "type": "object",
        "properties": {
          "countryCode": {
            "type": "integer",
            "format": "int32",
            "maximum": 999,
            "minimum": 0
          },
          "number": {
            "type": "integer",
            "format": "int64",
            "maximum": 99999999999999,
            "minimum": 0
          }
        }
      },
      "Point": {
        "type": "object",
        "description": "GeoJSON geometry",
        "externalDocs": {
          "url": "https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2"
        },
        "properties": {
          "coordinates": {
            "type": "array",
            "additionalProperties": false,
            "description": "The array consists of two or three coordinates, in fixed order: longitude, latitude, optionally altitude.\n\nFirst: longitude value in range -180.0 to 180.0\n\nSecond: latitude value in range -90.0 to 90.0\n\nThird: elevation in meters above mean sea level\n",
            "items": {
              "type": "number",
              "format": "double"
            }
          },
          "type": {
            "type": "string",
            "description": "GeoJSON type"
          }
        },
        "required": [
          "coordinates"
        ]
      },
      "Polygon": {
        "type": "object",
        "description": "GeoJSON geometry",
        "externalDocs": {
          "url": "https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2"
        },
        "properties": {
          "coordinates": {
            "type": "array",
            "additionalProperties": false,
            "description": "Array of points, where each point consists of two or three coordinates, in fixed order: longitude, latitude, optionally altitude.\n\nFirst: longitude value in range -180.0 to 180.0\n\nSecond: latitude value in range -90.0 to 90.0\n\nThird: elevation in meters above mean sea level\n",
            "items": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "double"
              }
            }
          },
          "type": {
            "type": "string",
            "description": "GeoJSON type"
          }
        },
        "required": [
          "coordinates"
        ]
      },
      "SiteAssetRepresentation": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for the asset.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "siteId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for the site.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          }
        },
        "required": [
          "assetId",
          "siteId"
        ]
      },
      "SiteImageResponse": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2024-10-04T07:43:33.755174772Z"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Image identifier used to fetch images from the IRIS Image API",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "name": {
            "type": "string",
            "description": "Name for the image. Filename by default"
          },
          "url": {
            "type": "string",
            "description": "Url for image in original format/size",
            "example": "https://images.iris.trackunit.com/eyJrZXkiOiJjNzU5YTY5NC02N2RlLTQ1Y2ItYWQyNC1jZjRhMTY5ZjlmZjEifQ=="
          }
        },
        "required": [
          "createdAt",
          "id",
          "name",
          "url"
        ]
      },
      "SiteRepresentation": {
        "type": "object",
        "description": "Metadata about a site.",
        "properties": {
          "area": {
            "type": "number",
            "format": "double",
            "description": "Area in square meters.",
            "example": 12345.67
          },
          "assets": {
            "$ref": "#/components/schemas/AssetsReference",
            "description": "Reference to how to get assets for the site",
            "readOnly": true
          },
          "center": {
            "$ref": "#/components/schemas/Feature"
          },
          "city": {
            "type": "string",
            "example": "Aalborg",
            "maxLength": 255,
            "minLength": 0
          },
          "contacts": {
            "$ref": "#/components/schemas/ContactsReference",
            "description": "Reference to how to get contacts for the site",
            "readOnly": true
          },
          "country": {
            "type": "string",
            "example": "DK",
            "maxLength": 255,
            "minLength": 0
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "example": "Headquarter for Trackunit.",
            "maxLength": 2048,
            "minLength": 0
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "externalReference": {
            "type": "string",
            "description": "Reference used for third party integration"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for site.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "lastModifiedDate": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "example": "Trackunit HQ building",
            "maxLength": 2048,
            "minLength": 0
          },
          "polygon": {
            "$ref": "#/components/schemas/Feature"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "Status of the site.",
            "enum": [
              "PLANNED",
              "ACTIVE",
              "FINISHED",
              "ARCHIVED"
            ],
            "example": "ACTIVE"
          },
          "streetAddress": {
            "type": "string",
            "example": "Gasvaerksvej 24",
            "maxLength": 1024,
            "minLength": 0
          },
          "suggestionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of an SiteSuggestionEntity which defines this site.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "timeZoneId": {
            "type": "string",
            "description": "The zone name of the center of the polygon, based on Javas implementation of ISO-8601.",
            "example": "Europe/Copenhagen",
            "maxLength": 64,
            "minLength": 0
          },
          "type": {
            "type": "string",
            "enum": [
              "CONSTRUCTION_SITE",
              "DEPOT",
              "WORK_PLACE",
              "AREA",
              "CLASSIC_ZONE",
              "CLASSIC_POI"
            ],
            "example": "AREA"
          },
          "users": {
            "$ref": "#/components/schemas/UsersReference",
            "description": "Reference to how to get users for the site",
            "readOnly": true
          },
          "zipCode": {
            "type": "string",
            "example": 9000,
            "maxLength": 50,
            "minLength": 0
          }
        },
        "required": [
          "center",
          "createdDate",
          "id",
          "lastModifiedDate",
          "name",
          "polygon",
          "startDate",
          "type"
        ]
      },
      "SiteSuggestionRepresentation": {
        "type": "object",
        "description": "Suggestion for a Site containing a geological polygon.",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "area": {
            "type": "number",
            "format": "double",
            "description": "Area in square meters",
            "example": 12345.67
          },
          "center": {
            "$ref": "#/components/schemas/Feature"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for suggestion.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          },
          "lastSeenDate": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string",
            "example": "Autodetected Area 51"
          },
          "polygon": {
            "$ref": "#/components/schemas/Feature"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "timeZoneId": {
            "type": "string",
            "description": "The zone name of the center of the polygon, based on Javas implementation of ISO-8601.",
            "example": "Europe/Copenhagen",
            "maxLength": 64,
            "minLength": 0
          },
          "type": {
            "type": "string",
            "enum": [
              "CONSTRUCTION_SITE",
              "DEPOT",
              "WORK_PLACE",
              "AREA",
              "CLASSIC_ZONE",
              "CLASSIC_POI"
            ],
            "example": "AREA"
          }
        },
        "required": [
          "id",
          "lastSeenDate",
          "name",
          "polygon",
          "startDate",
          "type"
        ]
      },
      "SiteUsersResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "A list of users.",
            "items": {
              "$ref": "#/components/schemas/UserRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The page number (Starts at 0)."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "the number of elements on current page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The requested size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total amount of elements in this request."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The total amount of pages in this request."
          }
        },
        "required": [
          "content",
          "numberOfElements"
        ]
      },
      "UpdateContactRequest": {
        "type": "object",
        "description": "Request for updating a contact for a site.",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "example": "email@domain.com"
          },
          "fax": {
            "$ref": "#/components/schemas/Phone"
          },
          "name": {
            "type": "string",
            "example": "Thomas Anderson",
            "maxLength": 100,
            "minLength": 0
          },
          "phone": {
            "$ref": "#/components/schemas/Phone"
          },
          "title": {
            "type": "string",
            "example": "Manager",
            "maxLength": 100,
            "minLength": 0
          }
        }
      },
      "UpdateSiteRequest": {
        "type": "object",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "description": {
            "type": "string",
            "example": "Headquarter for Trackunit",
            "maxLength": 2048,
            "minLength": 0
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "externalReference": {
            "type": "string",
            "description": "Reference used for third party integration",
            "maxLength": 255,
            "minLength": 0
          },
          "name": {
            "type": "string",
            "example": "Trackunit HQ building",
            "maxLength": 255,
            "minLength": 0
          },
          "polygon": {
            "$ref": "#/components/schemas/Feature"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "Status of the site.",
            "enum": [
              "ACTIVE",
              "ARCHIVED"
            ],
            "example": "ACTIVE"
          },
          "type": {
            "type": "string",
            "enum": [
              "CONSTRUCTION_SITE",
              "DEPOT",
              "WORK_PLACE",
              "AREA"
            ],
            "example": "AREA"
          }
        }
      },
      "UserRepresentation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID for the user.",
            "example": "c759a694-67de-45cb-ad24-cf4a169f9ff1"
          }
        },
        "required": [
          "id"
        ]
      },
      "UsersReference": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          }
        }
      },
      "Violation": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "authorizationBearer": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
