The document describes methods and data formats used by Nwave's cloud-based API broker to relay pre-processed smart parking sensor events to the client's endpoints. The data can be passed with or without authorization.
Authorization Methods
Basic HTTP(s) Authentication using authorization header in the format of "Basic " + Base64 (username: password)
API-Key
Status Change
Event of sensor occupancy status change. Occupation detection time is 5-7 seconds and vacation detection time is 3-5 seconds.
Method: POST
Template Body:
{ "device_id": "{modem_id}", "position":{ "network_id": "{network_id}", "custom_id": "{custom_id}", "latitude": {latitude}, "longitude": {longitude}, "group_inner_id": {group_inner_id}, "group":{ "id": {group_id}, "name": "{group_name}", "zone_id": {zone_id} } }, "message_type": "status_change", "message_trace_id": "{message_trace_id}", "occupied": "{"occupied" if parsed["occupation_status"] is True else "free"}", "parking_session_iterator": {parsed["parking_session_iterator"]}, "previous_status_duration_min": {parsed["previous_occupancy_status_duration_min"]} }
message_type - message type;
message_trace_id - system message-id;
occupied - parking occupancy status ("occupied" or "free");
parking_session_iterator - short serial number of parking session. Iterator (number) is incrementing when new parking session starts (0-7);
previous_status_duration_min - duration of previous sensor status;
Heartbeat
The message is sent to confirm the health status of a sensor every 3 hours in case of unchanged occupancy status.
Method: PUT/POST
Template Body:
{ "device_id": "{modem_id}", "position":{ "network_id": "{network_id}", "custom_id": "{custom_id}", "latitude": {latitude}, "longitude": {longitude}, "group_inner_id": {group_inner_id}, "group":{ "id": {group_id}, "name": "{group_name}", "zone_id": {zone_id} } }, "message_type": "heartbeat", "message_trace_id": "{message_trace_id}", "parking_session_iterator": {parsed["parking_session_iterator"]}, "occupied": "{"occupied" if parsed["occupation_status"] is True else "free"}", "heartbeat_message_counter": {parsed["heartbeat_message_counter"]} }
message_type - message type;
message_trace_id - system message-id;
parking_session_iterator - short number of parking session. Iterator is incrementing when parking session starts (0-7);
occupied - parking occupancy status ("occupied" or "free");
heartbeat_message_counter - the value increases for every following heartbeat during single occupancy state (0-11);
User Registration (SDI Tag)
The message is sent to inform that a user has checked using an SDI tag.
Method: PUT/POST
Template Body:
{ "device_id": "{modem_id}", "position":{ "network_id": "{network_id}", "custom_id": "{custom_id}", "latitude": {latitude}, "longitude": {longitude}, "group_inner_id": {group_inner_id}, "group":{ "id": {group_id}, "name": "{group_name}", "zone_id": {zone_id} } }, "message_type": "user_registration", "message_trace_id": "{message_trace_id}", "occupied": "{"occupied" if parsed["occupation_status"] is True else "free"}", "auth_ble_tag": { "tag_id": "{parsed["user_ID"]}", "event_time": "{iso8601(message_time)}" } }
message_type - message type;
message_trace_id - system message-id;
parking_session_iterator - short serial number of parking session. Iterator (number) is incrementing when new parking session starts (0-7);
occupied- parking occupancy status ("occupied" or "free");
auth_ble_tag
tag_id - an ID of Bluetooth tag which was used for authorization;
event_time - message reception time.