Mertrack API docs

#Unread events

#API actions

API path: /history/unread.

#list

List less than or equal to limit of the latest user's unread history events. Described how it works in our guide.

#Parameters

name description type
limit Optional. Limit of entries in response. int
from Optional. Start date/time for searching. Default from is now minus one year. date/time

Default and max limit is history.maxLimit.

#Examples

curl -X POST 'https://api.mergroup.be/history/unread/list' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
https://api.mergroup.be/history/unread/list?hash=a6aa75587e5c59c32d347da438505fc3

#Response

{
  "success": true,
  "list": [
    {
      "id": 1,
      "type": "tracker",
      "is_read": false,
      "message": "Alarm",
      "time": "2020-01-01 00:00:00",
      "event": "offline",
      "tracker_id": 2,
      "rule_id": 3,
      "track_id": 4,
      "location": {
        "lat": 50.0,
        "lng": 60.0,
        "precision": 50
      },
      "address": "address",
      "extra": {
        "task_id": null,
        "parent_task_id": null,
        "counter_id": null,
        "service_task_id": null,
        "checkin_id": null,
        "place_ids": null,
        "last_known_location": false,
        "tracker_label": "Tracker label",
        "emergency": false,
        "employee_id": 4563
      }
    }
  ]
}

#Errors

#count

Get count of user's unread history messages starting from date.

#Parameters

name description type
from Optional. Start date/time for searching. Default from is now minus one year. date/time
type Optional. Type of devices that should be count. Can be "socket", "tracker", or "camera". enum

#Examples

curl -X POST 'https://api.mergroup.be/history/unread/count' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
https://api.mergroup.be/history/unread/count?hash=a6aa75587e5c59c32d347da438505fc3

#Response

{
  "success": true,
  "count": 1
}

#Errors