{
  "openapi": "3.1.1",
  "info": {
    "title": "Data Provider Registry API",
    "description": "The *PTV Flows Detector API* provides endpoints to access detector data of your product instance. It offers functionalities such as:\n* management interfaces for *count sites*, *count locations* and *detectors* of your product instance.\n* an interface to the detectors' *measure type* definitions of your product Instance.\n* an interface to the detectors' *detected vehicle type* definitions of your product instance.",
    "version": "2.0.0",
    "contact": {
      "name": "PTV Group"
    }
  },
  "tags": [
    {
      "name": "COUNT SITE"
    },
    {
      "name": "COUNT LOCATION"
    },
    {
      "name": "DETECTOR"
    },
    {
      "name": "MEASURE THRESHOLD"
    },
    {
      "name": "AUDIT"
    },
    {
      "name": "MEASURE TYPE"
    },
    {
      "name": "DETECTED VEHICLE TYPE"
    },
    {
      "name": "DATA CLEANUP"
    }
  ],
  "servers": [
    {
      "url": "https://api.ptvgroup.tech/dataprovider/v1"
    }
  ],
  "paths": {
    "/detectors/count-site": {
      "get": {
        "tags": [
          "COUNT SITE"
        ],
        "summary": "Get Count Sites and their children (Count Locations and Detectors) as Snapshots",
        "description": "Get count sites of your product instance.\n\nThe response returns a list of snapshots. When `from`/`to` timestamps are provided,\nevery snapshot that overlaps the requested range is returned. If the range\nextends beyond the most recent snapshot, the current registry state is appended\nas an open-ended snapshot (`validTo = null`). `skip`/`limit` are applied within\neach snapshot's `data.countSites` list after filtering and sorting, and they do not\npaginate the snapshots list itself.",
        "operationId": "getCountSites",
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Number of `countSites` to skip within each snapshot's `data.countSites` list."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of `countSites` to return within each snapshot's `data.countSites` list."
          },
          {
            "$ref": "#/components/parameters/CountSiteCodes"
          },
          {
            "name": "filterByCountLocationCodes",
            "in": "query",
            "description": "Comma-separated list of count location codes. If present, only count sites with matching count locations are returned.",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "maxItems": 30,
              "minItems": 0,
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filterByCountLocationHardwareIds",
            "in": "query",
            "description": "Comma-separated list of count location hardware IDs. If present, only count sites with matching count locations are returned.",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "maxItems": 30,
              "minItems": 0,
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "includeInactiveCountLocations",
            "in": "query",
            "description": "If true, inactive count locations are included in the response. Default is false.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the snapshot time range (RFC 3339 timestamp). Must be provided together with `to`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the snapshot time range (RFC 3339 timestamp, whole-hour steps, max range 1h). Must be provided together with `from`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains the count sites of your product instance as snapshot entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountSitesSnapshotsObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "COUNT SITE"
        ],
        "summary": "Add Count Sites",
        "description": "Add one or more count sites to your product instance.\n\nChild `countLocations` and nested `detectors` can be provided in the payload, but are optional.",
        "operationId": "addCountSite",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the count site entries to be added.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountSitesObject"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource was successfully created. The IDs are generated by the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountSitesObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/count-site/{countSiteCode}": {
      "get": {
        "tags": [
          "COUNT SITE"
        ],
        "summary": "Get a specific Count Site by code",
        "description": "Get a specific count site of your product instance by its human-readable code.\n\nThe response contains the full count site tree, including child `countLocations`\nand nested `detectors`.",
        "operationId": "getCountSiteByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/CountSiteCode"
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains the count site with the specified code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountSiteObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count site was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "COUNT SITE"
        ],
        "summary": "Update a specific Count Site by code",
        "description": "Update a specific count site, identified by its human-readable code. As of the HTTP PUT method semantics, the body of this request must specify all the fields of the count site, not only the fields you want to change.\n\nChild `countLocations` are not accepted in this operation. If `countLocations` is\nprovided, the request fails and no child count locations are updated.",
        "operationId": "updateCountSiteByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/CountSiteCode"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the updated count site data. Child `countLocations` must be omitted.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountSiteObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountSiteObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., `countLocations` was provided).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count site was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "COUNT SITE"
        ],
        "summary": "Delete a specific Count Site by code",
        "description": "Delete a specific count site of your product instance by its human-readable code.\n\nThe count site is permanently removed (hard-delete). Historical registry data is preserved by snapshots.\nThis operation is non-cascading by default and fails when child count locations exist.\nIf `cascade=true`, child count locations and nested detectors are removed as well.",
        "operationId": "deleteCountSiteByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/CountSiteCode"
          },
          {
            "name": "cascade",
            "in": "query",
            "required": false,
            "description": "If true, child count locations and nested detectors are removed together with the count site. Default is false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was successfully deleted. No content is returned."
          },
          "400": {
            "description": "Bad Request. The count site has child count locations and `cascade` is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count site was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/count-location": {
      "post": {
        "tags": [
          "COUNT LOCATION"
        ],
        "summary": "Add a Count Location",
        "description": "Add a new count location to an existing count site.\n\nThe request must include `countSiteCode`. Child `detectors` can be provided\noptionally during creation.",
        "operationId": "addCountLocation",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the count location data to be created. `countSiteCode` is required.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountLocationObject"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource was successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountLocationObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., missing `countSiteCode`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count site was not found. Check the provided `countSiteCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/count-location/{countLocationCode}": {
      "get": {
        "tags": [
          "COUNT LOCATION"
        ],
        "summary": "Get a specific Count Location by code",
        "description": "Get a specific count location of your product instance by its human-readable code.",
        "operationId": "getCountLocationByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/CountLocationCode"
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains the count location with the specified code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountLocationObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count location was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "COUNT LOCATION"
        ],
        "summary": "Update a specific Count Location by code",
        "description": "Update a specific count location, identified by its human-readable code. As of the HTTP PUT method semantics, the body of this request must contain all the fields of the count location.\n\nChild `detectors` are not accepted in this operation. If `detectors` is provided,\nthe request fails and no detector children are updated.",
        "operationId": "updateCountLocationByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/CountLocationCode"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the updated count location data. Child `detectors` must be omitted.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountLocationObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountLocationObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count location was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "COUNT LOCATION"
        ],
        "summary": "Delete a specific Count Location by code",
        "description": "Delete a specific count location of your product instance by its human-readable code.\n\nThe count location is permanently removed (hard-delete). Historical registry data is preserved by snapshots.\nThis operation is non-cascading and does not delete child detectors.\nIf child detectors exist, the request fails unless `cascade=true` is provided.",
        "operationId": "deleteCountLocationByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/CountLocationCode"
          },
          {
            "name": "cascade",
            "in": "query",
            "required": false,
            "description": "If true, child detectors are removed together with the count location. Default is false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was successfully deleted. No content is returned."
          },
          "400": {
            "description": "Bad Request. The count location has child detectors and `cascade` is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count location was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/detector": {
      "post": {
        "tags": [
          "DETECTOR"
        ],
        "summary": "Add a Detector",
        "description": "Add a new detector to an existing count location.\n\nThe request must include `countLocationCode`.\n`allowedMeasures` and `detectorLocation.mapModelEntity` are optional detector fields\nand can be provided during creation.",
        "operationId": "addDetector",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the detector data to be created. `countLocationCode` is required.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetectorObject"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource was successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectorObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., missing `countLocationCode`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified count location was not found. Check the provided `countLocationCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/detector/{detectorCode}": {
      "get": {
        "tags": [
          "DETECTOR"
        ],
        "summary": "Get a specific Detector by code",
        "description": "Get a specific detector of your product instance by its human-readable code.\n\nThe response contains the full detector representation, including\n`allowedMeasures` and `detectorLocation.mapModelEntity` when present.",
        "operationId": "getDetectorByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetectorCode"
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains the detector with the specified code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectorObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified detector was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DETECTOR"
        ],
        "summary": "Update a specific Detector by code",
        "description": "Update a specific detector, identified by its human-readable code. As of HTTP PUT semantics,\nthe body must express the complete detector resource.\n\ndetector fields such as `allowedMeasures` and `detectorLocation.mapModelEntity`\nare part of the detector representation and are accepted in this operation.",
        "operationId": "updateDetectorByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetectorCode"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the updated detector data as a complete detector representation.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetectorObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectorObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified detector was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DETECTOR"
        ],
        "summary": "Delete a specific Detector by code",
        "description": "Delete a specific detector of your product instance by its human-readable code.\n\nThe detector is permanently removed (hard-delete). Historical registry data is preserved by snapshots.",
        "operationId": "deleteDetectorByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetectorCode"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was successfully deleted. No content is returned."
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified detector was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/detector/{detectorCode}/measures/{measureTypeCode}/thresholds": {
      "get": {
        "tags": [
          "MEASURE THRESHOLD"
        ],
        "summary": "Get stored measure color threshold overrides",
        "description": "Get user-stored LOW/MEDIUM/HIGH threshold boundaries for one detector measure.",
        "operationId": "getMeasureThresholds",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetectorCode"
          },
          {
            "$ref": "#/components/parameters/MeasureTypeCode"
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains the stored threshold overrides for the detector measure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeasureThresholdsObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified detector or measure type was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "MEASURE THRESHOLD"
        ],
        "summary": "Set measure color thresholds",
        "description": "Set or overwrite threshold boundaries for one detector measure.\nThe measure type must already be active for the detector (i.e. an `allowedMeasures` entry must exist).\nIf the allowed measure does not exist, the request is rejected with 404.\nThresholds above the measure type maximum are accepted and returned as warnings.\n",
        "operationId": "putMeasureThresholds",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetectorCode"
          },
          {
            "$ref": "#/components/parameters/MeasureTypeCode"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains threshold entries to set or overwrite.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeasureThresholdsObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeasureThresholdsObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified detector or measure type was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "MEASURE THRESHOLD"
        ],
        "summary": "Reset measure color thresholds",
        "description": "Reset threshold boundaries to system defaults by clearing stored overrides.",
        "operationId": "deleteMeasureThresholds",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetectorCode"
          },
          {
            "$ref": "#/components/parameters/MeasureTypeCode"
          },
          {
            "$ref": "#/components/parameters/DetectedVehicleTypeCode"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The thresholds were reset. No content is returned."
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified detector or measure type was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/measure-type": {
      "get": {
        "tags": [
          "MEASURE TYPE"
        ],
        "summary": "Get Measure Types",
        "description": "Get Measure Types of your product instance and the system ones. The system measure types are predefined and  cannot be modified.",
        "operationId": "getMeasureTypes",
        "responses": {
          "200": {
            "description": "The response contains the measure types of your product instance and the system ones.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeasureTypesObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "MEASURE TYPE"
        ],
        "summary": "Add a new set of Measure Types. The code MUST be unique for each measure type and is immutable. Please check the list of system measure types to avoid conflicts.",
        "description": "Add a new set of Measure Types to your product instance.",
        "operationId": "addMeasureTypes",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the measure types to be added.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeasureTypesObject"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource was successfully created. The IDs are generated by the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeasureTypesObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/measure-type/{code}": {
      "put": {
        "tags": [
          "MEASURE TYPE"
        ],
        "summary": "Update a specific Measure Type by Code",
        "description": "Update a specific Measure Type, identified by its unique code. As of the HTTP PUT method semantics, the body of this request must contain all the fields of the measure type.",
        "operationId": "updateMeasureTypeByCode",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The unique code of the Measure Type to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the updated Measure Type data.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeasureTypesItemObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeasureTypesItemObject"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified Measure Type was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "MEASURE TYPE"
        ],
        "summary": "Delete a specific Measure Type by Code",
        "description": "Delete a specific Measure Type of your product instance by its unique code.",
        "operationId": "deleteMeasureTypeByCode",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The unique code of the Measure Type to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was successfully deleted. No content is returned."
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified Measure Type was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/detected-vehicle-type": {
      "get": {
        "tags": [
          "DETECTED VEHICLE TYPE"
        ],
        "summary": "Get Detected Vehicle Types",
        "description": "Get Detected Vehicle Types of your product instance.",
        "operationId": "getDetectedVehicleTypes",
        "responses": {
          "200": {
            "description": "The response contains the Detected Vehicle types of your product instance. If no Detected Vehicle types are defined, an empty array is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedVehicleTypesObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "DETECTED VEHICLE TYPE"
        ],
        "summary": "Add a new set of Detected Vehicle Types",
        "description": "Add a new set of Detected Vehicle Types to your product instance. The code MUST be unique for each detected vehicle type and is immutable. Please check the list of system detected vehicle types to avoid conflicts.",
        "operationId": "addDetectedVehicleTypes",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the Detected Vehicle types to be added.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetectedVehicleTypesObject"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource was successfully created. The IDs are generated by the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedVehicleTypesObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/detected-vehicle-type/{code}": {
      "put": {
        "tags": [
          "DETECTED VEHICLE TYPE"
        ],
        "summary": "Update a specific Detected Vehicle Type by Code",
        "description": "Update a specific Detected Vehicle Type of your product instance by its unique code. As of the HTTP PUT method semantics, the body of this request must contain all the fields of the detected vehicle type.",
        "operationId": "updateDetectedVehicleTypeByCode",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The unique code of the Detected Vehicle Type to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "The request body contains the updated Detected Vehicle Type data.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetectedVehicleTypesItemObject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedVehicleTypesItemObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified Detected Vehicle Type was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DETECTED VEHICLE TYPE"
        ],
        "summary": "Delete a specific Detected Vehicle Type by Code",
        "description": "Delete a specific Detected Vehicle Type of your product instance by its unique code.",
        "operationId": "deleteDetectedVehicleTypeByCode",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The unique code of the Detected Vehicle Type to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was successfully deleted. No content is returned."
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The specified Detected Vehicle Type was not found. Check the provided code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/detectors/audit/log": {
      "get": {
        "tags": [
          "AUDIT"
        ],
        "summary": "Get audit log entries",
        "description": "Get audit log entries for your product instance. Filters are accepted as entity codes. When combining multiple filters (e.g. detector codes and count site codes), all conditions are applied together, so they must be consistent — if a requested detector does not belong to a requested count site, the response will be empty.\n",
        "operationId": "getAuditLog",
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Number of entries to skip in the response list."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 200,
              "minimum": 1
            },
            "description": "Maximum number of entries to return in the response list."
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the audit time range (RFC 3339 timestamp). Must be provided together with `to`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the audit time range (RFC 3339 timestamp). Must be provided together with `from`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "$ref": "#/components/parameters/CountSiteCodes"
          },
          {
            "name": "filterByCountLocationCodes",
            "in": "query",
            "description": "Comma-separated list of count location codes.",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "maxItems": 30,
              "minItems": 0,
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filterByDetectorCodes",
            "in": "query",
            "description": "Comma-separated list of detector codes.",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "maxItems": 30,
              "minItems": 0,
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filterByUserId",
            "in": "query",
            "description": "Filter entries by the user who triggered the event.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filterByEntityType",
            "in": "query",
            "description": "Filter entries by entity type.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AuditLogEntityType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains audit log entries of your product instance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request is malformed or invalid (e.g., invalid query parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access rights. The API must be purchased.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "CountLocationCode": {
        "name": "countLocationCode",
        "in": "path",
        "description": "The human-readable code of the Count Location.",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "DetectorCode": {
        "name": "detectorCode",
        "in": "path",
        "description": "The human-readable code of the Detector.",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "MeasureTypeCode": {
        "name": "measureTypeCode",
        "in": "path",
        "description": "The human-readable code of the Measure Type.",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "DetectedVehicleTypeCode": {
        "name": "detectedVehicleTypeCode",
        "in": "query",
        "description": "Optional detected vehicle type code to reset only one threshold override.",
        "required": false,
        "schema": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "CountSiteCode": {
        "name": "countSiteCode",
        "in": "path",
        "description": "The human-readable code of the Count Site.",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$"
        }
      },
      "CountSiteCodes": {
        "name": "filterByCountSiteCodes",
        "in": "query",
        "description": "Comma-separated list of Count Site Codes.",
        "required": false,
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "maxItems": 30,
          "minItems": 0,
          "items": {
            "type": "string"
          }
        }
      },
      "RequestId": {
        "name": "X-Request-Id",
        "in": "header",
        "description": "Optional request ID you can send to help track a call end-to-end. If you need to retry the same write request, reuse the same UUID. If you leave it empty, the server will create one and send it back in the response header.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "schemas": {
      "AuditLogResponse": {
        "type": "object",
        "properties": {
          "skip": {
            "type": "integer",
            "readOnly": true,
            "description": "Number of `entries` skipped when applying pagination."
          },
          "limit": {
            "type": "integer",
            "readOnly": true,
            "description": "Maximum number of `entries` returned after `skip` is applied."
          },
          "size": {
            "type": "integer",
            "readOnly": true,
            "description": "The overall number of items in this collection."
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogEntry"
            }
          }
        }
      },
      "AuditLogEntry": {
        "type": "object",
        "properties": {
          "countSiteCode": {
            "type": "string",
            "readOnly": true,
            "description": "Human-readable code of the impacted count site."
          },
          "countLocationCode": {
            "type": "string",
            "readOnly": true,
            "description": "Human-readable code of the impacted count location."
          },
          "detectorCode": {
            "type": "string",
            "readOnly": true,
            "description": "Human-readable code of the impacted detector."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the event occurred. Date-time values have to be specified according to RFC 3339."
          },
          "userId": {
            "type": "string",
            "readOnly": true,
            "description": "UserId or API key who originated the event."
          },
          "action": {
            "type": "string",
            "readOnly": true,
            "description": "Type of action performed (CREATE, UPDATE, DELETE)."
          },
          "entityType": {
            "type": "string",
            "readOnly": true,
            "description": "Entity type after the event (COUNT_SITE, COUNT_LOCATION, DETECTOR)."
          },
          "entitySnapshot": {
            "type": "string",
            "readOnly": true,
            "description": "JSON snapshot of the entity state immediately after the event."
          }
        }
      },
      "AuditLogEntityType": {
        "type": "string",
        "enum": [
          "COUNT_SITE",
          "COUNT_LOCATION",
          "DETECTOR"
        ],
        "description": "Type of entity affected by an audit log event.",
        "example": "COUNT_SITE",
        "x-enum-varnames": [
          "COUNT_SITE",
          "COUNT_LOCATION",
          "DETECTOR"
        ]
      },
      "DetectedVehicleTypesObject": {
        "type": "object",
        "properties": {
          "detectedVehicleTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetectedVehicleTypesItemObject"
            }
          }
        }
      },
      "DetectedVehicleTypesItemObject": {
        "type": "object",
        "required": [
          "equivalentFactor"
        ],
        "properties": {
          "code": {
            "type": "string",
            "readOnly": true,
            "description": "Code of the Detected Vehicle type. Code is a unique identifier for the Detected Vehicle type and is immutable.",
            "example": "CAR"
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "UserId or API key who created the Detected Vehicle type."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Creation Timestamp. Date-time values have to be specified according to RFC 3339."
          },
          "name": {
            "type": "string",
            "description": "Name of the Detected Vehicle type.",
            "example": "Car"
          },
          "description": {
            "type": "string",
            "description": "Description of the Detected Vehicle type.",
            "example": "Motor vehicle designed for passenger transportation."
          },
          "equivalentFactor": {
            "type": "number",
            "exclusiveMinimum": 0,
            "format": "double",
            "description": "Equivalent factor for the Detected Vehicle type. Used for converting counts to passenger car units (PCU).",
            "example": 1.1
          },
          "configurations": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional properties for the Detected Vehicle type."
          }
        }
      },
      "MeasureTypesObject": {
        "type": "object",
        "properties": {
          "measureTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeasureTypesItemObject"
            }
          }
        }
      },
      "MeasureTypesItemObject": {
        "type": "object",
        "required": [
          "unitOfMeasure"
        ],
        "properties": {
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "UserId or API key who created the Measure type."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Creation Timestamp. Date-time values have to be specified according to RFC 3339."
          },
          "code": {
            "type": "string",
            "readOnly": true,
            "description": "Code of the measure type. Code is a unique identifier for the measure type and is immutable.",
            "example": "FLOW"
          },
          "name": {
            "type": "string",
            "description": "Name of the measure type.",
            "example": "Flow"
          },
          "description": {
            "type": "string",
            "description": "Description of the measure type.",
            "example": "Number of vehicles passing a point per unit of time."
          },
          "unitOfMeasure": {
            "type": "string",
            "description": "Unit of measure for the measure type.",
            "example": "vehicles/hour"
          },
          "maximumExpectedValue": {
            "type": "number",
            "format": "double",
            "description": "Maximum expected value for the measure type.",
            "example": 2000.0
          },
          "minimumExpectedValue": {
            "type": "number",
            "format": "double",
            "description": "Minimum expected value for the measure type.",
            "example": 0.0
          }
        }
      },
      "CountSitesSnapshotsObject": {
        "type": "object",
        "properties": {
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CountSitesSnapshot"
            },
            "description": "Snapshots that overlap the requested time range."
          }
        }
      },
      "CountSitesSnapshot": {
        "type": "object",
        "required": [
          "validFrom",
          "data"
        ],
        "properties": {
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the snapshot validity interval (RFC 3339)."
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the snapshot validity interval (RFC 3339). Null means open-ended.",
            "nullable": true
          },
          "data": {
            "$ref": "#/components/schemas/CountSitesObject"
          }
        }
      },
      "CountSitesObject": {
        "type": "object",
        "properties": {
          "skip": {
            "type": "integer",
            "readOnly": true,
            "description": "Number of `countSites` skipped when applying pagination."
          },
          "limit": {
            "type": "integer",
            "readOnly": true,
            "description": "Maximum number of `countSites` returned after `skip` is applied."
          },
          "size": {
            "type": "integer",
            "readOnly": true,
            "description": "The overall number of items in this collection."
          },
          "mapVersion": {
            "type": "string",
            "readOnly": true,
            "description": "Latest map version for the product instance.",
            "example": "20240430072803"
          },
          "dataModelVersion": {
            "type": "string",
            "readOnly": true,
            "description": "Version of the detectors data model for this snapshot.",
            "example": "1.0.0"
          },
          "warning": {
            "type": "string",
            "readOnly": true,
            "description": "Warning message for snapshot queries when historical data is not available."
          },
          "countSites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CountSiteObject"
            }
          }
        }
      },
      "MeasureThresholdsObject": {
        "type": "object",
        "properties": {
          "measureTypeCode": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Measure type code associated with these thresholds.",
            "example": "FLOW"
          },
          "thresholds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThresholdEntry"
            }
          },
          "warnings": {
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "string"
            },
            "description": "Non-blocking validation warnings produced while applying the thresholds."
          }
        }
      },
      "ThresholdEntry": {
        "type": "object",
        "properties": {
          "detectedVehicleTypeCode": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Detected vehicle type code. Null means all vehicle types for this measure.",
            "example": "CAR",
            "nullable": true
          },
          "thresholdLowUpper": {
            "type": "number",
            "format": "double",
            "description": "Boundary between LOW and MEDIUM.",
            "example": 70.0,
            "nullable": true
          },
          "thresholdMediumUpper": {
            "type": "number",
            "format": "double",
            "description": "Boundary between MEDIUM and HIGH.",
            "example": 90.0,
            "nullable": true
          },
          "thresholdDirection": {
            "$ref": "#/components/schemas/ThresholdDirection"
          }
        }
      },
      "ThresholdDirection": {
        "type": "string",
        "enum": [
          "ASCENDING",
          "DESCENDING"
        ],
        "description": "Direction used to interpret the LOW/MEDIUM/HIGH thresholds.",
        "x-enum-varnames": [
          "ASCENDING",
          "DESCENDING"
        ]
      },
      "CountSiteType": {
        "type": "string",
        "enum": [
          "DETECTOR_SITE",
          "PARKING_SITE",
          "PUBLIC_TRANSPORT_SITE",
          "TEMPORARY_SITE",
          "OTHER_SITE"
        ],
        "description": "Type of the count site.",
        "example": "DETECTOR_SITE",
        "x-enum-varnames": [
          "DETECTOR_SITE",
          "PARKING_SITE",
          "PUBLIC_TRANSPORT_SITE",
          "TEMPORARY_SITE",
          "OTHER_SITE"
        ]
      },
      "CountSiteObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the count site.",
            "example": "det-12345"
          },
          "createdBy": {
            "type": "string",
            "readOnly": true,
            "description": "UserId or API key who created the count site."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the count site was created. Date-time values have to be specified according to RFC 3339."
          },
          "countSiteType": {
            "$ref": "#/components/schemas/CountSiteType"
          },
          "name": {
            "type": "string",
            "description": "Name of the count site.",
            "example": "Main Entrance count site"
          },
          "siteLocation": {
            "$ref": "#/components/schemas/SiteLocationObject",
            "description": "Location information of the count site."
          },
          "countLocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CountLocationObject"
            },
            "description": "Child count locations associated with this count site. This field can be provided on create operations and must be omitted on update operations."
          }
        }
      },
      "CountLocationObject": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the count location.",
            "example": "cd-12345"
          },
          "code": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Human-readable code assigned to the count location by the system integrator. Must contain only alphanumeric characters, hyphens, and underscores. Immutable after creation.",
            "example": "CD-1001"
          },
          "countSiteCode": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Human-readable code of the count site this count location belongs to. Required for count location creation and immutable afterwards.",
            "example": "CS-1001"
          },
          "updatedBy": {
            "type": "string",
            "readOnly": true,
            "description": "The UserId or API key ID that last updated the count location."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the count location was last updated. Date-time values have to be specified according to RFC 3339."
          },
          "mapVersion": {
            "type": "string",
            "readOnly": true,
            "description": "Latest map version for the product instance.",
            "example": "20240430072803"
          },
          "name": {
            "type": "string",
            "description": "Name of the count location.",
            "example": "Main Entrance count location"
          },
          "hardwareId": {
            "type": "string",
            "description": "Hardware ID of the count location.",
            "example": "HW-56789"
          },
          "deviceLocation": {
            "$ref": "#/components/schemas/DeviceLocationObject",
            "description": "Location information of the device."
          },
          "isActive": {
            "type": "boolean",
            "description": "Indicates if the count location is active. Defaults to true if not provided.",
            "example": true,
            "default": true
          },
          "detectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetectorObject"
            },
            "description": "Child detectors associated with the count location. This field can be provided on create operations and must be omitted on update operations."
          }
        }
      },
      "DetectorObject": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the detector.",
            "example": "12345"
          },
          "countLocationCode": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Human-readable code of the count location this detector belongs to. Required for detector creation and immutable afterwards.",
            "example": "CD-1001"
          },
          "code": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Human-readable code assigned to the detector by the system integrator. Must contain only alphanumeric characters, hyphens, and underscores. Immutable after creation.",
            "example": "DET-1001"
          },
          "name": {
            "type": "string",
            "description": "Name of the detector."
          },
          "detectorLocation": {
            "$ref": "#/components/schemas/DetectorLocationObject",
            "description": "Location information of the detector."
          },
          "allowedMeasures": {
            "type": "array",
            "items": {
              "type": "object",
              "minItems": 1,
              "properties": {
                "measureTypeCode": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]+$",
                  "description": "Measure type code associated with the allowed measure.",
                  "example": "MT-1"
                },
                "detectedVehicleTypeCodes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "description": "List of detected vehicle type codes associated with the allowed measure.",
                  "example": [
                    "DVT-1",
                    "DVT-2"
                  ]
                },
                "thresholds": {
                  "type": "array",
                  "readOnly": true,
                  "items": {
                    "$ref": "#/components/schemas/ThresholdEntry"
                  },
                  "description": "Stored threshold overrides for this allowed measure, one entry per detected vehicle type. Empty when no overrides are set."
                }
              }
            },
            "description": "Allowed measures associated with this detector."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional metadata for the detector."
          }
        }
      },
      "DetectorLocationObject": {
        "type": "object",
        "required": [
          "shape"
        ],
        "properties": {
          "detectorLocationId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the detector location.",
            "example": "loc-12345"
          },
          "shape": {
            "type": "string",
            "description": "WKT shape of the detector measured geometry in decimal degrees (WGS84/EPSG:4326).",
            "example": "LINESTRING(13.4050 52.5200, 13.4060 52.5210)"
          },
          "heading": {
            "type": "number",
            "format": "double",
            "description": "Heading of the detector measured point in degrees clockwise from true north.",
            "example": 90.0,
            "maximum": 360.0,
            "minimum": 0.0
          },
          "mapModelEntity": {
            "$ref": "#/components/schemas/MapModelEntityObject",
            "description": "Nested map model entity associated with the detector location."
          }
        }
      },
      "MapModelEntityObject": {
        "type": "object",
        "properties": {
          "mapModelEntityId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the map model entity reference.",
            "example": "mme-12345"
          },
          "entityId": {
            "type": "string",
            "description": "Identifier of the map model entity in the map model.",
            "example": "123456"
          },
          "entityType": {
            "$ref": "#/components/schemas/MapModelEntityType"
          },
          "linkShapePercentFromNodeId": {
            "type": "number",
            "format": "double",
            "description": "Relative position along the link shape starting from the from-node ID (only for LINK).",
            "example": 0.5,
            "maximum": 1.0,
            "minimum": 0.0
          },
          "coveredLanes": {
            "type": "string",
            "pattern": "^([1-9][0-9]*)(,([1-9][0-9]*))*$",
            "description": "Comma separated list of lane numbers covered by the detector starting from 1 for the leftmost lane (only for LINK).",
            "example": "1,2"
          }
        }
      },
      "MapModelEntityType": {
        "type": "string",
        "enum": [
          "LINK",
          "TURN"
        ],
        "description": "Type of the map model entity.",
        "example": "LINK",
        "x-enum-varnames": [
          "LINK",
          "TURN"
        ]
      },
      "SiteLocationObject": {
        "type": "object",
        "required": [
          "code",
          "shape"
        ],
        "properties": {
          "siteLocationId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the site location.",
            "example": "siteloc-12345"
          },
          "code": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "Human-readable code assigned to the count site by the system integrator. Must contain only alphanumeric characters, hyphens, and underscores. Immutable after creation.",
            "example": "D-1001"
          },
          "shape": {
            "type": "string",
            "description": "WKT shape of the Count Site in decimal degrees (WGS84/EPSG:4326).",
            "example": "POLYGON((13.4040 52.5190, 13.4060 52.5190, 13.4060 52.5210, 13.4040 52.5210, 13.4040 52.5190))"
          }
        }
      },
      "DeviceLocationObject": {
        "type": "object",
        "required": [
          "hardwarePosition",
          "shape"
        ],
        "properties": {
          "deviceLocationId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier for the device location.",
            "example": "devloc-12345"
          },
          "hardwarePosition": {
            "type": "string",
            "description": "WKT Point of the Count Location in decimal degrees (WGS84/EPSG:4326).",
            "example": "POINT(13.4050 52.5200)"
          },
          "heading": {
            "type": "number",
            "format": "double",
            "description": "Heading of the Count Location in degrees clockwise from true north.",
            "example": 90.0,
            "maximum": 360.0,
            "minimum": 0.0
          },
          "shape": {
            "type": "string",
            "description": "WKT shape of the Count Location covered area in decimal degrees (WGS84/EPSG:4326).",
            "example": "POLYGON((13.4040 52.5190, 13.4060 52.5190, 13.4060 52.5210, 13.4040 52.5210, 13.4040 52.5190))"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "description",
          "errorCode",
          "traceId"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "A human readable message that describes the error."
          },
          "errorCode": {
            "type": "string",
            "description": "A constant string that can be used to identify this error class programmatically. An errorCode can have **details** to provide information on additional properties which are described with the code they apply to. They are of type string unless otherwise specified.\n\nNote that additional errorCodes as well as the **details** of existing errorCodes may be added at any time. Furthermore, the **description** may change at any time.\n\n**HTTP status code: 400**\n* `GENERAL_VALIDATION_ERROR` - The validation of the request failed. Details can be found in **causes**.\n* `GENERAL_PARSING_ERROR` - The JSON syntax is invalid.\n\n**HTTP status code: 401**\n* `GENERAL_UNAUTHENTICATED` - Invalid or missing authentication credentials.\n  * `message` - An additional error message.\n\n**HTTP status code: 403**\n* `GENERAL_FORBIDDEN` - Insufficient access rights.\n* `GENERAL_QUOTA_EXCEEDED` - The transaction limit is exceeded.\n  * `message` - An additional error message.\n\n**HTTP status code: 404**\n* `GENERAL_RESOURCE_NOT_FOUND` - A requested resource does not exist.\n  * `message` - An additional error message.\n\n**HTTP status code: 429**\n* `GENERAL_RATE_LIMIT_EXCEEDED` - The rate limit is exceeded.\n\n**HTTP status code: 500**\n* `GENERAL_INTERNAL_SERVER_ERROR` - The request could not be processed due to an internal error.\n  * `message` - An additional error message.\n  * `hint` - A hint on how to solve the problem.\n\n**HTTP status code: 503**\n* `GENERAL_SERVICE_UNAVAILABLE` - The service is temporarily unavailable."
          },
          "traceId": {
            "type": "string",
            "description": "A unique identifier of the corresponding trace forest. It can be used to trace errors by the support."
          },
          "errorId": {
            "type": "string",
            "description": "A unique identifier specific to this error instance. It can be used to trace errors by the support."
          },
          "causes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CausingError"
            },
            "description": "A list of affected parameters and/or properties that caused this error."
          },
          "details": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional properties specific to this error class."
          }
        }
      },
      "CausingError": {
        "type": "object",
        "required": [
          "description",
          "errorCode"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "A human readable message that describes the error."
          },
          "errorCode": {
            "type": "string",
            "description": "A constant string that can be used to identify this error class programmatically. An errorCode can have **details** to provide information on additional properties which are described with the code they apply to. They are of type string unless otherwise specified.\n\nNote that additional errorCodes as well as the **details** of existing errorCodes may be added at any time. Furthermore, the **description** may change at any time.\n\n**Error codes for** `GENERAL_VALIDATION_ERROR`\n* `GENERAL_INVALID_VALUE` - A parameter is set to an invalid value.\n  * `value` - The invalid value.\n* `GENERAL_UNRECOGNIZED_PARAMETER` - A parameter is unknown.\n* `GENERAL_DUPLICATE_PARAMETER` - A parameter is duplicated.\n* `GENERAL_MINIMUM_VALUE_VIOLATED` - The minimum value restriction is violated.\n  * `minimumValue` - The minimum value (integer or double).\n* `GENERAL_MAXIMUM_VALUE_VIOLATED` - The maximum value restriction is violated.\n  * `maximumValue` - The maximum value (integer or double)."
          },
          "parameter": {
            "type": "string",
            "description": "The name of the affected query or path parameter or a JSONPath to the affected property of the request."
          },
          "details": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional properties specific to this error class."
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "apiKey"
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ]
}