The event is the main part of this data ingestion API. This element is where the information of the event generated by each of the devices will be sent to the platform in real time.
-
Method: POST
-
URL: {baseUrl}/v1/event
-
Body:
{ "actionId": "CLI_100", "beaconId": "cff92179-dc0a-47da-bd9e-5e9c5b14d251", "beaconTypeId": "1", "timestamp": "{{$timestamp}}", "lon": -3.767109, "lat": 41.954368, "eventTypeId": "2", "hdop": "5" }
* = Required field
-
actionId * (text): unique event identifier
-
beaconId * (text): unique beacon identifier (for example, the MAC)
-
beaconTypeId * (integer number): beacon type identifier. Possible values in / beaconTypes. 1 = App, 2 = Beacon
-
timestamp * (UTC time): date and time in UTC format of when the event was generated. It must be a maximum of 30 seconds old with respect to UTC time. The date must end with the character 'Z' that marks that it is in UTC
-
lon * (decimal number): longitude in WGS 84 coordinate system where the event was generated
-
lat * (decimal number): latitude in WGS 84 coordinate system where the event was generated
-
evenTypeId * : identifier of the event type. Possible values 2 = Inside risk zone, 3 = Outside risk zone
-
hdop * (integer number): DOP value to determine the quality of the GPS information. More information here
Requirements
In order to maintain the quality of the messages, the following requirements shall apply to the content of the messages:
- The geographical position must be contained within the Spanish territory.
- The order, quantity and frequency of the messages are set out below:
- Events of type Inside risk area, as many messages as the user is inside the risk area, one message every 15 seconds.
- Events of type Exit risk zone, a single message.
- The position provided by the GPS must not have an error greater than 5 metres.
- Events will be accepted with a maximum age of 15 seconds with respect to UTC time, and that is not a future data. In case of non-compliance, an HTTP Status: 400 Bad Request Error code: 10 will be received