Payload Format
This document outlines the specifications for our payloads. It includes a general section applicable to all devices and specific sections for each application.
Global
Keepalive
Keepalive messages are sent every 10 minutes to check connection integrity.
GET https://{webhook_url}?source=VIZIOSENSE&id={device_id} HTTP/1.1
User-Agent: axios/1.3.5
Content-Type: application/json
Accept: application/json, text/plain, */*
Query string parameters sent:
- source: Source of the message (always set to
VIZIOSENSE). - id: The ID of your device.
Applications
Every application payload follows a common pattern:
POST https://{webhook_url} HTTP/1.1
User-Agent: axios/1.3.5
Content-Type: application/json
Accept: application/json, text/plain, */*
{
"stream_id": "<your_device_id>",
"type": "<application_type>",
"timestamp": "<event_timestamp>",
"payload": "<application_specific_payload>"
}
Message attributes:
- stream_id: The ID of your device.
- timestamp: The timestamp in UNIX time format (UTC) of the message.
- type: The application type code, defining the payload format for each application:
VPM: VizioparkVYD: VizioyardVCZ: Viziocount by ZoneVCB: Viziocount by BarrierVCW: Viziocrowd
- payload: The application-specific payload (as specified below).
Viziopark
Viziopark payloads are sent every time a monitored place has a state change. There is a rate limit of 1 payload every 30 seconds to avoid flooding:
[
{
"name": "P-0",
"is_active": true,
"deactivated": false,
"cls": "car",
"id": "c2b69525-974e-4d26-a80c-70817a628e08",
"event_ts": 1705682525
},
{
"name": "P-1",
"is_active": true,
"deactivated": false,
"cls": "truck",
"id": "20acf01e-9ed0-4211-8ccd-67c931bb41a5",
"event_ts": 1705682280
},
{
"name": "P-2",
"is_active": false,
"deactivated": false,
"cls": null,
"id": "be4efad5-cf22-40a2-bf75-7dcf16ef801f",
"event_ts": 1705682577
}
]
Payload attributes:
- id: The ID of the parking spot.
- event_ts: The timestamp in UNIX time format (UTC) of the event.
- name: The name of the parking spot as defined in the integrator platform.
- is_active: The current state of the monitored spot (
trueif occupied). - deactivated: The current deactivation state of the monitored spot (
trueif deactivated). - cls: The class of the parked vehicle (e.g.,
car,bus,truck) ornullif the spot is available or deactivated. It's an optional attribute. - plate: The license plate text of the parked vehicle (e.g.,
ER-891-WJ) ornullif the spot is available or deactivated. It's an optional attribute.
Vizioyard
Vizioyard payloads are sent every time a monitored yard slot has a state change. There is a rate limit of 1 payload every 30 seconds to avoid flooding:
[
{
"name": "Y-0",
"is_active": true,
"deactivated": false,
"cls": "truck",
"plate": "EC-562-WJ",
"id": "5e1f581d-cf32-42ac-81d4-b9ec3af91159",
"event_ts": 1770909921
},
{
"name": "Y-1",
"is_active": true,
"deactivated": false,
"cls": "truck",
"plate": "BZ-348-BY",
"id": "a17b7fdf-0dd8-4621-b89d-c3183f19c371",
"event_ts": 1770908400
},
{
"name": "Y-2",
"is_active": false,
"deactivated": false,
"cls": null,
"plate": null,
"id": "71d35b0e-5c46-4816-a2ef-417a73280cf3",
"event_ts": 1770907200
}
]
Payload attributes:
- id: The ID of the yard slot.
- event_ts: The timestamp in UNIX time format (UTC) of the event.
- name: The name of the yard slot as defined in the integrator platform.
- is_active: The current state of the monitored yard slot (
trueif occupied). - deactivated: The current deactivation state of the monitored yard slot (
trueif deactivated). - cls: The class of the parked vehicle (e.g.,
truck,trucktrailer,truckhead) ornullif the yard slot is available or deactivated. It's an optional attribute. - plate: The license plate text of the parked vehicle (e.g.,
ER-891-WJ) ornullif the yard slot is available or deactivated. It's an optional attribute. - ocr: A specific text detected on the vehicle (e.g., container or trailer ID), or
nullif the yard slot is available or deactivated. It's an optional attribute.
Viziocount
count by zone
Counts the number of objects in a zone. Payloads are sent at the end of each counting period (default: 30 seconds), only if the count has changed.
[
{
"name": "Polygon_1",
"id": "ba3b60ab-659f-469f-bf5e-4b19124a055d",
"event_ts": 1705938983,
"objects": [
{
"count": 10,
"cls": "person"
}
]
}
]
Payload attributes:
- id: The ID of the counting zone.
- event_ts: The timestamp in UNIX time format (UTC) of the event.
- name: The name of the counting zone as defined in the integrator platform.
- objects: An array of detected objects.
- cls: The class of the detected object (e.g.,
person,car,bus,truck,motorcycle). - count: The number of objects counted within the zone.
- cls: The class of the detected object (e.g.,
count by barrier
Counts objects crossing a barrier over a period (default: 30 seconds). Payloads are sent at the end of each counting period, only if count is greater than 0.
[
{
"name": "Entry",
"start_ts": 1705938983,
"id": "ba3b60ab-659f-469f-bf5e-4b19124a055d",
"end_ts": 1705939013,
"objects": [
{
"count": 1,
"cls": "vehicle"
}
]
},
{
"name": "Exit",
"start_ts": 1705938983,
"id": "aead1317-44e8-4143-8d74-7740c30c5752",
"end_ts": 1705939013,
"objects": [
{
"count": 1,
"cls": "vehicle"
}
]
}
]
Payload attributes:
- id: The ID of the barrier.
- start_ts: The start timestamp in UNIX time format (UTC).
- end_ts: The end timestamp in UNIX time format (UTC).
- name: The name of the barrier as defined in the integrator platform.
- objects: An array of detected objects.
- cls: The class of the detected object (e.g.,
person,car,bus,truck,motorcycle). - count: The cumulative number of objects that crossed the barrier during the defined period.
- cls: The class of the detected object (e.g.,
Viziocrowd
Viziocrowd provides crowd metrics for different counting zones. It includes the minimum, maximum, and average number of people present in each zone over a specified period (default: 10 minutes).
[
{
"name": "Polygon_1",
"start_ts": 1705685956,
"id": "9a6f509b-14dc-4338-8fda-dd14e0baadaf",
"end_ts": 1705686557,
"objects": [
{
"cls": "person",
"min": 0,
"avg": 6,
"max": 49
}
]
},
{
"name": "Polygon_2",
"start_ts": 1705685956,
"id": "438ba09c-8f49-409d-9e5a-50070ce66f30",
"end_ts": 1705686557,
"objects": [
{
"cls": "person",
"min": 0,
"avg": 0,
"max": 7
}
]
}
]
Payload attributes:
- id: The ID of the crowd detection zone.
- start_ts: The start timestamp in UNIX time format (UTC).
- end_ts: The end timestamp in UNIX time format (UTC).
- name: The name of the crowd detection zone as defined in the integrator platform.
- objects: An array of detected objects.
- cls: The class of the object detected (
person). - min: The minimum number of objects detected over the aggregation period.
- avg: The average number of objects detected over the aggregation period.
- max: The maximum number of objects detected over the aggregation period.
- cls: The class of the object detected (
Payload Details
- Viewer
- JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Application Payload",
"description": "Viziosense application payload",
"type": "object",
"properties": {
"version": {
"title": "Application version",
"type": "integer",
"description": "The version of the application. if none is provided, assume it is version 0."
},
"stream_id": {
"title": "Device ID",
"type": "string",
"format": "uuid",
"description": "The unique identifier for the device"
},
"type": {
"title": "Application type code",
"type": "string",
"oneOf": [
{
"const": "VPM",
"description": "VizioPark application type code. It will define the content type of payload field"
},
{
"const": "VYD",
"description": "VizioYard application type code. It will define the content type of payload field"
},
{
"const": "VCZ",
"description": "VizioCount Zone application type code. It will define the content type of payload field"
},
{
"const": "VCB",
"description": "VizioCount Barrier application type code. It will define the content type of payload field"
},
{
"const": "VCW",
"description": "VizioCrowd application type code. It will define the content type of payload field"
}
],
"description": "The type of the application."
},
"timestamp": {
"title": "Payload sending timestamp",
"description": "The timestamp in UNIX time format (UTC) of the message.",
"type": "string",
"format": "timestamp",
"pattern": "^[1-9][0-9]*$"
},
"payload": {
"title": "application-specific payload",
"description": "The application-specific payload as defined by its type code",
"oneOf": [
{
"$ref": "#/$defs/VPM"
},
{
"$ref": "#/$defs/VYD"
},
{
"$ref": "#/$defs/VCZ"
},
{
"$ref": "#/$defs/VCB"
},
{
"$ref": "#/$defs/VCW"
}
]
}
},
"required": [
"stream_id",
"type",
"timestamp",
"payload"
],
"$defs": {
"VPM": {
"title": "VPM",
"description": "Viziopark payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Spot",
"description": "Monitored spot status",
"type": "object",
"properties": {
"name": {
"title": "spot name",
"description": "The name of the parking spot as defined in the integrator platform",
"type": "string"
},
"is_active": {
"title": "occupancy indicator",
"description": "The current state of the monitored spot (true if occupied)",
"type": "boolean"
},
"deactivated": {
"title": "deactivation indicator",
"description": "The current deactivation state of the monitored spot (true if deactivated)",
"type": "boolean"
},
"id": {
"title": "spot id",
"description": "The ID of the parking spot",
"type": "string",
"format": "uuid"
},
"plate": {
"title": "license plate text",
"description": "The license plate text of the parked vehicle (e.g., `ER-891-WJ`) or `null` if the spot is available or deactivated",
"type": [
"string",
"null"
]
},
"cls": {
"title": "object class",
"description": "The class of the parked vehicle (e.g., `car`, `bus`, `truck`) or `null` if the spot is available or deactivated",
"type": [
"string",
"null"
],
"enum": [
"car",
"bus",
"truck"
]
},
"event_ts": {
"title": "event timestamp",
"description": "The UNIX time format (UTC) of the spot status change",
"type": "integer",
"format": "timestamp"
}
},
"required": [
"name",
"id",
"event_ts",
"is_active",
"deactivated"
]
}
},
"VYD": {
"title": "VYD",
"description": "Vizioyard payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Yard slot",
"description": "Monitored yard slot status",
"type": "object",
"properties": {
"name": {
"title": "yard slot name",
"description": "The name of the yard slot as defined in the integrator platform",
"type": "string"
},
"is_active": {
"title": "occupancy indicator",
"description": "The current state of the monitored yard slot (true if occupied)",
"type": "boolean"
},
"deactivated": {
"title": "deactivation indicator",
"description": "The current deactivation state of the monitored yard slot (true if deactivated)",
"type": "boolean"
},
"id": {
"title": "yard slot id",
"description": "The ID of the yard slot",
"type": "string",
"format": "uuid"
},
"cls": {
"title": "object class",
"description": "The class of the parked vehicle (e.g., `truck`, `trucktrailer`, `truckhead`) or `null` if the yard slot is available or deactivated",
"type": [
"string",
"null"
],
"enum": [
"truck",
"trucktrailer",
"truckhead"
]
},
"plate": {
"title": "license plate text",
"description": "The license plate text of the parked vehicle (e.g., `ER-891-WJ`) or `null` if the yard slot is available or deactivated",
"type": [
"string",
"null"
]
},
"ocr": {
"title": "vehicle marking text",
"description": "A specific text detected on the vehicle (e.g., container or trailer ID), or `null` if the yard slot is available or deactivated",
"type": [
"string",
"null"
]
},
"event_ts": {
"title": "event timestamp",
"description": "The UNIX time format (UTC) of the yard slot status change",
"type": "integer",
"format": "timestamp"
}
},
"required": [
"name",
"id",
"event_ts",
"is_active",
"deactivated"
]
}
},
"VCZ": {
"title": "VCZ",
"description": "Viziocount zone payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Counting Zone",
"description": "Counting zone status",
"type": "object",
"properties": {
"id": {
"title": "counting zone identifier",
"description": "the counting zone uuid",
"type": "string",
"format": "uuid"
},
"name": {
"title": "Counting zone name",
"description": "The name of the counting zone as defined in the integrator platform",
"type": "string"
},
"event_ts": {
"title": "event timestamp",
"description": "The UNIX time format (UTC) of the count number change",
"type": "integer",
"format": "timestamp"
},
"objects": {
"title": "object counting list",
"description": "an array containing the count of each class of object",
"type": "array",
"minContains": 1,
"items": {
"title": "object count",
"description": "the count information object",
"type": "object",
"properties": {
"count": {
"title": "count number",
"description": "the count number",
"type": "integer",
"minimum": 0
},
"cls": {
"title": "object class",
"description": "the object class",
"type": "string",
"enum": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"truck",
"vehicle"
]
}
},
"required": [
"count",
"cls"
]
}
}
},
"required": [
"name",
"event_ts",
"id",
"objects"
]
}
},
"VCB": {
"title": "VCB",
"description": "Viziocount barrier payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Counting Barrier",
"description": "Counting Barrier status",
"type": "object",
"properties": {
"name": {
"title": "Counting barrier name",
"description": "The name of the counting barrier as defined in the integrator platform",
"type": "string"
},
"id": {
"title": "counting barrier identifier",
"description": "the counting barrier uuid",
"type": "string",
"format": "uuid"
},
"start_ts": {
"title": "start timestamp",
"description": "The start timestamp in UNIX time format (UTC) of the counting period where at least 1 object has crossed the barrier",
"type": "integer",
"format": "timestamp"
},
"end_ts": {
"title": "end timestamp",
"description": "The end timestamp in UNIX time format (UTC) of the counting period where at least 1 object has crossed the barrier",
"type": "integer",
"format": "timestamp"
},
"objects": {
"title": "object counting list",
"description": "an array containing the count of each class of object",
"type": "array",
"minContains": 1,
"items": {
"title": "object count",
"description": "the count information object",
"type": "object",
"properties": {
"count": {
"title": "count number",
"description": "the count number",
"type": "integer",
"minimum": 1
},
"cls": {
"title": "object class",
"description": "the object class",
"type": "string",
"enum": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"truck",
"vehicle"
]
}
},
"required": [
"count",
"cls"
]
}
}
},
"required": [
"name",
"id",
"start_ts",
"end_ts",
"objects"
]
}
},
"VCW": {
"title": "VCW",
"description": "Viziocrowd payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Crowd counting zone",
"description": "Crowd counting zone status",
"type": "object",
"properties": {
"id": {
"title": "Crowd counting zone identifier",
"description": "the crowd counting zone uuid",
"type": "string",
"format": "uuid"
},
"name": {
"title": "Crowd counting zone name",
"description": "The name of the crowd counting zone as defined in the integrator platform",
"type": "string"
},
"start_ts": {
"title": "start timestamp",
"description": "The start timestamp in UNIX time format (UTC) of the crowd counting period.",
"type": "integer",
"format": "timestamp"
},
"end_ts": {
"title": "end timestamp",
"description": "The end timestamp in UNIX time format (UTC) of the crowd counting period.",
"type": "integer",
"format": "timestamp"
},
"objects": {
"title": "object counting list",
"description": "an array containing the count of each class of object",
"type": "array",
"minContains": 1,
"items": {
"title": "object count",
"description": "the count information object",
"type": "object",
"properties": {
"min": {
"title": "min count",
"description": "The minimum number of objects detected over the aggregation period.",
"type": "integer",
"minimum": 0
},
"max": {
"title": "max count",
"description": "The maximum number of objects detected over the aggregation period.",
"type": "integer",
"minimum": 0
},
"avg": {
"title": "average count",
"description": "The average number of objects detected over the aggregation period.",
"type": "integer",
"minimum": 0
},
"cls": {
"type": "string",
"enum": [
"person"
]
}
},
"required": [
"min",
"max",
"avg",
"cls"
]
}
}
},
"required": [
"name",
"id",
"start_ts",
"end_ts",
"objects"
]
}
}
}
}