Geofences & Asset Monitoring API (1.0.0 Beta)

A comprehensive REST API for real-time asset tracking, geofence management, and event monitoring. This API enables you to create and manage geographical boundaries (geofences), track asset locations, configure monitoring rules for geofence events and speeding alerts, and manage trip data with detailed route tracking

geofences

Operations on Geofences

Add or Update Geofence Areas

Description

Use this endpoint to add or update geofence areas. Each geofence is defined by its type, name, keywords, properties, and geographic data. The endpoint supports batch operations of up to 1,000 geofences per request.

Request Body Parameters

The request body must be a JSON object containing the following parameters:

  • geofences (Array of objects): An array of geofence objects. Each geofence object includes:

    • p_id (string | optional): Unique id for the geofence. If not provided, an unique ID will be automatically generated in UUID format.

    • p_type (string): The type of the geofence, "circle", "rectangle" or "polygon".

    • p_name (string | optional): A name for the geofence.

    • p_keywords (array of strings | optional): Keywords associated with the geofence, used for searching or filtering.

    • p_properties (object | optional): Additional JSON properties related to the geofence.

    • p_geojson (object): Geographical information formatted as JSON, which includes:

      • type (string): The type of geometry, "Circle", "Rectangle" or "Polygon".

      • coordinates (Array): An array of coordinates defining the geofence area.

Response

On a successful request, the API will return a JSON array containing the following:

  • id (string): The unique identifier for the added geofence.

  • error (string): Any error message related to the request (if applicable).

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Add or Update Geofence Areas

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "geofences": [
    • {
      • "p_id": "downtown_delivery_zone",
      • "p_type": "polygon",
      • "p_name": "Downtown Delivery Zone",
      • "p_keywords": [
        • "delivery",
        • "downtown",
        • "high-priority"
        ],
      • "p_properties": {
        • "zone_type": "commercial",
        • "business_hours": "9AM-5PM",
        • "priority_level": "high"
        },
      • "p_geojson": {
        • "type": "Polygon",
        • "coordinates": [
          • [
            • [
              • 25.612887465355413,
              • 45.64726535031616
              ],
            • [
              • 25.61121147416185,
              • 45.64649230324761
              ],
            • [
              • 25.61117691764221,
              • 45.644837463504615
              ],
            • [
              • 25.615081804342054,
              • 45.64501865272129
              ],
            • [
              • 25.61490902174404,
              • 45.6470479319062
              ],
            • [
              • 25.612887465355413,
              • 45.64726535031616
              ]
            ]
          ]
        }
      },
    • {
      • "p_id": "warehouse_safety_perimeter",
      • "p_type": "circle",
      • "p_name": "Main Warehouse Safety Zone",
      • "p_keywords": [
        • "warehouse",
        • "safety",
        • "restricted-area"
        ],
      • "p_properties": {
        • "facility_name": "Main Distribution Center",
        • "alert_on_exit": true,
        • "security_level": "high"
        },
      • "p_geojson": {
        • "type": "Circle",
        • "coordinates": [
          • [
            • [
              • 25.61192205497548,
              • 45.6469855615604
              ],
            • [
              • 200,
              • 200
              ]
            ]
          ]
        }
      },
    • {
      • "p_id": "employee_parking_lot",
      • "p_type": "rectangle",
      • "p_name": "Employee Parking Area",
      • "p_keywords": [
        • "parking",
        • "employee-only",
        • "facility"
        ],
      • "p_properties": {
        • "capacity": 50,
        • "access_type": "employee_only",
        • "operating_hours": "24/7"
        },
      • "p_geojson": {
        • "type": "Rectangle",
        • "coordinates": [
          • [
            • [
              • 25.609518204707996,
              • 45.641346436856224
              ],
            • [
              • 25.615669265172414,
              • 45.6440402239908
              ]
            ]
          ]
        }
      }
    ]
}

Response samples

Content type
application/json
Example
{
  • "geofence_ids": [
    • {
      • "id": "parking_lot_area",
      • "error": ""
      }
    ]
}

Update a Geofence

Description

This endpoint allows you to update an existing geofence area attributes such as name, keywords, properties or area. The request requires a JSON object containing specific parameters that define the geofence area you wish to update.

Request Body Parameters

The request body should be a JSON object containing the following parameters:

  • p_id (string): The unique identifier for the geofence area that needs to be updated.

  • p_type (string | optional): The type of the geofence area (e.g., rectangle). Optional when not updating the geofence area.

  • p_name (string | optional): The name of the geofence area.

  • p_keywords (Array of strings | optional): A list of keywords associated with the geofence area.

  • p_properties (object | optional): A JSON object containing the updated properties related to the geofence area

  • p_geojson (object | optional): Optional when not updating the geofence area. A JSON object representing the geographical data of the geofence area, which includes:

    • type (string): The type of geometry (e.g., Rectangle).

    • coordinates (Array): The coordinates defining the shape of the geofence.

Response

Upon a successful request, the API will return a response with the following structure:

  • id (string): The identifier of the updated geofence area.

  • error (string): Any error message if applicable; otherwise, it will be an empty string.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Update a Geofence

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_id": "downtown_delivery_zone",
  • "p_name": "Downtown Express Delivery Zone",
  • "p_keywords": [
    • "delivery",
    • "downtown",
    • "express",
    • "priority-shipping"
    ]
}

Response samples

Content type
application/json
Example
{
  • "id": "downtown_delivery_zone",
  • "error": ""
}

Delete Geofences

Description

This endpoint allows users to delete specified geofence areas from the system. The request requires a JSON payload containing an array of geofence area identifiers (IDs) to be removed and/or an array of keywords.

Request Body Parameters

  • p_ids (Array of strings | optional): A list of unique identifiers for the geofence areas that you wish to delete. Each identifier should be a valid geofence ID.

  • p_keywords (Array of strings | optional): A list of keywords for the geofence areas that you wish to delete.

Expected Response

Upon successful deletion, the API will respond with a JSON object indicating which geofence areas have been deleted.

  • deleted (Array of Strings): A list of identifiers for the geofence areas that were successfully deleted. If no areas were deleted, this array may be empty.

Notes

  • Ensure that the provided IDs and/or keywords are correct and correspond to existing geofence areas in the system.

  • This operation is irreversible; once a geofence area is deleted, it cannot be recovered.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Delete Geofences

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_ids": [
    • "downtown_delivery_zone"
    ],
  • "p_keywords": [
    • "warehouse"
    ]
}

Response samples

Content type
application/json
{
  • "deleted": [
    • "downtown_delivery_zone",
    • "employee_parking_lot",
    • "parking_lot_area",
    • "warehouse_safety_perimeter",
    • "warehouse_safe_zone"
    ]
}

Get Geofences by IDs

Description

This endpoint retrieves geofence area details in GeoJSON format. It allows users to specify a list of geofence IDs to fetch their corresponding data.

Request Body Parameters

  • p_ids (Array of strings): A list of geofence IDs to be retrieved.

Response

The response is a GeoJSON object that contains the following fields:

  • type (string): GeoJSON feature collection.

  • features (Array of objects): A collection of geofence features, each containing:

    • id (string): The unique identifier for the geofence.

    • name (string): The name of the geofence.

    • type (string): The type of geofence.

    • geometry (object): The geometric representation of the geofence, which includes:

      • type (string): The type of geometry (always Polygon).

      • coordinates (Array): An array of coordinates defining the shape of the geofence.

    • keywords (Array of strings): A list of keywords associated with the geofence.

    • properties (object): Additional JSON properties related to the geofence, which may include custom attributes.

    • type_geofence (string): The specific type of geofence (circle, rectangle or polygon).

    • rectangle_max_xy (Array of numbers): Only for rectangle geofences. The maximum longitude and latitude defining the bounding rectangle of the geofence.

    • rectangle_min_xy (Array of numbers): Only for rectangle geofences. The minimum longitude and latitude defining the bounding rectangle of the geofence.

    • circle_center (Array of numbers):
      Only for circle geofences. The circle area center point longitude and latitude.

    • circle_radius (Array of numbers):
      Only for circle geofences. The circle radius in meters.

    • created_at (integer): Unix timestamp of when the geofence was created.

    • updated_at (integer): Unix timestamp of the last update to the geofence.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Geofences by IDs

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_ids": [
    • "downtown_delivery_zone",
    • "suburban_delivery_zone",
    • "airport_delivery_zone",
    • "warehouse_delivery_zone"
    ]
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    • {
      • "id": "downtown_delivery_zone",
      • "name": "Downtown Express Delivery Zone",
      • "type": "Feature",
      • "geometry": {
        • "type": "Polygon",
        • "coordinates": [
          • [
            • [
              • 25.6128875,
              • 45.647265312
              ],
            • [
              • 25.611211562,
              • 45.646492188
              ],
            • [
              • 25.611176875,
              • 45.6448375
              ],
            • [
              • 25.615081875,
              • 45.64501875
              ],
            • [
              • 25.614909062,
              • 45.647047812
              ],
            • [
              • 25.6128875,
              • 45.647265312
              ]
            ]
          ]
        },
      • "keywords": [
        • "delivery",
        • "downtown",
        • "express",
        • "priority-shipping"
        ],
      • "created_at": 1766400405,
      • "properties": { },
      • "updated_at": 1766400418,
      • "type_geofence": "polygon"
      }
    ]
}

Get Geofences by Keywords

Description

This endpoint retrieves geofence areas based on the specified keywords list. It allows users to paginate through the results for better management of large datasets.

Request Body Parameters

  • p_keywords (Array of strings | optional): A list of keywords to filter the geofences. For example, ["warehouse"].

  • p_min_longitude (float | optional): The minimum longitude of the bounding box.

  • p_min_latitude (float | optional): The minimum latitude of the bounding box.

  • p_max_longitude (float | optional): The maximum longitude of the bounding box.

  • p_max_latitude (float | optional): The maximum latitude of the bounding box.

  • p_page_no (integer | optional): The page number of the results to retrieve, starting from 1.

  • p_entries_per_page (integer | optional): The number of entries to return per page (default 1000).

Response

The response is a JSON object that contains the following fields:

  • data (object): JSON object containing geofences data

    • type (string): GeoJSON feature collection.

    • features (Array of objects): A collection of geofence features, each containing:

      • id (string): The unique identifier for the geofence.

      • name (string): The name of the geofence.

      • type (string): The type of geofence.

      • geometry (Object): The geometric representation of the geofence, which includes:

        • type (string): The type of geometry (always Polygon).

        • coordinates (Array): An array of coordinates defining the shape of the geofence.

      • keywords (Array of strings): A list of keywords associated with the geofence.

      • properties (Object): Additional properties related to the geofence, which may include custom attributes.

      • type_geofence (string): The specific type of geofence (circle, rectangle or polygon).

      • rectangle_max_xy (Array of numbers): Only for rectangle geofences. The maximum longitude and latitude defining the bounding rectangle of the geofence.

      • rectangle_min_xy (Array of numbers): Only for rectangle geofences. The minimum longitude and latitude defining the bounding rectangle of the geofence.

      • circle_center (Array of numbers):
        Only for circle geofences. The circle area center point longitude and latitude.

      • circle_radius (Array of numbers):
        Only for circle geofences. The circle radius in meters.

      • created_at (integer): Unix timestamp of when the geofence was created.

      • updated_at (integer): Unix timestamp of the last update to the geofence.

  • page (object): Pagination information including:

    • page_no (integer): The current page number.

    • has_more (boolean): Indicates if there are more entries available.

    • total_pages (integer): Total number of pages available.

    • total_entries (integer): Total number of entries available.

    • offset_entries (integer): Number of entries offset from the start.

    • entries_per_page (integer): Number of entries per page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Geofences by Keywords

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_keywords": [
    • "warehouse"
    ],
  • "p_min_longitude": 25.59,
  • "p_min_latitude": 45.64,
  • "p_max_longitude": 25.63,
  • "p_max_latitude": 45.66,
  • "p_page_no": 1,
  • "p_entries_per_page": 1000
}

Response samples

Content type
application/json
{
  • "data": {
    • "type": "FeatureCollection",
    • "features": [
      • {
        • "id": "downtown_delivery_zone",
        • "name": "Downtown Express Delivery Zone",
        • "type": "Feature",
        • "geometry": {
          • "type": "Polygon",
          • "coordinates": [
            • [
              • [
                • 25.6128875,
                • 45.647265312
                ],
              • [
                • 25.611211562,
                • 45.646492188
                ],
              • [
                • 25.611176875,
                • 45.6448375
                ],
              • [
                • 25.615081875,
                • 45.64501875
                ],
              • [
                • 25.614909062,
                • 45.647047812
                ],
              • [
                • 25.6128875,
                • 45.647265312
                ]
              ]
            ]
          },
        • "keywords": [
          • "delivery",
          • "downtown",
          • "express",
          • "priority-shipping"
          ],
        • "created_at": 1766400405,
        • "properties": { },
        • "updated_at": 1766400418,
        • "type_geofence": "polygon"
        },
      • {
        • "id": "employee_parking_lot",
        • "name": "Employee Parking Area",
        • "type": "Feature",
        • "geometry": {
          • "type": "Polygon",
          • "coordinates": [
            • [
              • [
                • 25.609518125,
                • 45.641346562
                ],
              • [
                • 25.609518125,
                • 45.644040312
                ],
              • [
                • 25.615669375,
                • 45.644040312
                ],
              • [
                • 25.615669375,
                • 45.641346562
                ],
              • [
                • 25.609518125,
                • 45.641346562
                ]
              ]
            ]
          },
        • "keywords": [
          • "parking",
          • "employee-only",
          • "facility"
          ],
        • "created_at": 1766390783,
        • "properties": {
          • "alert_on_exit": "1",
          • "facility_name": "Main Distribution Center",
          • "security_level": "high"
          },
        • "updated_at": 1766400405,
        • "type_geofence": "rectangle",
        • "rectangle_max_xy": [
          • 25.615669375,
          • 45.6440403125
          ],
        • "rectangle_min_xy": [
          • 25.609518125,
          • 45.6413465625
          ]
        },
      • {
        • "id": "parking_lot_area",
        • "name": "Employee Parking Zone (Circular)",
        • "type": "Feature",
        • "geometry": {
          • "type": "Polygon",
          • "coordinates": [
            • [
              • [
                • 25.614517995,
                • 45.642716687
                ],
              • [
                • 25.614487513,
                • 45.642452917
                ],
              • [
                • 25.614384254,
                • 45.642198387
                ],
              • [
                • 25.614212189,
                • 45.641962877
                ],
              • [
                • 25.61397793,
                • 45.641755438
                ],
              • [
                • 25.61369048,
                • 45.641584042
                ],
              • [
                • 25.613360885,
                • 45.641455274
                ],
              • [
                • 25.613001811,
                • 45.641374084
                ],
              • [
                • 25.612627056,
                • 45.64134359
                ],
              • [
                • 25.61225102,
                • 45.641364964
                ],
              • [
                • 25.611888154,
                • 45.641437386
                ],
              • [
                • 25.611552401,
                • 45.641558072
                ],
              • [
                • 25.611256664,
                • 45.641722385
                ],
              • [
                • 25.611012307,
                • 45.64192401
                ],
              • [
                • 25.610828721,
                • 45.642155199
                ],
              • [
                • 25.610712961,
                • 45.642407069
                ],
              • [
                • 25.610669478,
                • 45.642669941
                ],
              • [
                • 25.610699942,
                • 45.642933711
                ],
              • [
                • 25.610803185,
                • 45.643188245
                ],
              • [
                • 25.610975239,
                • 45.643423759
                ],
              • [
                • 25.611209493,
                • 45.643631204
                ],
              • [
                • 25.611496946,
                • 45.643802607
                ],
              • [
                • 25.61182655,
                • 45.64393138
                ],
              • [
                • 25.612185639,
                • 45.644012574
                ],
              • [
                • 25.612560412,
                • 45.64404307
                ],
              • [
                • 25.612936465,
                • 45.644021694
                ],
              • [
                • 25.613299347,
                • 45.64394927
                ],
              • [
                • 25.61363511,
                • 45.643828579
                ],
              • [
                • 25.613930852,
                • 45.64366426
                ],
              • [
                • 25.614175207,
                • 45.643462629
                ],
              • [
                • 25.614358783,
                • 45.643231434
                ],
              • [
                • 25.614474529,
                • 45.64297956
                ],
              • [
                • 25.614517995,
                • 45.642716687
                ]
              ]
            ]
          },
        • "keywords": [
          • "parking",
          • "employee",
          • "facility"
          ],
        • "created_at": 1766159696,
        • "properties": { },
        • "updated_at": 1766400424,
        • "circle_center": [
          • 25.6125937353789,
          • 45.6426933337818
          ],
        • "circle_radius": 150,
        • "type_geofence": "circle"
        },
      • {
        • "id": "warehouse_safety_perimeter",
        • "name": "Warehouse Complex - All Buildings",
        • "type": "Feature",
        • "geometry": {
          • "type": "Polygon",
          • "coordinates": [
            • [
              • [
                • 25.609,
                • 45.644
                ],
              • [
                • 25.609,
                • 45.648
                ],
              • [
                • 25.615,
                • 45.648
                ],
              • [
                • 25.615,
                • 45.644
                ],
              • [
                • 25.609,
                • 45.644
                ]
              ]
            ]
          },
        • "keywords": [
          • "warehouse",
          • "safety",
          • "restricted-area",
          • "all-buildings",
          • "security-zone"
          ],
        • "created_at": 1766400405,
        • "properties": {
          • "alert_on_exit": 1,
          • "facility_name": "Main Distribution Complex",
          • "alert_on_entry": 1,
          • "security_level": "maximum",
          • "updated_reason": "Expanded to include new buildings B and C",
          • "24_7_monitoring": 1,
          • "buildings_covered": [
            • "A",
            • "B",
            • "C"
            ],
          • "emergency_contact": "+1-555-0123"
          },
        • "updated_at": 1766400428,
        • "type_geofence": "rectangle",
        • "rectangle_max_xy": [
          • 25.615,
          • 45.648
          ],
        • "rectangle_min_xy": [
          • 25.609,
          • 45.644
          ]
        },
      • {
        • "id": "warehouse_safe_zone",
        • "name": "Warehouse Safety Perimeter",
        • "type": "Feature",
        • "geometry": {
          • "type": "Polygon",
          • "coordinates": [
            • [
              • [
                • 25.614488063,
                • 45.647016778
                ],
              • [
                • 25.614447418,
                • 45.646665085
                ],
              • [
                • 25.614309731,
                • 45.646325711
                ],
              • [
                • 25.614080295,
                • 45.646011698
                ],
              • [
                • 25.613767929,
                • 45.645735112
                ],
              • [
                • 25.613384637,
                • 45.645506583
                ],
              • [
                • 25.612945148,
                • 45.645334891
                ],
              • [
                • 25.61246635,
                • 45.645226635
                ],
              • [
                • 25.611966643,
                • 45.645185973
                ],
              • [
                • 25.611465228,
                • 45.645214469
                ],
              • [
                • 25.610981371,
                • 45.645311027
                ],
              • [
                • 25.610533667,
                • 45.645471938
                ],
              • [
                • 25.610139318,
                • 45.645691017
                ],
              • [
                • 25.60981348,
                • 45.645959846
                ],
              • [
                • 25.609568673,
                • 45.646268096
                ],
              • [
                • 25.609414308,
                • 45.646603921
                ],
              • [
                • 25.609356316,
                • 45.646954415
                ],
              • [
                • 25.60939693,
                • 45.647306109
                ],
              • [
                • 25.609534589,
                • 45.647645488
                ],
              • [
                • 25.609764005,
                • 45.64795951
                ],
              • [
                • 25.610076364,
                • 45.648236106
                ],
              • [
                • 25.610459661,
                • 45.648464647
                ],
              • [
                • 25.610899166,
                • 45.648636348
                ],
              • [
                • 25.611377989,
                • 45.648744612
                ],
              • [
                • 25.611877728,
                • 45.648785276
                ],
              • [
                • 25.612379175,
                • 45.648756779
                ],
              • [
                • 25.612863059,
                • 45.648660215
                ],
              • [
                • 25.613310782,
                • 45.648499296
                ],
              • [
                • 25.613705139,
                • 45.648280206
                ],
              • [
                • 25.614030973,
                • 45.648011365
                ],
              • [
                • 25.614275763,
                • 45.647703106
                ],
              • [
                • 25.614430103,
                • 45.647367275
                ],
              • [
                • 25.614488063,
                • 45.647016778
                ]
              ]
            ]
          },
        • "keywords": [
          • "warehouse",
          • "safety",
          • "restricted"
          ],
        • "created_at": 1766400411,
        • "properties": { },
        • "updated_at": 1766400411,
        • "circle_center": [
          • 25.6119221881739,
          • 45.6469856317244
          ],
        • "circle_radius": 200,
        • "type_geofence": "circle"
        }
      ]
    },
  • "page": {
    • "total_entries": 5,
    • "offset_entries": 0,
    • "total_pages": 1,
    • "page_no": 1,
    • "entries_per_page": 1000,
    • "has_more": false
    }
}

Check Locations in Geofences

Description

This endpoint checks whether specified locations are contained within given geofences. It is useful for applications that need to determine if certain geographical points fall within predefined areas.

Request Body Parameters

The request body must be in JSON format and should include the following parameters:

  • p_geofence_ids (Array of strings): An array of geofence identifiers that you want to check against.

  • p_locations (Array of arrays): An array of locations, where each location is represented as an array containing longitude and latitude values. For example, [[longitude, latitude]].

Response

The response will be in JSON format and will include the following structure:

  • checked_geofences (Array): An array containing the results for each geofence checked.

    • locations (Array): An array of location results for each geofence.

      • index (integer): The index of the location in the original request.

      • inside (boolean): A flag indicating whether the location is inside the geofence.

      • distance_m (number): The distance in meters from the location to the nearest point of the geofence.

    • geofence_id (string): The identifier of the geofence that was checked.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Check Locations in Geofences

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_geofence_ids": [
    • "parking_lot_area",
    • "warehouse_safe_zone",
    • "employee_parking_lot"
    ],
  • "p_locations": [
    • [
      • 25.608396,
      • 45.636208
      ],
    • [
      • 25.628249,
      • 45.653283
      ],
    • [
      • 25.615265,
      • 45.654491
      ]
    ]
}

Response samples

Content type
application/json
{
  • "checked_geofences": [
    • {
      • "locations": [
        • {
          • "index": 0,
          • "inside": false,
          • "distance_m": 642
          },
        • {
          • "index": 1,
          • "inside": false,
          • "distance_m": 1546
          },
        • {
          • "index": 2,
          • "inside": false,
          • "distance_m": 1178
          }
        ],
      • "geofence_id": "parking_lot_area"
      },
    • {
      • "locations": [
        • {
          • "index": 0,
          • "inside": false,
          • "distance_m": 1029
          },
        • {
          • "index": 1,
          • "inside": false,
          • "distance_m": 1253
          },
        • {
          • "index": 2,
          • "inside": false,
          • "distance_m": 675
          }
        ],
      • "geofence_id": "warehouse_safe_zone"
      },
    • {
      • "locations": [
        • {
          • "index": 0,
          • "inside": false,
          • "distance_m": 578
          },
        • {
          • "index": 1,
          • "inside": false,
          • "distance_m": 1420
          },
        • {
          • "index": 2,
          • "inside": false,
          • "distance_m": 1162
          }
        ],
      • "geofence_id": "employee_parking_lot"
      }
    ]
}

Get Proximity Geofences

Description

This endpoint retrieves geofence proximity areas based on the specified location and parameters. It allows users to find nearby geofences within a defined distance.

Request Body Parameters

The request requires the following parameters in the JSON payload:

  • p_location (Array of floats): An array containing latitude coordinates of the location for which proximity areas are to be retrieved.

  • p_limit_count (integer): The maximum number of proximity areas to return.

  • p_distance_tolerance_m (integer): The distance tolerance in meters to consider when searching for proximity areas.

  • p_keywords (Array of strings): Optional, an array of keywords to filter the nearest geofence areas based on specific criteria.

Response

The response will be an array of objects, each representing a geofence proximity area. The structure of each object in the response includes:

  • id (string): The unique identifier for the geofence.

  • name (string): The name of the geofence.

  • contains_point (boolean): Indicates whether the specified location is within the geofence.

  • distance_to_border (integer): The distance in meters from the specified location to the nearest border of the geofence.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Proximity Geofences

object

Responses

Response Schema: application/json
arrays
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_location": [
    • 25.612211,
    • 45.647781
    ],
  • "p_limit_count": 10,
  • "p_distance_tolerance_m": 1000,
  • "p_keywords": [
    • "parking"
    ]
}

Response samples

Content type
application/json
[
  • {
    • "id": "employee_parking_lot",
    • "name": "Employee Parking Area",
    • "contains_point": false,
    • "distance_to_border": -415.7519527
    },
  • {
    • "id": "parking_lot_area",
    • "name": "Employee Parking Zone (Circular)",
    • "contains_point": false,
    • "distance_to_border": -416.34199005
    }
]

assets

Operations on Assets

Add Asset

Description

This endpoint allows users to add a new asset to the system. An asset represents an entity that needs to be tracked. The asset details provided will help in tracking and managing the asset effectively.

Request Body Parameters

  • p_id (string | optional): A unique identifier for the asset. If not provided, an unique ID will be generated in UUID format.

  • p_name (string | optional): The name of the asset. This should provide a clear indication of what the asset is.

  • p_description (string | optional): A detailed description of the asset. This can include information about the asset's purpose and features.

  • p_properties (object | optional): A JSON object containing specific properties of the asset. By assigning properties to assets and monitors, users can conveniently track assets that share common properties, enabling collective monitoring of assets. For example, properties such as "department": "logistics" or "zone": "downtown" can be used to group assets and efficiently monitor their activities.

  • p_state (string | optional): The current state of the asset (e.g., active - location changed in the last 7 days, inactive). If not specified, the default state is "inactive".

  • p_type (string): The type of asset being added. This categorizes the asset within the system. Only "user" supported at the moment.

  • p_user_id (integer): The user ID that will send location updates for this asset.

Response

Upon successfully adding the asset, the API will return a JSON response containing:

  • id (string): The unique identifier assigned to the newly created asset.

  • error (string): In case of an error during the asset creation process, this field will contain the error message.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Add Asset

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_id": "vehicle_101",
  • "p_name": "Delivery Van 101",
  • "p_description": "Primary delivery vehicle for downtown routes",
  • "p_properties": {
    • "vehicle_type": "van",
    • "license_plate": "ABC-123",
    • "department": "logistics",
    • "zone": "downtown",
    • "capacity_kg": 1000
    },
  • "p_state": "active",
  • "p_type": "user",
  • "p_user_id": 1001
}

Response samples

Content type
application/json
{
  • "id": "bike_301",
  • "error": ""
}

Get Assets by IDs

Description

This endpoint retrieves asset details based on the provided asset IDs. It allows users to obtain information about specific assets in the system.

Request Body

The request body must be in JSON format and should include the following parameter:

  • p_ids (Array of strings): A list of asset IDs for which details are requested. Each ID should be a string representing a unique asset.

Response

The response will return a JSON object containing an array of asset details. Each asset object includes the following fields:

  • id (string): The unique identifier of the asset.

  • name (string): The name of the asset.

  • state (string): The current state of the asset: "active" - location was updated in the last 7 days, "inactive" - last tracked location is older than 7 days.

  • created_at (integer): The unix timestamp of when the asset was created.

  • properties (object): Additional properties related to the asset, used for monitoring.

  • updated_at (integer): The unix timestamp of the last update to the asset.

  • description (string): A description of the asset.

  • gps_device_id (string): The ID of the GPS device associated with the asset.

  • last_location (object): An object containing the last known location details, including:

    • speed (float): The speed of the asset.

    • bearing (float): The bearing of the asset.

    • accuracy (float): Accuracy of the location data.

    • altitude (float): Altitude of the asset.

    • timestamp (integer): Unix timestamp of the last location update.

    • coordinates (array): An array containing the GPS coordinates in the form of [longitude, latitude].

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Assets by IDs

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_ids": [
    • "vehicle_101"
    ]
}

Response samples

Content type
application/json
{
  • "assets": [
    • {
      • "id": "bike_301",
      • "name": "Courier Bike 301",
      • "state": "active",
      • "created_at": 1766481314,
      • "properties": {
        • "zone": "city_center",
        • "department": "express_delivery",
        • "asset_number": "BK-301",
        • "vehicle_type": "e_bike",
        • "battery_range_km": 80
        },
      • "updated_at": 1766481314,
      • "description": "Electric bike for express urban deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 6,
        • "bearing": 15,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.610245,
          • 45.648660938
          ]
        }
      },
    • {
      • "id": "truck_205",
      • "name": "Heavy Duty Truck 205",
      • "state": "active",
      • "created_at": 1766480766,
      • "properties": {
        • "zone": "regional",
        • "department": "freight",
        • "capacity_kg": 5000,
        • "vehicle_type": "truck",
        • "license_plate": "XYZ-789",
        • "trailer_attached": 1
        },
      • "updated_at": 1766480766,
      • "description": "Long-haul freight truck for interstate deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 15,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.60871,
          • 45.647718125
          ]
        }
      },
    • {
      • "id": "vehicle_101",
      • "name": "Delivery Van 101",
      • "state": "active",
      • "created_at": 1766480112,
      • "properties": {
        • "zone": "downtown",
        • "department": "logistics",
        • "capacity_kg": 1000,
        • "vehicle_type": "van",
        • "license_plate": "ABC-123"
        },
      • "updated_at": 1766480112,
      • "description": "Primary delivery vehicle for downtown routes",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 18,
        • "bearing": 45,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.614075938,
          • 45.648579062
          ]
        }
      }
    ]
}

Get Assets by Properties

Description

This endpoint retrieves a list of assets based on specified properties and filters. It allows users to paginate through the results for better management of large datasets.

Request Body Parameters

The request requires a JSON payload with the following parameters:

  • p_properties (object): A JSON object that defines the properties to filter the assets.

  • p_filter (string): Specifies the filtering method. It can take values all_of or any_of to indicate how the properties should be combined.

  • p_page_no (integer): The page number of the results to retrieve, starting from 1.

  • p_entries_per_page (integer): The number of entries to return per page.

Response

The response will be a JSON object containing the following structure:

  • assets (Array of objects): A list of asset objects, each containing:

    • id (string): The unique identifier of the asset.

    • name (string): The name of the asset.

    • state (string): The current state of the asset, "active" - last tracked location is newer than 7 days, "inactive" - last tracked location is older than 7 days.

    • created_at (integer): Unix timestamp of when the asset was created.

    • properties (object): A JSON object containing various properties of the asset that can be used for monitoring.

    • updated_at (integer): Unix timestamp of the last update to the asset.

    • description (string): A brief description of the asset.

    • gps_device_id (string): Identifier of the GPS device associated with the asset.

    • last_location (object): An object containing the last known location details, including:

      • speed (float): The speed of the asset.

      • bearing (float): The bearing of the asset.

      • accuracy (float): Accuracy of the location data.

      • altitude (float): Altitude of the asset.

      • timestamp (integer): Unix timestamp of the last location update.

      • coordinates (array): An array containing the GPS coordinates in the form of [longitude, latitude].

  • page (object): Pagination information including:

    • page_no (integer): The current page number.

    • has_more (boolean): Indicates if there are more entries available.

    • total_pages (integer): Total number of pages available.

    • total_entries (integer): Total number of entries available.

    • offset_entries (integer): Number of entries offset from the start.

    • entries_per_page (integer): Number of entries per page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Assets by Properties

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_properties": {
    • "zone": "city_center"
    },
  • "p_filter": "all_of",
  • "p_page_no": 1,
  • "p_entries_per_page": 20
}

Response samples

Content type
application/json
{
  • "assets": [
    • {
      • "id": "bike_301",
      • "name": "Courier Bike 301",
      • "state": "active",
      • "created_at": 1766481314,
      • "properties": {
        • "zone": "city_center",
        • "department": "express_delivery",
        • "asset_number": "BK-301",
        • "vehicle_type": "e_bike",
        • "battery_range_km": 80
        },
      • "updated_at": 1766481314,
      • "description": "Electric bike for express urban deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 6,
        • "bearing": 15,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.610245,
          • 45.648660938
          ]
        }
      },
    • {
      • "id": "truck_205",
      • "name": "Heavy Duty Truck 205",
      • "state": "active",
      • "created_at": 1766480766,
      • "properties": {
        • "zone": "regional",
        • "department": "freight",
        • "capacity_kg": 5000,
        • "vehicle_type": "truck",
        • "license_plate": "XYZ-789",
        • "trailer_attached": 1
        },
      • "updated_at": 1766480766,
      • "description": "Long-haul freight truck for interstate deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 15,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.60871,
          • 45.647718125
          ]
        }
      },
    • {
      • "id": "vehicle_101",
      • "name": "Delivery Van 101",
      • "state": "active",
      • "created_at": 1766480112,
      • "properties": {
        • "zone": "downtown",
        • "department": "logistics",
        • "capacity_kg": 1000,
        • "vehicle_type": "van",
        • "license_plate": "ABC-123"
        },
      • "updated_at": 1766480112,
      • "description": "Primary delivery vehicle for downtown routes",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 18,
        • "bearing": 45,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.614075938,
          • 45.648579062
          ]
        }
      }
    ],
  • "page": {
    • "page_no": 1,
    • "has_more": false,
    • "total_pages": 1,
    • "total_entries": 3,
    • "offset_entries": 0,
    • "entries_per_page": 20
    }
}

Delete Assets by Ids

Description

This endpoint allows the user to delete assets from the system based on their unique identifiers.

Request Body Parameters

  • p_ids (Array of Strings): This parameter is required and should contain the IDs of the assets you wish to delete.

Response

The response will be in JSON format and will include an array of deleted asset IDs:

  • deleted_ids (Array of strings): When the assets are successfully deleted, the response will contain the IDs of the deleted assets in JSON format.

Notes

  • The deleted_ids array in the response will list the IDs of the assets that were successfully deleted. An empty array signifies that no assets matched the provided IDs for deletion.
Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Delete Assets by Ids

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_ids": [
    • "test_asset_1",
    • "test_asset_2"
    ]
}

Response samples

Content type
application/json
{
  • "deleted_ids": [
    • "test_asset_1",
    • "test_asset_2"
    ]
}

Update an Asset

Description

This endpoint allows users to update the details of an existing asset in the system. It is designed to modify the properties of an asset identified by its unique ID.

Request Body

The request body must be sent in JSON format and should include the following parameters:

  • p_id (string): The unique identifier of the asset that you want to update.

  • p_name (string | optional): The name of the asset.

  • p_description (string | optional): A description of the asset, providing additional context or details.

  • p_properties (object | optional): A JSON object containing updated properties of the asset that can be used for assigning monitors.

Response

The response will also be in JSON format and may include the following fields:

  • id (string): The identifier of the updated asset, which may be returned to confirm the update.

  • error (string): An error message if the update fails, providing insight into what went wrong.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Update an Asset

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_id": "truck_205",
  • "p_name": "Heavy Duty Truck 205 - Long Haul",
  • "p_description": "Long-haul freight truck for interstate deliveries - recently upgraded",
  • "p_properties": {
    • "vehicle_type": "truck",
    • "license_plate": "XYZ-789",
    • "department": "freight",
    • "zone": "national",
    • "capacity_kg": 5000,
    • "trailer_attached": true,
    • "fuel_type": "diesel",
    • "gps_upgraded": true,
    • "last_inspection": "2025-12-20",
    • "driver_assigned": "Mike Johnson"
    },
  • "p_state": "active"
}

Response samples

Content type
application/json
{
  • "id": "vehicle_101",
  • "error": ""
}

Get Last Tracked Location of Asset

Description

This endpoint retrieves the most recent tracked location data for a specified asset.

Request Body

The request body must be in JSON format and should include the following parameter:

  • p_asset_id (string): The unique identifier of the asset for which the last location is being requested.

Response

Upon a successful request, the response will be in JSON format and will contain the following structure:

  • last_location_data (object): An object containing the latest location details of the asset.

    • speed (number): The speed of the asset at the last recorded location (m/s).

    • bearing (number): The direction the asset is facing at the last recorded location.

    • accuracy (number): The accuracy of the location data.

    • altitude (number): The altitude (in meters) of the asset at the last recorded location.

    • timestamp (number): The unix timestamp at which the last location was recorded.

    • last_location (array): An array containing the coordinates of the last recorded location.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Last Tracked Location of Asset

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_asset_id": "bike_301"
}

Response samples

Content type
application/json
{
  • "last_location_data": {
    • "speed": 6,
    • "bearing": 15,
    • "accuracy": 0.5,
    • "altitude": null,
    • "timestamp": 1766482291,
    • "last_location": [
      • 25.610245,
      • 45.648660938
      ]
    }
}

Get Tracked Locations of Asset in Time Interval

Description

This endpoint retrieves the historical location data of a specified asset within a defined time interval. It allows users to track the movements of an asset over time, providing insights into its location history.

Request Body Parameters

The request requires the following parameters in the JSON body:

  • p_asset_id (string): The unique identifier of the asset for which the location history is being requested.

  • p_start_time (integer): The start timestamp (unix, in seconds) for the time interval during which the asset's locations are to be retrieved.

  • p_end_time (integer): The end timestamp (unix, in seconds) for the time interval during which the asset's locations are to be retrieved.

  • p_page_no (integer): The page number for pagination of results.

  • p_entries_per_page (integer): The number of entries to return per page.

Response

The response will be a JSON object containing the following structure:

  • locations_history (array): An array of location objects, each containing:

    • speed (integer): The speed (in m/s) of the asset at the recorded timestamp.

    • bearing (integer): The direction of travel of the asset.

    • accuracy (integer): The accuracy of the location data.

    • altitude (integer): The altitude (in m) of the asset at the recorded timestamp.

    • location (array): An array containing the latitude and longitude of the asset.

    • timestamp (integer): The unix timestamp of the location record.

  • page (object): An object containing pagination details:

    • total_entries (integer): The total number of entries available for the query.

    • offset_entries (integer): The number of entries skipped for the current page.

    • total_pages (integer): The total number of pages available.

    • page_no (integer): The current page number.

    • entries_per_page (integer): The number of entries per page.

    • has_more (boolean): Indicates whether there are more entries available beyond the current page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Tracked Locations of Asset in Time Interval

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_asset_id": "bike_301",
  • "p_start_time": 1766493579,
  • "p_end_time": 1766493607,
  • "p_page_no": 1,
  • "p_entries_per_page": 20
}

Response samples

Content type
application/json
{
  • "locations_history": [
    • {
      • "speed": 6,
      • "bearing": 25,
      • "accuracy": 0.5,
      • "altitude": null,
      • "location": [
        • 25.608245938,
        • 45.64818
        ],
      • "timestamp": 1766493607
      },
    • {
      • "speed": 6,
      • "bearing": 25,
      • "accuracy": 0.5,
      • "altitude": null,
      • "location": [
        • 25.60871,
        • 45.647718125
        ],
      • "timestamp": 1766493579
      }
    ],
  • "page": {
    • "total_entries": 2,
    • "offset_entries": 0,
    • "total_pages": 1,
    • "page_no": 1,
    • "entries_per_page": 20,
    • "has_more": false
    }
}

Search Assets in Circle Area

Description

This endpoint allows users to search for assets within a specified circular area defined by a center point and a radius. The search results can be paginated for easier navigation. Only assets with location updates in the past 7 days are considered active and returned.

Request Body Parameters

The request body should be formatted as JSON and must include the following parameters:

  • p_center_lon (number): The longitude of the center point of the search area.

  • p_center_lat (number): The latitude of the center point of the search area.

  • p_radius_m (number): The radius of the search area in meters.

  • p_properties (object): A JSON object representing additional properties to filter the assets.

  • p_filter (string): A string indicating the type of filter to apply ("all_of" or "any_of").

  • p_page_no (number): The page number for pagination of results.

  • p_entries_per_page (number): The number of entries to return per page.

Response

The response will be in JSON format and will contain the following structure:

  • assets (array): A list of asset objects that match the search criteria. Each asset object includes:

    • id (string): Unique identifier for the asset.

    • name (string): Name of the asset.

    • state (string): Current state of the asset, "active" - last tracked location is newer than 7 days, "inactive" assets are excluded from the result.

    • created_at (number): Timestamp of when the asset was created.

    • properties (object): Contains additional properties of the asset.

    • updated_at (number): Unix timestamp of the last update to the asset.

    • description (string): Description of the asset.

    • gps_device_id (string): Identifier for the GPS device associated with the asset.

    • last_location (object): Contains details about the asset's last known location, including:

      • speed (number): Speed of the asset at the last known location.

      • bearing (number): Bearing of the asset at the last known location.

      • accuracy (number): Accuracy of the last known location.

      • altitude (number): Altitude (in m) of the asset at the last known location.

      • timestamp (number): Unix timestamp of the last known tracked location.

      • coordinates (array): Array containing the coordinates of the last known tracked location.

  • page (object): Contains pagination information, including:

    • total_entries (number): Total number of entries matching the search criteria.

    • offset_entries (number): Number of entries offset from the start of the results.

    • total_pages (number): Total number of pages available.

    • page_no (number): Current page number.

    • entries_per_page (number): Number of entries per page.

    • has_more (boolean): Indicates if there are more entries available beyond the current page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Search Assets in Circle Area

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_center_lon": 25.614433,
  • "p_center_lat": 45.65382,
  • "p_radius_m": 1000,
  • "p_properties": { },
  • "p_filter": "any_of",
  • "p_page_no": 1,
  • "p_entries_per_page": 20
}

Response samples

Content type
application/json
{
  • "assets": [
    • {
      • "id": "bike_301",
      • "name": "Courier Bike 301",
      • "state": "active",
      • "created_at": 1766481314,
      • "properties": {
        • "zone": "city_center",
        • "department": "express_delivery",
        • "asset_number": "BK-301",
        • "vehicle_type": "e_bike",
        • "battery_range_km": 80
        },
      • "updated_at": 1766481314,
      • "description": "Electric bike for express urban deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 6,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766493607,
        • "coordinates": [
          • 25.608245938,
          • 45.64818
          ]
        }
      },
    • {
      • "id": "truck_205",
      • "name": "Heavy Duty Truck 205 - Long Haul",
      • "state": "active",
      • "created_at": 1766480766,
      • "properties": {
        • "zone": "national",
        • "fuel_type": "diesel",
        • "department": "freight",
        • "capacity_kg": 5000,
        • "gps_upgraded": 1,
        • "vehicle_type": "truck",
        • "license_plate": "XYZ-789",
        • "driver_assigned": "Mike Johnson",
        • "last_inspection": "2025-12-20",
        • "trailer_attached": 1
        },
      • "updated_at": 1766487133,
      • "description": "Long-haul freight truck for interstate deliveries - recently upgraded",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 15,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.60871,
          • 45.647718125
          ]
        }
      },
    • {
      • "id": "vehicle_101",
      • "name": "Delivery Van 101 - Updated",
      • "state": "active",
      • "created_at": 1766480112,
      • "properties": {
        • "zone": "downtown",
        • "department": "logistics",
        • "capacity_kg": 1000,
        • "vehicle_type": "van",
        • "license_plate": "ABC-123"
        },
      • "updated_at": 1766487603,
      • "description": "Primary delivery vehicle for downtown and suburban routes",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 18,
        • "bearing": 45,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.614075938,
          • 45.648579062
          ]
        }
      }
    ],
  • "page": {
    • "total_entries": 3,
    • "offset_entries": 0,
    • "total_pages": 1,
    • "page_no": 1,
    • "entries_per_page": 20,
    • "has_more": false
    }
}

Search Assets in Envelope Area

Description

This endpoint allows users to search for assets within a specified geographical area defined by a bounding box. The search is performed based on the provided longitude and latitude coordinates, along with optional filtering properties. The search results can be paginated for easier navigation. Only assets with location updates in the past 7 days are considered active and returned.

Request Parameters

The request is made using a JSON payload with the following parameters:

  • p_lonmin (float): The minimum longitude of the bounding box.

  • p_latmin (float): The minimum latitude of the bounding box.

  • p_lonmax (float): The maximum longitude of the bounding box.

  • p_latmax (float): The maximum latitude of the bounding box.

  • p_properties (object): A JSON object containing properties to filter the assets.

  • p_filter (string): The filter type to apply ("any_of" or "all_of").

  • p_page_no (integer): The page number for pagination.

  • p_entries_per_page (integer): The number of entries to return per page.

Response Body Structure

On a successful request, the response will be in JSON format and will include:

  • assets (array): A list of asset objects that match the search criteria. Each asset object contains:

    • id (string): The unique identifier for the asset.

    • name (string): The name of the asset.

    • state (string): The current state of the asset, "active" - last tracked location is newer than 7 days, "inactive" assets are excluded from the result.

    • created_at (integer): Unix timestamp of when the asset was created.

    • properties (object): An object containing various properties of the asset.

    • updated_at (integer): Unix timestamp of the last update to the asset.

    • description (string): A brief description of the asset.

    • gps_device_id (string): Identifier for the GPS device associated with the asset.

    • last_location (object): An object containing the last known location details, including:

      • speed (float): The speed of the asset.

      • bearing (float): The bearing of the asset.

      • accuracy (float): Accuracy of the location data.

      • altitude (float): Altitude of the asset.

      • timestamp (integer): Unix timestamp of the last location update.

      • coordinates (array): An array containing the GPS coordinates.

  • page (object): Pagination information, including:

    • total_entries (integer): The total number of entries available.

    • offset_entries (integer): The number of entries skipped.

    • total_pages (integer): The total number of pages available.

    • page_no (integer): The current page number.

    • entries_per_page (integer): The number of entries per page.

    • has_more (boolean): Indicates if there are more entries available beyond the current page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Search Assets in Envelope Area

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_lonmin": 25.599977,
  • "p_latmin": 45.642448,
  • "p_lonmax": 25.63365,
  • "p_latmax": 45.657558,
  • "p_properties": { },
  • "p_filter": "any_of",
  • "p_page_no": 1,
  • "p_entries_per_page": 20
}

Response samples

Content type
application/json
{
  • "assets": [
    • {
      • "id": "bike_301",
      • "name": "Courier Bike 301",
      • "state": "active",
      • "created_at": 1766481314,
      • "properties": {
        • "zone": "city_center",
        • "department": "express_delivery",
        • "asset_number": "BK-301",
        • "vehicle_type": "e_bike",
        • "battery_range_km": 80
        },
      • "updated_at": 1766481314,
      • "description": "Electric bike for express urban deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 6,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766493607,
        • "coordinates": [
          • 25.608245938,
          • 45.64818
          ]
        }
      },
    • {
      • "id": "truck_205",
      • "name": "Heavy Duty Truck 205 - Long Haul",
      • "state": "active",
      • "created_at": 1766480766,
      • "properties": {
        • "zone": "national",
        • "fuel_type": "diesel",
        • "department": "freight",
        • "capacity_kg": 5000,
        • "gps_upgraded": 1,
        • "vehicle_type": "truck",
        • "license_plate": "XYZ-789",
        • "driver_assigned": "Mike Johnson",
        • "last_inspection": "2025-12-20",
        • "trailer_attached": 1
        },
      • "updated_at": 1766487133,
      • "description": "Long-haul freight truck for interstate deliveries - recently upgraded",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 15,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.60871,
          • 45.647718125
          ]
        }
      },
    • {
      • "id": "vehicle_101",
      • "name": "Delivery Van 101 - Updated",
      • "state": "active",
      • "created_at": 1766480112,
      • "properties": {
        • "zone": "downtown",
        • "department": "logistics",
        • "capacity_kg": 1000,
        • "vehicle_type": "van",
        • "license_plate": "ABC-123"
        },
      • "updated_at": 1766487603,
      • "description": "Primary delivery vehicle for downtown and suburban routes",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 18,
        • "bearing": 45,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.614075938,
          • 45.648579062
          ]
        }
      }
    ],
  • "page": {
    • "total_entries": 3,
    • "offset_entries": 0,
    • "total_pages": 1,
    • "page_no": 1,
    • "entries_per_page": 20,
    • "has_more": false
    }
}

Search Assets in Polygon Area

Description

This endpoint allows users to search for assets within a specified polygon area based on given properties and filters. The search results can be paginated for easier navigation. Only assets with location updates in the past 7 days are considered active and returned.

Request Body Parameters

The request body should be sent in JSON format and includes the following parameters:

  • p_properties (object): A JSON object specifying the properties to filter the assets.

  • p_filter (string): Defines the filtering method, such as "any_of" or "all_of", to determine how the properties should be applied.

  • p_page_no (integer): The page number for pagination, starting from 1.

  • p_entries_per_page (integer): The number of entries to return per page.

  • p_coordinates (array): An array of coordinates that define the polygon area for the search. Each coordinate should be formatted as a longitude and latitude pair.

Response

On a successful request, the API returns a JSON object with the following structure:

  • assets (array): An array of asset objects that match the search criteria. Each asset object contains:

    • id (string): Unique identifier for the asset.

    • name (string): Name of the asset.

    • state (string): Current state of the asset, "active" - last tracked location is newer than 7 days, "inactive" assets are excluded from the result.

    • created_at (integer): Unix timestamp of when the asset was created.

    • properties (object): An object containing specific properties related to the asset.

    • updated_at (integer): Unix timestamp of the last update to the asset.

    • description (string): Description of the asset.

    • gps_device_id (string): Identifier for the GPS device associated with the asset.

    • last_location (object): Contains details about the last known location of the asset, including:

      • speed (number): Speed of the asset at the last known location.

      • bearing (number): Bearing of the asset at the last known location.

      • accuracy (number): Accuracy of the location data.

      • altitude (number): Altitude of the asset at the last known location.

      • timestamp (integer): Timestamp of the last known location.

      • coordinates (array): Coordinates of the last known location.

  • page (object): Contains pagination information:

    • total_entries (integer): Total number of entries that match the search criteria.

    • offset_entries (integer): Number of entries skipped for the current page.

    • total_pages (integer): Total number of pages available for the results.

    • page_no (integer): Current page number.

    • entries_per_page (integer): Number of entries per page.

    • has_more (boolean): Indicates if there are more entries available beyond the current page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Search Assets in Polygon Area

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_properties": { },
  • "p_filter": "any_of",
  • "p_page_no": 1,
  • "p_entries_per_page": 20,
  • "p_coordinates": [
    • [
      • 25.566809257903458,
      • 45.67341928597483
      ],
    • [
      • 25.560272116900876,
      • 45.65844432320634
      ],
    • [
      • 25.56843337078874,
      • 45.64366960082688
      ],
    • [
      • 25.597775532927812,
      • 45.62667845767868
      ],
    • [
      • 25.63489147156392,
      • 45.63163031473104
      ],
    • [
      • 25.66285033610933,
      • 45.65468934572593
      ],
    • [
      • 25.623631813247528,
      • 45.677562586198746
      ],
    • [
      • 25.566809257903458,
      • 45.67341928597483
      ]
    ]
}

Response samples

Content type
application/json
{
  • "assets": [
    • {
      • "id": "bike_301",
      • "name": "Courier Bike 301",
      • "state": "active",
      • "created_at": 1766481314,
      • "properties": {
        • "zone": "city_center",
        • "department": "express_delivery",
        • "asset_number": "BK-301",
        • "vehicle_type": "e_bike",
        • "battery_range_km": 80
        },
      • "updated_at": 1766481314,
      • "description": "Electric bike for express urban deliveries",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 6,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766493607,
        • "coordinates": [
          • 25.608245938,
          • 45.64818
          ]
        }
      },
    • {
      • "id": "truck_205",
      • "name": "Heavy Duty Truck 205 - Long Haul",
      • "state": "active",
      • "created_at": 1766480766,
      • "properties": {
        • "zone": "national",
        • "fuel_type": "diesel",
        • "department": "freight",
        • "capacity_kg": 5000,
        • "gps_upgraded": 1,
        • "vehicle_type": "truck",
        • "license_plate": "XYZ-789",
        • "driver_assigned": "Mike Johnson",
        • "last_inspection": "2025-12-20",
        • "trailer_attached": 1
        },
      • "updated_at": 1766487133,
      • "description": "Long-haul freight truck for interstate deliveries - recently upgraded",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 15,
        • "bearing": 25,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.60871,
          • 45.647718125
          ]
        }
      },
    • {
      • "id": "vehicle_101",
      • "name": "Delivery Van 101 - Updated",
      • "state": "active",
      • "created_at": 1766480112,
      • "properties": {
        • "zone": "downtown",
        • "department": "logistics",
        • "capacity_kg": 1000,
        • "vehicle_type": "van",
        • "license_plate": "ABC-123"
        },
      • "updated_at": 1766487603,
      • "description": "Primary delivery vehicle for downtown and suburban routes",
      • "gps_device_id": null,
      • "last_location": {
        • "speed": 18,
        • "bearing": 45,
        • "accuracy": 0.5,
        • "altitude": null,
        • "timestamp": 1766482291,
        • "coordinates": [
          • 25.614075938,
          • 45.648579062
          ]
        }
      }
    ],
  • "page": {
    • "total_entries": 3,
    • "offset_entries": 0,
    • "total_pages": 1,
    • "page_no": 1,
    • "entries_per_page": 20,
    • "has_more": false
    }
}

monitors

Operations on Monitors

Add an Enter and Exit Areas Monitor

Description

This endpoint allows users to add a new monitor areas configuration to the system for tracking asset events. By assigning properties to monitors, users can track assets that share common properties, enabling collective monitoring of their activities. For example, properties such as {"zone": "city_center", "vehicle_type": "van"} can be used to group assets and streamline the monitoring process.

Request Body Parameters

The request body must be in JSON format and should include the following parameters:

  • p_id (string): A unique identifier for the monitor. If not provided, an unique ID will be generated in UUID format.

  • p_type (string): The type of monitor being added, "enter_and_exit_area", "enter_area" or "exit_area".

  • p_name (string): A descriptive name for the monitor.

  • p_description (string): A brief description of the monitor's purpose.

  • p_keywords (Array of strings): Keywords associated with the monitor for search or filtering.

  • p_properties_filter_type (string): Indicates how properties should be filtered when checking how properties are shared with an asset, "any_of" or "all_of".

  • p_properties (object): A JSON object representing the properties associated with the monitor, used for identifying the goup of assets to be tracked.

  • p_geofence_config (object): A JSON object containing geofence IDs and/or keywords configuration details.

    • geofence_ids (Array of strings)
    • geofence_keywords (Array of strings)

Response

The response will be in JSON format and may include the following fields:

  • id (string): The identifier of the newly created monitor (if successful).

  • error (string): An error message if the request fails.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Add an Enter and Exit Areas Monitor

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
Example
{
  • "p_id": "delivery_zone_monitor",
  • "p_type": "enter_and_exit_area",
  • "p_name": "Delivery Zone Entry/Exit Monitor",
  • "p_description": "Track when delivery vehicles enter or exit authorized delivery zones",
  • "p_keywords": [
    • "delivery",
    • "zone_monitoring",
    • "compliance"
    ],
  • "p_properties_filter_type": "all_of",
  • "p_properties": {
    • "department": "logistics",
    • "vehicle_type": "van"
    },
  • "p_geofence_config": {
    • "geofence_ids": [
      • "downtown_delivery_zone",
      • "warehouse_safety_perimeter"
      ]
    }
}

Response samples

Content type
application/json
{
  • "id": "truck_idle_monitor",
  • "error": ""
}

Get Monitors by IDs

Description

This endpoint retrieves monitor details based on the provided monitor IDs. It allows users to fetch information about monitors, including their properties and configurations.

Request Body Parameters

The request body should be in JSON format and must include the following parameter:

  • p_ids (Array of Strings): A list of monitor IDs for which details are requested. Each ID should be a string representing a unique monitor.

Response

Upon a successful request, the API will return a JSON response with the following structure:

  • monitors (Array of Objects): An array of monitor objects, each containing the following fields:

    • id (String): The unique identifier for the monitor.

    • name (String): The name of the monitor.

    • type (String): The type of the monitor, "enter_and_exit_area", "enter_area", "exit_area".

    • keywords (Array of Strings): A list of keywords associated with the monitor.

    • created_at (Integer): The unix timestamp of when the monitor was created.

    • properties (Object): An object containing various properties of the monitor, used for tracking assets with shared characteristics.

    • updated_at (Integer): The unix timestamp of the last update made to the monitor.

    • description (String): A description of the monitor.

    • geofence_config (Object): Configuration related to geofences.

      • geofence_ids (Array of Strings): A list of geofence IDs associated with the monitor.
    • properties_filter_type (String): The type of filter applied to the properties to check shared characteristics with assets to be tracked. Can have value "all_of" or "any_of".

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Monitors by IDs

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_ids": [
    • "delivery_zone_monitor",
    • "warehouse_entry_monitor"
    ]
}

Response samples

Content type
application/json
{
  • "monitors": [
    • {
      • "id": "delivery_zone_monitor",
      • "name": "Delivery Zone Entry/Exit Monitor",
      • "type": "enter_and_exit_area",
      • "keywords": [
        • "delivery",
        • "zone_monitoring",
        • "compliance"
        ],
      • "created_at": 1766500544,
      • "properties": {
        • "department": "logistics",
        • "vehicle_type": "van"
        },
      • "updated_at": 1766500544,
      • "description": "Track when delivery vehicles enter or exit authorized delivery zones",
      • "geofence_config": {
        • "geofence_ids": [
          • "downtown_delivery_zone",
          • "warehouse_safety_perimeter"
          ]
        },
      • "properties_filter_type": "all_of"
      },
    • {
      • "id": "warehouse_entry_monitor",
      • "name": "Warehouse Entry Monitor",
      • "type": "enter_area",
      • "keywords": [
        • "warehouse",
        • "entry",
        • "security"
        ],
      • "created_at": 1766502321,
      • "properties": {
        • "department": "freight"
        },
      • "updated_at": 1766502321,
      • "description": "Alert when vehicles enter warehouse zones",
      • "geofence_config": {
        • "geofence_ids": [
          • "warehouse_safety_perimeter"
          ]
        },
      • "properties_filter_type": "any_of"
      }
    ]
}

Get Monitors by Keywords

Description

This endpoint retrieves a list of monitors based on specified keywords. It allows users to search for monitors that match the given criteria and paginate through the results.

Request Body Parameters

The request requires a JSON payload with the following parameters:

  • p_keywords (Array of strings): An array of keywords to search for monitors. Each keyword is a string that represents a search term.

  • p_page_no (Integer): The page number of the results to retrieve. This is useful for pagination.

  • p_entries_per_page (Integer): The number of entries to return per page. This controls how many results are displayed in one response.

Response

On a successful request, the response will return a JSON object with the following structure:

  • monitors (Array of Objects): A list of monitor objects that match the search criteria. Each monitor object contains:

    • id (String): The unique identifier of the monitor.

    • name (String): The name of the monitor.

    • type (String): The type of monitor.

    • keywords (Array of strings): An array of keywords associated with the monitor, used for search or filtering.

    • created_at (Integer): The unix timestamp when the monitor was created.

    • properties (Object): An object containing various properties related to the monitor and used for identifying the group of assets to be tracked.

    • updated_at (Integer): The unix timestamp when the monitor was last updated.

    • description (String): A description of the monitor.

    • geofence_config (Object): Contains geofence-related information, including an array of geofence IDs.

    • properties_filter_type (String): The type of properties filter applied, "all_of" or "any_of".

  • page (Object): Contains pagination information:

    • total_entries (Integer): The total number of entries available.

    • offset_entries (Integer): The number of entries that have been skipped.

    • total_pages (Integer): The total number of pages available.

    • page_no (Integer): The current page number.

    • entries_per_page (Integer): The number of entries per page.

    • has_more (Boolean): Indicates whether there are more entries available beyond the current page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Monitors by Keywords

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_keywords": [
    • "delivery"
    ],
  • "p_page_no": 1,
  • "p_entries_per_page": 20
}

Response samples

Content type
application/json
{
  • "monitors": [
    • {
      • "id": "delivery_zone_monitor",
      • "name": "Delivery Zone Entry/Exit Monitor",
      • "type": "enter_and_exit_area",
      • "keywords": [
        • "delivery",
        • "zone_monitoring",
        • "compliance"
        ],
      • "created_at": 1766500544,
      • "properties": {
        • "department": "logistics",
        • "vehicle_type": "van"
        },
      • "updated_at": 1766500544,
      • "description": "Track when delivery vehicles enter or exit authorized delivery zones",
      • "geofence_config": {
        • "geofence_ids": [
          • "downtown_delivery_zone",
          • "warehouse_safety_perimeter"
          ]
        },
      • "properties_filter_type": "all_of"
      }
    ],
  • "page": {
    • "total_entries": 1,
    • "offset_entries": 0,
    • "total_pages": 1,
    • "page_no": 1,
    • "entries_per_page": 20,
    • "has_more": false
    }
}

Update a Monitor

Description

This endpoint allows users to update the details of a specific monitor identified by its ID.

Request Body Parameters

The request body must be a JSON object with the following parameters:

  • p_id (string): The unique identifier for the monitor to be updated.

  • p_type (string): The type of the monitor, one of "enter_and_exit_area", "enter_area", "exit_area", "speeding", "idle".

  • p_name (string): A descriptive name for the monitor.

  • p_description (string): A detailed description of the monitor's purpose or functionality.

  • p_keywords (array of strings): An array of keywords associated with the monitor for search or filtering.

  • p_properties_filter_type (string): Defines how asset properties should be filtered, "all_of" or "any_of".

  • p_properties (object): A JSON object representing the properties associated with the monitor and the assets.

  • p_type_config (object): A JSON object containing configuration settings specific to the monitor type.

Response

Upon successful execution of the request, the API will respond with a JSON object that may include:

  • id (string): The identifier of the updated monitor.

  • error (string): Any error message if the update fails.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Update a Monitor

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_id": "delivery_zone_monitor",
  • "p_type": "enter_and_exit_area",
  • "p_name": "Delivery Zone Monitor",
  • "p_description": "Monitoring solution for all delivery zone activities",
  • "p_keywords": [
    • "delivery",
    • "zone_monitoring"
    ],
  • "p_properties_filter_type": "all_of",
  • "p_properties": {
    • "department": "logistics",
    • "vehicle_type": "van",
    • "zone": "downtown",
    • "shift": "day"
    },
  • "p_type_config": {
    • "geofence_ids": [
      • "downtown_delivery_zone",
      • "warehouse_safety_perimeter",
      • "employee_parking_lot"
      ]
    }
}

Response samples

Content type
application/json
{
  • "id": "delivery_zone_monitor",
  • "error": ""
}

Delete Monitors by IDs

Description

This endpoint allows the user to delete monitors from the system based on their unique identifiers.

Request Body Parameters

  • p_ids (Array of Strings): This parameter is required and should contain the IDs of the monitors you wish to delete.

Response

The response will be in JSON format and will include an array of deleted monitors IDs:

  • deleted_ids (Array of strings): When the monitors are successfully deleted, the response will contain the IDs of the deleted monitors in JSON format.

Notes

  • The deleted_ids array in the response will list the IDs of the monitors that were successfully deleted. An empty array signifies that no monitors matched the provided IDs for deletion.
Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Delete Monitors by IDs

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_ids": [
    • "enter_and_exit_area monitor for test fleet assets 1",
    • "e4d7e832-20ff-494f-9288-7af75df71392",
    • "fffb29e7-4637-4ac2-aa38-89c3f2d81bfd"
    ]
}

Response samples

Content type
application/json
{
  • "deleted_ids": [
    • "enter_and_exit_area monitor for test fleet assets 1"
    ]
}

Get Monitors that apply to an Asset

Description

This endpoint retrieves the monitors associated with a specified asset.

Request Body Parameters

The request body must be in JSON format and should include the following parameter:

  • p_asset_id (string): The unique identifier of the asset for which the monitors are being requested.

Response

Upon a successful request, the response will be in JSON format and will contain the following structure:

  • monitors (array): An array of monitor objects associated with the asset.

    • type (string): The type of the monitor.

    • config (object): Configuration details for the monitor.

      • geofence_ids (array): For area monitors. An array of geofence IDs associated with the monitor.

      • speed_limit (number): For speeding monitors. The speed threshold, in the configured speed units (meters/second), above which an asset is considered speeding.

      • distance_tolerance (number): For idle monitors. The maximum distance in meters the asset can move during the time_tolerance period and still be considered stationary.

      • time_tolerance (number): For speeding and idle monitors. The minimum duration in milliseconds for checking if an asset is speeding or idling.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Monitors that apply to an Asset

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_asset_id": "vehicle_101"
}

Response samples

Content type
application/json
{
  • "monitors": [
    • {
      • "type": "speeding",
      • "config": {
        • "speed_limit": 20,
        • "time_tolerance": 60000
        },
      • "monitor_id": "fleet_speed_monitor"
      }
    ]
}

Get Asset Monitor Event History

Description

This endpoint retrieves the event history for a specified asset monitor within a defined time range. It allows users to track events related to asset movements and activities, providing insights into how assets interact with designated geofences over time.

Request Body Parameters

The request requires the following parameters in the JSON body:

  • p_asset_id (string): The unique identifier for the asset being tracked. This parameter specifies which asset's event history you want to retrieve.

  • p_monitor_id (string): The identifier for the monitor associated with the asset. This helps to filter events based on the specific monitoring criteria.

  • p_start_time (integer): The start time for the event history in Unix timestamp format. This defines the beginning of the time range for which events are fetched.

  • p_end_time (integer): The end time for the event history in Unix timestamp format. This marks the end of the time range for the events being requested.

  • p_page_no (integer): The page number for pagination of results. This is used to navigate through multiple pages of event data.

  • p_entries_per_page (integer): The number of entries to return per page. This controls how many event records are displayed in each page of results.

Response

The response will be in JSON format and includes the following structure:

  • events_data (object): An object containing the event list and pagination info.

    • list (array): An array of event objects, each representing an event related to the asset monitor. Each event includes the following fields:

      • asset_id (string): The unique identifier of the asset involved in the event.

      • meta_data (object): An object containing optional metadata for the event:

        • bearing (float|null): The direction of movement in degrees (may be null).

        • accuracy (float|null): GPS accuracy in meters (may be null).

        • altitude (float|null): Altitude in meters (may be null).

        • speed_mps (float|null): Speed in meters per second (may be null).

        • monitor_type (string): Type of monitor that triggered the event (e.g., "enter_and_exit_area").

      • timestamp (integer): The time the event occurred (in UNIX epoch format).

      • event_type (string): The type of event, either "enter" or "exit".

      • monitor_id (string): The ID of the monitor that generated the event.

      • geofence_id (string): The identifier of the geofence associated with the event.

      • prev_location (object): The last known location before the event was triggered.

        • lat (float): Latitude of the previous location.

        • lon (float): Longitude of the previous location.

      • monitor_keywords (array of strings): Tags or labels associated with the monitor (e.g., ["test fleet monitor"]).

      • triggered_location (object): The location where the event was triggered.

        • lat (float): Latitude of the triggered location.

        • lon (float): Longitude of the triggered location.

      • triggered_timestamp (integer): The time at which the event was triggered (UNIX timestamp).

    • page (object): An object providing pagination details:

      • page_no (integer): The current page number indicating which set of results is being returned.

      • has_more (boolean): Indicates whether more pages of results are available.

      • total_pages (integer): The total number of available pages for this query.

      • total_entries (integer): The total number of event records matching the query.

      • offset_entries (integer): The index offset of the first entry in the current page.

      • entries_per_page (integer): The number of entries returned per page.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Asset Monitor Event History

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_asset_id": "vehicle_101",
  • "p_monitor_id": "fleet_speed_monitor",
  • "p_start_time": 1752048576,
  • "p_end_time": 1752238436,
  • "p_page_no": 1,
  • "p_entries_per_page": 20
}

Response samples

Content type
application/json
{
  • "events_data": {
    • "list": [
      • {
        • "asset_id": "test_asset_1",
        • "meta_data": {
          • "bearing": null,
          • "accuracy": null,
          • "altitude": null,
          • "speed_mps": null,
          • "monitor_type": "enter_and_exit_area"
          },
        • "timestamp": 1752064711,
        • "event_type": "enter",
        • "monitor_id": "enter_and_exit_area monitor for test fleet assets",
        • "geofence_id": "geofence_3_rectangle",
        • "prev_location": {
          • "location": {
            • "lat": 45.641916875,
            • "lon": 25.61508875
            }
          },
        • "monitor_keywords": [
          • "test fleet monitor"
          ],
        • "triggered_location": {
          • "location": {
            • "lat": 45.641916875,
            • "lon": 25.61508875
            }
          },
        • "triggered_timestamp": 1752064711
        },
      • {
        • "asset_id": "test_asset_1",
        • "meta_data": {
          • "bearing": null,
          • "accuracy": null,
          • "altitude": null,
          • "speed_mps": null,
          • "monitor_type": "enter_and_exit_area"
          },
        • "timestamp": 1752054042,
        • "event_type": "exit",
        • "monitor_id": "enter_and_exit_area monitor for test fleet assets",
        • "geofence_id": "geofence_3_rectangle",
        • "prev_location": {
          • "location": {
            • "lat": 45.64321,
            • "lon": 25.61792
            }
          },
        • "monitor_keywords": [
          • "test fleet monitor"
          ],
        • "triggered_location": {
          • "location": {
            • "lat": 45.64321,
            • "lon": 25.61792
            }
          },
        • "triggered_timestamp": 1752054042
        },
      • {
        • "asset_id": "test_asset_1",
        • "meta_data": {
          • "bearing": null,
          • "accuracy": null,
          • "altitude": null,
          • "speed_mps": null,
          • "monitor_type": "enter_and_exit_area"
          },
        • "timestamp": 1752049227,
        • "event_type": "enter",
        • "monitor_id": "enter_and_exit_area monitor for test fleet assets",
        • "geofence_id": "geofence_3_rectangle",
        • "prev_location": {
          • "location": {
            • "lat": 45.641916875,
            • "lon": 25.61508875
            }
          },
        • "monitor_keywords": [
          • "test fleet monitor"
          ],
        • "triggered_location": {
          • "location": {
            • "lat": 45.641916875,
            • "lon": 25.61508875
            }
          },
        • "triggered_timestamp": 1752049227
        },
      • {
        • "asset_id": "test_asset_1",
        • "meta_data": {
          • "bearing": null,
          • "accuracy": null,
          • "altitude": null,
          • "speed_mps": null,
          • "monitor_type": "enter_and_exit_area"
          },
        • "timestamp": 1752048576,
        • "event_type": "exit",
        • "monitor_id": "enter_and_exit_area monitor for test fleet assets",
        • "geofence_id": "geofence_1_circle",
        • "prev_location": {
          • "location": {
            • "lat": 45.6544609375,
            • "lon": 25.6024859375
            }
          },
        • "monitor_keywords": [
          • "test fleet monitor"
          ],
        • "triggered_location": {
          • "location": {
            • "lat": 45.6544609375,
            • "lon": 25.6024859375
            }
          },
        • "triggered_timestamp": 1752048576
        },
      • {
        • "asset_id": "test_asset_1",
        • "meta_data": {
          • "bearing": null,
          • "accuracy": null,
          • "altitude": null,
          • "speed_mps": null,
          • "monitor_type": "enter_and_exit_area"
          },
        • "timestamp": 1752048576,
        • "event_type": "exit",
        • "monitor_id": "enter_and_exit_area monitor for test fleet assets",
        • "geofence_id": "geofence_3_rectangle",
        • "prev_location": {
          • "location": {
            • "lat": 45.6544609375,
            • "lon": 25.6024859375
            }
          },
        • "monitor_keywords": [
          • "test fleet monitor"
          ],
        • "triggered_location": {
          • "location": {
            • "lat": 45.6544609375,
            • "lon": 25.6024859375
            }
          },
        • "triggered_timestamp": 1752048576
        },
      • {
        • "asset_id": "test_asset_1",
        • "meta_data": {
          • "bearing": null,
          • "accuracy": null,
          • "altitude": null,
          • "speed_mps": null,
          • "monitor_type": "enter_and_exit_area"
          },
        • "timestamp": 1752048576,
        • "event_type": "exit",
        • "monitor_id": "enter_and_exit_area monitor for test fleet assets",
        • "geofence_id": "geofence_4_polygon",
        • "prev_location": {
          • "location": {
            • "lat": 45.6544609375,
            • "lon": 25.6024859375
            }
          },
        • "monitor_keywords": [
          • "test fleet monitor"
          ],
        • "triggered_location": {
          • "location": {
            • "lat": 45.6544609375,
            • "lon": 25.6024859375
            }
          },
        • "triggered_timestamp": 1752048576
        }
      ],
    • "page": {
      • "page_no": 1,
      • "has_more": false,
      • "total_pages": 1,
      • "total_entries": 6,
      • "offset_entries": 0,
      • "entries_per_page": 20
      }
    }
}

Poll Monitor Events Data

Description

This endpoint retrieves the event history for asset monitors, allowing users to track and analyze events related to asset movements and interactions with designated geofences through area monitors. By specifying parameters such as timestamp and limit, users can filter the data to obtain relevant event records in chunks at a self-determined rate.

Request Body Parameters

The request requires the following parameters in the JSON body:

  • p_last_poll_timestamp (integer): The timestamp of the last poll in Unix format. This serves as a reference point to fetch events that occurred after this timestamp.

  • p_limit (integer|optional): The maximum number of event records to return. This parameter controls the volume of data retrieved in a single request. Default value is 5000, maximum allowed value is 10000.

  • p_sort_order (text|optional): "ASC" (default) returns oldest events first (use for polling), "DESC" returns newest events first (use for display)
    Note: When using DESC with LIMIT, you get the MOST RECENT events, not a reverse of the ASC result.

Response

The response will be in JSON format and includes the following structure:

  • data (object): An object containing the event list related to the asset monitor.

    • monitor_events (array): An array of event objects, each representing an event related to the asset monitor. Each event includes the following fields:

      • asset_id (string): The unique identifier of the asset involved in the event.

      • event_type (string): The type of event, indicating whether it was an entry or exit event.

      • monitor_id (string): The ID of the monitor that generated the event.

      • geofence_id (string): The identifier of the geofence associated with the event.

      • event_location (object): The location where the event occurred.

        • lat (double): Latitude of the event location.

        • lon (double): Longitude of the event location.

      • event_timestamp (integer): The time the event occurred (in UNIX epoch format).

      • previous_location (object): The last known location before the event was triggered.

        • lat (double): Latitude of the previous location.

        • lon (double): Longitude of the previous location.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Poll Monitor Events Data

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_last_poll_timestamp": 1754810032,
  • "p_limit": 10,
  • "p_sort_order": "asc"
}

Response samples

Content type
application/json
{
  • "data": {
    • "monitor_events": [
      • {
        • "asset_id": "test_asset_1",
        • "event_type": "enter",
        • "monitor_id": "enter_area monitor for test fleet assets",
        • "geofence_id": "geofence_3_rectangle",
        • "event_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          },
        • "event_metadata": {
          • "monitor_type": "enter_area"
          },
        • "event_timestamp": 1754899678,
        • "previous_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          }
        },
      • {
        • "asset_id": "test_asset_5",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 1,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899681,
        • "previous_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          }
        },
      • {
        • "asset_id": "test_asset_3",
        • "event_type": "idle",
        • "monitor_id": "idle monitor",
        • "event_location": {
          • "lat": 45.6463740625,
          • "lon": 25.6214240625
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 1,
          • "total_points": 1,
          • "time_window_ms": 300000,
          • "speed_threshold": 1.38888888888889,
          • "total_distance_m": 0,
          • "distance_tolerance_m": 100
          },
        • "event_timestamp": 1754899681,
        • "previous_location": {
          • "lat": 45.6463740625,
          • "lon": 25.6214240625
          }
        },
      • {
        • "asset_id": "test_asset_1",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 1,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899681,
        • "previous_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          }
        },
      • {
        • "asset_id": "test_asset_1",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 9,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899691,
        • "previous_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          }
        },
      • {
        • "asset_id": "test_asset_5",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 9,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899691,
        • "previous_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          }
        },
      • {
        • "asset_id": "test_asset_1",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 9,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899701,
        • "previous_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          }
        },
      • {
        • "asset_id": "test_asset_5",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 9,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899701,
        • "previous_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          }
        },
      • {
        • "asset_id": "test_asset_5",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 9,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899712,
        • "previous_location": {
          • "lat": 45.6544609375,
          • "lon": 25.6024859375
          }
        },
      • {
        • "asset_id": "test_asset_1",
        • "event_type": "speeding",
        • "monitor_id": "speeding monitor",
        • "event_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          },
        • "event_metadata": {
          • "bearing": 25,
          • "accuracy": 0.5,
          • "speed_mps": 30,
          • "speed_limit": 20,
          • "total_points": 9,
          • "time_window_ms": 10000
          },
        • "event_timestamp": 1754899712,
        • "previous_location": {
          • "lat": 45.641916875,
          • "lon": 25.61508875
          }
        }
      ]
    }
}

trips

Operations on Trips

Start Trip for an Asset

Description

This endpoint is used to initiate a new trip for a specified asset. It allows users to provide details about the trip, including its identification, description, and associated metadata.

Request Body Parameters

The request body must be formatted as JSON and should include the following parameters:

  • p_trip_id (string): Optional, a unique identifier for the trip. If not provided, an unique id will be automatically generated in UUID format.

  • p_asset_id (string): The identifier of the asset for which the trip is being created.

  • p_name (string): The name of the trip.

  • p_description (string): A brief description of the trip.

  • p_meta_data (object): A JSON object containing metadata related to the trip.

  • p_attributes (object): A JSON object containing additional attributes for the trip.

  • p_stops (object): A JSON object representing the stops included in the trip.

Response

Upon a successful request, the server responds with a JSON object containing the following fields:

  • trip_id (string): The unique identifier for the created trip. This will be returned as an empty string if the trip creation fails.

  • error (string): An error message, if applicable. This will be returned as an empty string if there are no errors.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Start Trip for an Asset

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_trip_id": "delivery_trip_001",
  • "p_asset_id": "vehicle_101",
  • "p_name": "Downtown Delivery Route",
  • "p_description": "Morning delivery run covering downtown area",
  • "p_meta_data": {
    • "shift": "morning",
    • "route_type": "delivery",
    • "priority": "high"
    },
  • "p_attributes": {
    • "driver_name": "John Smith",
    • "estimated_duration_minutes": 120,
    • "package_count": 15,
    • "start_location": "Main Warehouse"
    },
  • "p_stops": [
    • {
      • "name": "Main Warehouse",
      • "meta_data": {
        • "entry_point": "loading_dock_3",
        • "stop_type": "pickup",
        • "arrival_time": "08:00"
        },
      • "geofence_id": "warehouse_safety_perimeter"
      },
    • {
      • "name": "Downtown Office Building A",
      • "meta_data": {
        • "entry_point": "main_entrance",
        • "stop_type": "delivery",
        • "packages": 5
        },
      • "geofence_id": "downtown_delivery_zone"
      },
    • {
      • "name": "Downtown Office Building B",
      • "meta_data": {
        • "entry_point": "side_entrance",
        • "stop_type": "delivery",
        • "packages": 10
        },
      • "geofence_id": "downtown_delivery_zone"
      }
    ]
}

Response samples

Content type
application/json
{
  • "trip_id": "delivery_trip_001",
  • "error": ""
}

Get Trip Information

Description

This endpoint retrieves detailed information about a specific trip using its unique identifier.

Request Body Parameters

The request requires a JSON payload with the following structure:

  • p_trip_id: A string representing the unique identifier of the trip you wish to retrieve.

Response

The response will be in JSON format and includes the following structure:

  • status (string): Indicates the request status (e.g., "Ok").

  • data (object): Contains the detailed trip object.

    • trip (object): The main trip object with the following fields:

      • id (string): Unique identifier of the trip.

      • asset_id (string): ID of the asset associated with the trip.

      • state (string): Current state of the trip ("active" or "ended").

      • name (string): Name of the trip.

      • description (string): Description or purpose of the trip.

      • meta_data (object): Custom metadata for the trip.

        • type (string): Arbitrary user-defined classification.
      • attributes (object): Custom attribute map in the form of JSON "key": "value".

        • type (string): Arbitrary user-defined classification.
      • started_at (integer): Timestamp when the trip started (UNIX epoch).

      • ended_at (integer|null): Timestamp when the trip ended, or null if ongoing.

      • created_at (integer): Timestamp when the trip was created.

      • updated_at (integer): Timestamp of the last update to the trip.

      • stops (array): List of geofenced stop locations visited during the trip.

        • name (string): Descriptive name of the stop (e.g., "Office Area").

        • meta_data (object): Metadata associated with the stop.

          • entry (string): Entry point description (e.g., "north gate").
        • geofence_id (string): ID of the geofence representing the stop area.

      • route (array): An array of GPS trace points representing the path of the asset:

        • accuracy (integer|null): GPS accuracy in meters.

        • altitude (float|null): Altitude at this location (in meters).

        • bearing (integer|null): Direction of travel in degrees.

        • location (object): Geographic coordinates of the asset.

          • lat (float): Latitude value.

          • lon (float): Longitude value.

        • meta_data (object|null): Optional custom metadata.

          • type (string): Example tag or identifier.
        • speed (integer|null): Speed in meters per second.

        • timestamp (integer): UNIX epoch time of this trace point.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Trip Information

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_trip_id": "delivery_trip_001"
}

Response samples

Content type
application/json
{
  • "status": "Ok",
  • "data": {
    • "trip": {
      • "id": "delivery_trip_001",
      • "asset_id": "vehicle_101",
      • "state": "active",
      • "name": "Downtown Delivery Route",
      • "description": "Morning delivery run covering downtown area",
      • "meta_data": {
        • "shift": "morning",
        • "priority": "high",
        • "route_type": "delivery"
        },
      • "attributes": {
        • "driver_name": "John Smith",
        • "package_count": 15,
        • "start_location": "Main Warehouse",
        • "estimated_duration_minutes": 120
        },
      • "started_at": 1767863673,
      • "ended_at": null,
      • "created_at": 1767863673,
      • "updated_at": 1767863673,
      • "stops": [
        • {
          • "name": "Main Warehouse",
          • "meta_data": {
            • "stop_type": "pickup",
            • "entry_point": "loading_dock_3",
            • "arrival_time": "08:00"
            },
          • "geofence_id": "warehouse_safety_perimeter"
          },
        • {
          • "name": "Downtown Office Building A",
          • "meta_data": {
            • "packages": 5,
            • "stop_type": "delivery",
            • "entry_point": "main_entrance"
            },
          • "geofence_id": "downtown_delivery_zone"
          },
        • {
          • "name": "Downtown Office Building B",
          • "meta_data": {
            • "packages": 10,
            • "stop_type": "delivery",
            • "entry_point": "side_entrance"
            },
          • "geofence_id": "downtown_delivery_zone"
          }
        ],
      • "route": [
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 45,
          • "location": {
            • "lat": 45.6485790625,
            • "lon": 25.6140759375
            },
          • "meta_data": null,
          • "speed": 18,
          • "timestamp": 1767864327
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 45,
          • "location": {
            • "lat": 45.6485790625,
            • "lon": 25.6140759375
            },
          • "meta_data": null,
          • "speed": 18,
          • "timestamp": 1767864785
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 50,
          • "location": {
            • "lat": 45.649011875,
            • "lon": 25.614433125
            },
          • "meta_data": null,
          • "speed": 20,
          • "timestamp": 1767864810
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 50,
          • "location": {
            • "lat": 45.649011875,
            • "lon": 25.614433125
            },
          • "meta_data": null,
          • "speed": 20,
          • "timestamp": 1767864927
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 60,
          • "location": {
            • "lat": 45.6501340625,
            • "lon": 25.6154209375
            },
          • "meta_data": null,
          • "speed": 25,
          • "timestamp": 1767864942
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 65,
          • "location": {
            • "lat": 45.6507890625,
            • "lon": 25.616011875
            },
          • "meta_data": null,
          • "speed": 24,
          • "timestamp": 1767864956
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 68,
          • "location": {
            • "lat": 45.651423125,
            • "lon": 25.616566875
            },
          • "meta_data": null,
          • "speed": 21,
          • "timestamp": 1767864973
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 70,
          • "location": {
            • "lat": 45.6520009375,
            • "lon": 25.6170890625
            },
          • "meta_data": null,
          • "speed": 19,
          • "timestamp": 1767864987
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 72,
          • "location": {
            • "lat": 45.652511875,
            • "lon": 25.6175340625
            },
          • "meta_data": null,
          • "speed": 16,
          • "timestamp": 1767865000
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 75,
          • "location": {
            • "lat": 45.652945,
            • "lon": 25.617911875
            },
          • "meta_data": null,
          • "speed": 12,
          • "timestamp": 1767865016
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 78,
          • "location": {
            • "lat": 45.6532890625,
            • "lon": 25.6182009375
            },
          • "meta_data": null,
          • "speed": 8,
          • "timestamp": 1767865038
          }
        ]
      }
    }
}

Update Trip

Description

This endpoint allows you to update an existing trip associated with a specific asset in the system. The request requires details about the trip that you wish to modify, including its identification, attributes, and metadata. Only active trips can be updated. Once a trip has ended it can no longer be updated with any information.

Request Body Parameters

The request body should be in JSON format and include the following parameters:

  • p_trip_id (string): The unique identifier for the trip you want to update.

  • p_asset_id (string): The identifier for the asset associated with the trip.

  • p_name (string): Optional, the new name for the trip. If not provided, previous value remains unchanged.

  • p_description (string): Optional, a description of the trip. If not provided, previous value remains unchanged.

  • p_meta_data (object): Optional, a JSON object containing metadata related to the trip (e.g., type). If not provided, previous value remains unchanged.

  • p_attributes (object): Optional, a JSON object containing attributes specific to the trip (e.g., fleet information). If not provided, previous value remains unchanged.

  • p_stops (object): Optional, a JSON object representing the stops associated with the trip, including their names and metadata. If not specified, previous value remains unchanged.

Response

The response will be in JSON format and will include the following fields:

  • id (string): The identifier for the updated trip. This field may be empty if the update does not return a specific identifier.

  • error (string): Any error message related to the update process. This field will be empty if the update is successful.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Update Trip

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_trip_id": "delivery_trip_001",
  • "p_asset_id": "vehicle_101",
  • "p_meta_data": {
    • "shift": "morning",
    • "route_type": "delivery",
    • "priority": "high",
    • "status": "delayed",
    • "delay_reason": "traffic_accident",
    • "estimated_delay_minutes": 30
    },
  • "p_attributes": {
    • "driver_name": "John Smith",
    • "estimated_duration_minutes": 150,
    • "package_count": 15,
    • "current_location": "Highway Exit 42"
    }
}

Response samples

Content type
application/json
{
  • "id": "delivery_trip_001",
  • "error": ""
}

End Trip

Description

This endpoint is used to mark a trip as ended for a specified asset by its unique trip identifier.

Request Body Parameters

The request requires a JSON payload in the following format:

  • p_trip_id: A string representing the unique identifier of the trip that needs to be ended.

Response

The response will return a JSON object. The structure of the response can vary, but it typically includes the following fields:

  • status: A string indicating the status of the request (e.g., success or failure).

  • message: A string providing additional information about the request's outcome.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for End Trip

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_trip_id": "delivery_trip_001"
}

Response samples

Content type
application/json
{
  • "status": "Ok"
}

Get Trip Summary

Description

This endpoint retrieves the summary of a specific trip based on the provided trip ID. You can retrieve trip summary information only for trips that have ended.

Request Body Parameters

  • p_trip_id (string): The identifier for the trip whose summary is being requested. This parameter is essential for fetching the correct trip details.

Response

The response will return a JSON object with the following structure:

  • status (string): The status of the request, indicating success or failure.

  • data (object): Contains the details of the trip, which includes:

    • trip (object): Information about the trip, including:

      • id (string): The unique identifier of the trip.

      • asset_id (string): The identifier of the asset associated with the trip.

      • state (string): The current state of the trip.

      • name (string): The name of the trip.

      • description (string): A brief description of the trip.

      • meta_data (object): Additional metadata about the trip, including:

        • type (string): Arbitrary user-defined classification.
      • attributes (object): Attributes related to the trip, such as:

        • type (string): Arbitrary user-defined classification.
      • started_at (integer): Timestamp indicating when the trip started.

      • ended_at (integer): Timestamp indicating when the trip ended.

      • created_at (integer): Timestamp indicating when the trip was created.

      • updated_at (integer): Timestamp indicating when the trip was last updated.

      • stops (array): An array of stops during the trip, where each stop includes:

        • name (string): The name of the stop.

        • meta_data (object): Metadata for the stop, including:

          • entry (string): Additional information about the entry.
        • geofence_id (string): The identifier for the geofence associated with the stop.

      • route (array): An array of route points for the trip, where each point includes:

        • accuracy (integer): The accuracy of the location data.

        • altitude (integer): The altitude at the point.

        • bearing (integer): The bearing at the point.

        • location (object): The geographical location, including:

          • lat (float): Latitude of the location.

          • lon (float): Longitude of the location.

        • meta_data (object): Metadata for the route point

        • speed (integer): The speed at the point.

        • timestamp (integer): Timestamp for the route point.

      • distance_m (integer): Total distance of the trip in meters.

      • duration_s (integer): Total duration of the trip in seconds.

      • asset (object): Information about the asset associated with the trip, including:

        • id (string): The unique identifier of the asset.

        • state (string): The current state of the asset.

        • name (string): The name of the asset.

        • description (string): A brief description of the asset.

        • created_at (integer): Timestamp indicating when the asset was created.

        • updated_at (integer): Timestamp indicating when the asset was last updated.

        • properties (object): Properties of the asset, including:

          • zone (string): The zone of the asset.

          • test_fleet (string): Information about the test fleet.

        • latest_location (object): The latest known location of the asset, including:

          • location (object): The geographical location, including:

            • lat (float): Latitude of the latest location.

            • lon (float): Longitude of the latest location.

          • timestamp (integer): Timestamp for the latest location.

          • accuracy (integer): Accuracy of the latest location data.

          • speed (integer): Speed at the latest location.

          • bearing (integer): Bearing at the latest location.

          • altitude (integer): Altitude at the latest location.

Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Get Trip Summary

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_trip_id": "delivery_trip_001"
}

Response samples

Content type
application/json
{
  • "status": "Ok",
  • "data": {
    • "trip": {
      • "id": "delivery_trip_001",
      • "asset_id": "vehicle_101",
      • "state": "ended",
      • "name": "Downtown Delivery Route",
      • "description": "Morning delivery run covering downtown area",
      • "meta_data": {
        • "shift": "morning",
        • "status": "delayed",
        • "priority": "high",
        • "route_type": "delivery",
        • "delay_reason": "traffic_accident",
        • "estimated_delay_minutes": 30
        },
      • "attributes": {
        • "driver_name": "John Smith",
        • "package_count": 15,
        • "current_location": "Highway Exit 42",
        • "estimated_duration_minutes": 150
        },
      • "started_at": 1767863673,
      • "ended_at": 1767866711,
      • "created_at": 1767863673,
      • "updated_at": 1767866711,
      • "stops": [ ],
      • "route": [
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 45,
          • "location": {
            • "lat": 45.6485790625,
            • "lon": 25.6140759375
            },
          • "meta_data": null,
          • "speed": 18,
          • "timestamp": 1767864327
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 45,
          • "location": {
            • "lat": 45.6485790625,
            • "lon": 25.6140759375
            },
          • "meta_data": null,
          • "speed": 18,
          • "timestamp": 1767864785
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 50,
          • "location": {
            • "lat": 45.649011875,
            • "lon": 25.614433125
            },
          • "meta_data": null,
          • "speed": 20,
          • "timestamp": 1767864810
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 50,
          • "location": {
            • "lat": 45.649011875,
            • "lon": 25.614433125
            },
          • "meta_data": null,
          • "speed": 20,
          • "timestamp": 1767864927
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 60,
          • "location": {
            • "lat": 45.6501340625,
            • "lon": 25.6154209375
            },
          • "meta_data": null,
          • "speed": 25,
          • "timestamp": 1767864942
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 65,
          • "location": {
            • "lat": 45.6507890625,
            • "lon": 25.616011875
            },
          • "meta_data": null,
          • "speed": 24,
          • "timestamp": 1767864956
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 68,
          • "location": {
            • "lat": 45.651423125,
            • "lon": 25.616566875
            },
          • "meta_data": null,
          • "speed": 21,
          • "timestamp": 1767864973
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 70,
          • "location": {
            • "lat": 45.6520009375,
            • "lon": 25.6170890625
            },
          • "meta_data": null,
          • "speed": 19,
          • "timestamp": 1767864987
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 72,
          • "location": {
            • "lat": 45.652511875,
            • "lon": 25.6175340625
            },
          • "meta_data": null,
          • "speed": 16,
          • "timestamp": 1767865000
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 75,
          • "location": {
            • "lat": 45.652945,
            • "lon": 25.617911875
            },
          • "meta_data": null,
          • "speed": 12,
          • "timestamp": 1767865016
          },
        • {
          • "accuracy": 0.5,
          • "altitude": null,
          • "bearing": 78,
          • "location": {
            • "lat": 45.6532890625,
            • "lon": 25.6182009375
            },
          • "meta_data": null,
          • "speed": 8,
          • "timestamp": 1767865038
          }
        ],
      • "distance_m": 614.12314995,
      • "duration_s": 711,
      • "location_count": 11,
      • "asset": {
        • "id": "vehicle_101",
        • "state": "active",
        • "name": "Delivery Van 101 - Updated",
        • "description": "Primary delivery vehicle for downtown and suburban routes",
        • "created_at": 1766480112,
        • "updated_at": 1766487603,
        • "properties": {
          • "zone": "downtown",
          • "department": "logistics",
          • "capacity_kg": 1000,
          • "vehicle_type": "van",
          • "license_plate": "ABC-123"
          },
        • "latest_location": {
          • "location": {
            • "lat": 45.6532890625,
            • "lon": 25.6182009375
            },
          • "timestamp": 1767865038,
          • "accuracy": 0.5,
          • "speed": 8,
          • "bearing": 78,
          • "altitude": null
          }
        }
      }
    }
}

Delete Trips

Description

This endpoint is used to delete trips based on the provided trip identifiers. It allows clients to remove specific trips from the system by sending a list of unique identifiers.

Request Body Parameters

The request body must be a JSON object containing the following parameter:

  • p_ids (Array of Strings): A list of unique identifiers for the trips that need to be deleted. Each identifier should be a valid UUID string.

Response

Upon successful deletion, the server responds with a status code of 200 and a JSON object containing the following field:

  • deleted_ids (Array of Strings): This array will contain the identifiers of the trips that were successfully deleted. If no trips were deleted, this array will be empty.
Authorizations:
ApiKeyAuth
header Parameters
Accept
string
Default: application/json
Example: application/json

Content type accepted by client

Content-Type
string
Default: application/json
Example: application/json

Content type of the request body

Request Body schema: application/json
required

Request body for Delete Trips

object

Responses

Response Schema: application/json
object
Response Schema: application/json
object
Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "p_ids": [
    • "delivery_trip_002"
    ]
}

Response samples

Content type
application/json
{
  • "deleted_ids": [
    • "delivery_trip_002"
    ]
}