Quick Start - Detector Ingestion API

You can use the Detector Ingestion service to implement standard batch ingestion of the measurements associated with the detectors in your Flows instance.

A typical scenario is a client application (for example, a telemetry system) that provides a well-formed batch of raw detector measurements. All items pass a validation phase (existing detectors, allowed measure types, valid timestamps, etc.). The service archives the compressed batch to blob storage, stores the entire set of measurements, and returns an HTTP 202 response.

Follow the steps on this page to get started with Detector Ingestion API.

API endpoint

https://api.ptvgroup.tech/dataprovider/ingestion/v1/detectors/data/ingest 

You can use this POST service to send a compressed (gzip) JSON payload with Content-Encoding: gzip and an optional X-Request-Id.
The service validates authentication and all elements of the payload.

Request

https://api.ptvgroup.tech/dataprovider/ingestion/v1/detectors/data/ingest 

This is an example of payload before the gzip compression:

{
 "measurements": [
   {
     "detectorCode": "DET-001",
     "measureTypeCode": "SPEED",
     "timestampFrom": "2026-07-01T13:00:00.749Z",
     "timestampTo": "2026-07-01T13:30:00.749Z",
     "value": 52,
     "detectedVehicleTypeCode": "MOTORCYCLE",
     "quality": 0.97
   },
   {
     "detectorCode": "DET-002",
     "measureTypeCode": "FLOW",
     "timestampFrom": "2026-07-01T13:00:00.749Z",
     "timestampTo": "2026-07-01T13:30:00.749Z",
     "value": 800,
     "detectedVehicleTypeCode": "CAR",
     "quality": 0.95
   }
 ]
}

The main fields of the payload are:

  • detectorCode: Identifies an existing detector registered for the product instance. 
  • measureTypeCode: Measure type associated with the detector identified by detectorCode. See the list of measure types registered for your instance.
  • timestampFrom: Start time of the validity window for reading data of the detector
  • timestampTo: End time of the validity window for reading data of the detector
  • value: It is the value of the measurement.
  • detectedVehicleTypeCode: Optional. See the list of vehicle types registered for your instance.
  • quality: Optional value in [0, 1] indicating the measurement quality.

cURL

curl -X 'POST' \
  'https://api.ptvgroup.tech/dataprovider/ingestion/v1/detectors/data/ingest' \
  -H 'Content-Type: application/json' \
  -H 'Content-Encoding: gzip' \
  -H 'apiKey: YOUR_API_KEY'\
  -H 'X-Request-Id: ID'
  --data-binary @payload.json.gz

PowerShell

$headers = @{
"Content-Type" = "application/json"
"Content-Encoding" = "gzip"
"apiKey" = "YOUR_API_KEY"
"X-Request-Id" = "ID"
} 
$response = Invoke-RestMethod
-Uri = "https://api.ptvgroup.tech/dataprovider/ingestion/v1/detectors/data/ingest" 
-Method Post 
-Headers $headers 
-Body $body
$response | ConvertTo-Json

 

Response

HTTP 202 Accepted - All measurements accepted for processing.

{
  "accepted": 2,
  "rejected": 0,
  "rejections": []
}

You need to get a Demo or Real instance of PTV Flows before using the API Key.

In order to get a PTV Flows instance, please use the contact form.

Get your free API access Key