TerraGo API

Alerts & Events

Organization-wide feed of trip alerts and events across every trip (e.g. SOS, speeding, route deviation, harsh events), aggregated for monitoring dashboards rather than scoped to a single trip.

1 endpoint(s)
GET List All Alerts & Events (Org-Wide) {{url}}/trips/trip-alerts/all

Organization-wide feed of alerts/events across all trips you have visibility over (not scoped to one trip) — this is what powers a live notifications/alerts dashboard.

Query Parameters

  • per_page (integer, optional, default 10, max 20)
  • order (string, optional, default desc): asc or desc, sorts by when the event was recorded.
  • grouped (boolean, optional): When true, collapses alerts that were raised for multiple students at once into a single row (grouped by the shared event hash).
  • date_range (string, optional): "YYYY-MM-DD,YYYY-MM-DD".
  • severity (array, optional): One or more of INFO, WARNING, CRITICAL, e.g. severity[]=CRITICAL&severity[]=WARNING.
  • dependant_ids (array, optional): Filter to specific children.
  • trip_id (string UUID, optional): Filter to a single trip.

Notes

  • Only returns alerts from trips you supervise.
Auth
Bearer token
Request Body
{
    // "date_range": "2025-10-23 14:03:21, 2025-10-23 14:03:21",
    "per_page": 10,
    "page": 1
}
Sample Response (200 OK)
{
    "data": [
        {
            "id": "b40a2131-4796-429d-977b-962f275a1dd2",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 37,
                "first_name": "Middle",
                "middle_name": null,
                "last_name": "PM"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "3a2ebbd7-c483-4ba5-987d-ffe1b1812dd5",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 30,
                "first_name": "Junior",
                "middle_name": null,
                "last_name": "Pm"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "dc9c2366-2b47-4ccf-ab5b-0cd9aac112d1",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 37,
                "first_name": "Middle",
                "middle_name": null,
                "last_name": "PM"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "ea11a006-9e26-46a6-9ae2-346fbabd6de9",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 30,
                "first_name": "Junior",
                "middle_name": null,
                "last_name": "Pm"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "e5c66910-89e3-412c-9ec5-b5767e49f727",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 30,
                "first_name": "Junior",
                "middle_name": null,
                "last_name": "Pm"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "040333f9-6966-4576-aabf-a20605dd6a9f",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 37,
                "first_name": "Middle",
                "middle_name": null,
                "last_name": "PM"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "c10691d7-77b1-4c42-9775-27dba290f8c2",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 37,
                "first_name": "Middle",
                "middle_name": null,
                "last_name": "PM"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "07987e5d-09dd-440f-b5e8-2a6ee6d14d01",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 30,
                "first_name": "Junior",
                "middle_name": null,
                "last_name": "Pm"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "4449d8e1-3b3e-4df9-8327-6277c6362e6a",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 7,
                "first_name": "Kids",
                "middle_name": "L",
                "last_name": "Name"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        },
        {
            "id": "b4693a4f-98d7-474c-8bab-27545d1b0628",
            "trip_id": "a6a0e8a2-057c-40ac-bed1-4e49fb050f7d",
            "dependant": {
                "id": 9,
                "first_name": "Simon",
                "middle_name": "Kimani",
                "last_name": "Chege"
            },
            "severity": "Info",
            "event_type": "Flat Tire",
            "event_details": "Tire Punchure",
            "message": "Dear Guardian, Bus KZA 234R has a punchure, kindly note the delay!",
            "recorded_at": "2025-06-06 12:12:12"
        }
    ],
    "links": {
        "first": "http://terrago.test/api/trips/trip-alerts/all?page=1",
        "last": "http://terrago.test/api/trips/trip-alerts/all?page=2",
        "prev": null,
        "next": "http://terrago.test/api/trips/trip-alerts/all?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "page": null,
                "active": false
            },
            {
                "url": "http://terrago.test/api/trips/trip-alerts/all?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": "http://terrago.test/api/trips/trip-alerts/all?page=2",
                "label": "2",
                "page": 2,
                "active": false
            },
            {
                "url": "http://terrago.test/api/trips/trip-alerts/all?page=2",
                "label": "Next »",
                "page": 2,
                "active": false
            }
        ],
        "path": "http://terrago.test/api/trips/trip-alerts/all",
        "per_page": 10,
        "to": 10,
        "total": 14
    },
    "status": 200,
    "message": "Alert And Events Retrieved Successfully"
}