Get Alerts (Safe Zone)

Please use this (https://blkem.com/mobile_api/get_alerts) API for fetching alerts, nearby alerts


Get parameters

Field Value Remarks
session_id ‚ÄčAccess token ID E.g. de25cc16eb00960f076...
page_size ‚ÄčTotal records limit for each request Recommended: 20
type Alert Type ID E.g. 12
offset Last record offset ID This is only needed when loading records of the pagination system.
order 'ASC' or 'DESC' Default order by is with ID and if nearby records are pulled order by will be by distance
latitude User's latitude Required if nearby records to be pulled
longitude User's longitude Required if nearby records to be pulled
distance Alerts within this distance (miles) Required if nearby records to be pulled

Success response

{
    "code": 200,
    "message": "Fetched successfully",
    "data": [
        {
            "id": 21,
            "type_id": 6,
            "type_option": "Mass shooting",
            "address": "123 Ayers Junction Road ME Pembroke, 04666 US",
            "lat": "40.6974034",
            "lng": "-74.1197634",
            "user_id": 6098,
            "time": "15 days ago",
            "active": 1,
            "type_name": "Shooting",
            "username": "abiidars",
            "type_thumbnail": "",
            "distance": 8,
            "time_str": "2022-08-12 19:53:33"
        }
    ]
}

Error responses

{
        "code": 401,
        "data": [],
        "message": "Unauthorized Access"
    }

    {
        "code": 404,
        "message": "No data found",
        "data": []
    }

    {
        "code": 500,
        "message": "latitude, longitude, and distance should be used all together",
        "data": []
    }