### Get Server Information Source: https://www.traccar.org/api-reference/openapi.yaml Fetches information about the Traccar server. ```APIDOC ## GET /server ### Description Fetch Server information. ### Method GET ### Endpoint /server ### Response #### Success Response (200) - (object) - Server information ``` -------------------------------- ### Get Command by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific command by its unique identifier. ```APIDOC ## GET /commands/{id} ### Description Retrieves a specific command by its ID. ### Method GET ### Endpoint /commands/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the command. ``` -------------------------------- ### Get Driver by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific driver by its unique identifier. ```APIDOC ## GET /drivers/{id} ### Description Retrieves a specific driver by its ID. ### Method GET ### Endpoint /drivers/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the driver. ``` -------------------------------- ### Get Device by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific device by its unique identifier. ```APIDOC ## GET /devices/{id} ### Description Retrieves a specific device by its ID. ### Method GET ### Endpoint /devices/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the device. ``` -------------------------------- ### Get Session Information Source: https://www.traccar.org/api-reference/openapi.yaml Fetches information about the current user session, optionally by token. ```APIDOC ## GET /session ### Description Fetch Session information. ### Method GET ### Endpoint /session ### Parameters #### Query Parameters - **token** (string) - Optional ### Response #### Success Response (200) - (object) - User object #### Error Response (404) - Not Found ``` -------------------------------- ### Get Geofence by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific geofence by its unique identifier. ```APIDOC ## GET /geofences/{id} ### Description Retrieves a specific geofence by its ID. ### Method GET ### Endpoint /geofences/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the geofence. ``` -------------------------------- ### Get Notification by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific notification by its unique identifier. ```APIDOC ## GET /notifications/{id} ### Description Retrieves a specific notification by its ID. ### Method GET ### Endpoint /notifications/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the notification. ``` -------------------------------- ### Get User by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific user by its unique identifier. ```APIDOC ## GET /users/{id} ### Description Retrieves a specific user by its ID. ### Method GET ### Endpoint /users/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the user. ``` -------------------------------- ### Get Cache Diagnostics Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves diagnostic information about the server's cache. ```APIDOC ## GET /server/cache ### Description Fetch cache diagnostics. ### Method GET ### Endpoint /server/cache ### Response #### Success Response (200) - (string) - Cache diagnostic information ``` -------------------------------- ### Get Server Statistics Source: https://www.traccar.org/api-reference/openapi.yaml Fetches server statistics within a specified time period. ```APIDOC ## GET /statistics ### Description Fetch server Statistics. ### Method GET ### Endpoint /statistics ### Parameters #### Query Parameters - **from** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ### Response #### Success Response (200) - (array[Statistics]) - OK ``` -------------------------------- ### Get Attribute by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific attribute by its unique identifier. ```APIDOC ## GET /attributes/{id} ### Description Retrieves a specific attribute by its ID. ### Method GET ### Endpoint /attributes/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the attribute. ``` -------------------------------- ### Get Calendars Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of Calendars. Without parameters, it returns a list of Calendars the user has access to. ```APIDOC ## GET /calendars ### Description Fetch a list of Calendars. Without params, it returns a list of Calendars the user has access to. ### Method GET ### Endpoint /calendars ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities - **userId** (integer) - Optional - Standard users can use this only with their own _userId_ - **limit** (integer) - Optional - Limit the number of returned results - **offset** (integer) - Optional - Offset for pagination - **keyword** (string) - Optional - Search keyword filter ### Response #### Success Response (200) - (array[Calendar]) - OK ``` -------------------------------- ### Get Report Summary Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of ReportSummary within a specified time period for Devices or Groups. Requires at least one deviceId or groupId. ```APIDOC ## GET /reports/summary ### Description Fetch a list of ReportSummary within the time period for the Devices or Groups. At least one _deviceId_ or one _groupId_ must be passed. ### Method GET ### Endpoint /reports/summary ### Parameters #### Query Parameters - **deviceId** (array[integer]) - Optional - - **groupId** (array[integer]) - Optional - - **from** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ### Response #### Success Response (200) - (array[ReportSummary]) - OK #### Success Response (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) - (array[ReportSummary]) - OK ``` -------------------------------- ### Get Calendar by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific calendar by its unique identifier. ```APIDOC ## GET /calendars/{id} ### Description Retrieves a specific calendar by its ID. ### Method GET ### Endpoint /calendars/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the calendar. ``` -------------------------------- ### Link Object to Another Source: https://www.traccar.org/api-reference/openapi.yaml Links one object to another, for example, linking a device to a group. ```APIDOC ## POST /permissions ### Description Links one object to another, for example, linking a device to a group. ### Method POST ### Endpoint /permissions ### Parameters #### Request Body - **body** (Permission) - Required - The permission object defining the link. ``` -------------------------------- ### Get Maintenance by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific maintenance entry by its unique identifier. ```APIDOC ## GET /maintenance/{id} ### Description Retrieves a specific maintenance entry by its ID. ### Method GET ### Endpoint /maintenance/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the maintenance entry. ``` -------------------------------- ### Get Available Timezones Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of available timezones supported by the server. ```APIDOC ## GET /server/timezones ### Description Fetch available timezones. ### Method GET ### Endpoint /server/timezones ### Response #### Success Response (200) - (array) - Array of timezone strings ``` -------------------------------- ### Get Geofence Enter/Exit Intervals Source: https://www.traccar.org/api-reference/openapi.yaml Fetches geofence enter/exit intervals within a specified time period for Devices or Groups. Requires at least one deviceId or groupId. ```APIDOC ## GET /reports/geofences ### Description Fetch geofence enter/exit intervals within the time period for Devices or Groups. At least one _deviceId_ or one _groupId_ must be passed. ### Method GET ### Endpoint /reports/geofences ### Parameters #### Query Parameters - **deviceId** (array[integer]) - Optional - - **groupId** (array[integer]) - Optional - - **geofenceId** (array[integer]) - Optional - - **from** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ### Response #### Success Response (200) - (array[ReportGeofences]) - OK ``` -------------------------------- ### Get Positions Source: https://www.traccar.org/api-reference/openapi.yaml Fetches one or more positions. Multiple IDs can be passed using repeated `id` query parameters. ```APIDOC ## GET /positions ### Description Fetches one or more positions. ### Method GET ### Endpoint /positions ### Parameters #### Query Parameters - **id** (integer) - Optional - To fetch one or more positions. Multiple params can be passed like `id=31&id=42` - **from** (string) - Optional - Start time in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Optional - End time in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ### Response #### Success Response (200) - (array) - Array of Position objects ``` -------------------------------- ### Get Report Trips Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of ReportTrips within a specified time period for Devices or Groups. Requires at least one deviceId or groupId. ```APIDOC ## GET /reports/trips ### Description Fetch a list of ReportTrips within the time period for the Devices or Groups. At least one _deviceId_ or one _groupId_ must be passed. ### Method GET ### Endpoint /reports/trips ### Parameters #### Query Parameters - **deviceId** (array[integer]) - Optional - - **groupId** (array[integer]) - Optional - - **from** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ### Response #### Success Response (200) - (array[ReportTrips]) - OK #### Success Response (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) - (array[ReportTrips]) - OK ``` -------------------------------- ### Get Report Stops Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of ReportStops within a specified time period for Devices or Groups. Requires at least one deviceId or groupId. ```APIDOC ## GET /reports/stops ### Description Fetch a list of ReportStops within the time period for the Devices or Groups. At least one _deviceId_ or one _groupId_ must be passed. ### Method GET ### Endpoint /reports/stops ### Parameters #### Query Parameters - **deviceId** (array[integer]) - Optional - - **groupId** (array[integer]) - Optional - - **from** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Required - in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ### Response #### Success Response (200) - (array[ReportStops]) - OK #### Success Response (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) - (array[ReportStops]) - OK ``` -------------------------------- ### Reverse Geocode Coordinates Source: https://www.traccar.org/api-reference/openapi.yaml Performs reverse geocoding to get an address from latitude and longitude coordinates. ```APIDOC ## GET /server/geocode ### Description Reverse geocode coordinates. ### Method GET ### Endpoint /server/geocode ### Parameters #### Query Parameters - **latitude** (number) - Required - **longitude** (number) - Required ### Response #### Success Response (200) - (string) - Address string #### Error Response (500) - Description: Reverse geocoding is not enabled ``` -------------------------------- ### Create Device Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new device in the system. ```APIDOC ## POST /devices ### Description Creates a new device. ### Method POST ### Endpoint /devices ### Request Body - **Device** (object) - Required - The device object to create. See schema definition for details. ``` -------------------------------- ### Create Driver Source: https://www.traccar.org/api-reference/openapi.yaml Creates a driver. ```APIDOC ## POST /drivers ### Description Creates a driver. ### Method POST ### Endpoint /drivers ### Request Body - **body** (object) - Required - Driver object ### Response #### Success Response (200) - **body** (object) - Driver object ``` -------------------------------- ### Create Driver Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new driver. ```APIDOC ## POST /drivers ### Description Creates a new driver. ### Method POST ### Endpoint /drivers ### Request Body - **Driver** (object) - Required - The driver object to create. See schema definition for details. ``` -------------------------------- ### Create User Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new user. ```APIDOC ## POST /users ### Description Creates a new user. ### Method POST ### Endpoint /users ### Request Body - **User** (object) - Required - The user object to create. See schema definition for details. ``` -------------------------------- ### Create a User Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new user in the system. ```APIDOC ## POST /users ### Description Creates a new user in the system. ### Method POST ### Endpoint /users ### Parameters #### Request Body - **body** (User) - Required - The User object to create. ### Request Example ```json { "name": "New User", "email": "newuser@example.com" } ``` ### Response #### Success Response (200) - **User** - The created User object. #### Response Example ```json { "id": 2, "name": "New User", "email": "newuser@example.com" } ``` ``` -------------------------------- ### Create Geofence Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new geofence. ```APIDOC ## POST /geofences ### Description Creates a new geofence. ### Method POST ### Endpoint /geofences ### Request Body - **Geofence** (object) - Required - The geofence object to create. See schema definition for details. ``` -------------------------------- ### Create a Device Source: https://www.traccar.org/api-reference/openapi.yaml Create a Device. This endpoint allows for the creation of new devices. ```APIDOC ## POST /devices ### Description Create a Device. ### Method POST ### Endpoint /devices ### Request Body - **body** (Device) - Required - The device object to create. ### Response #### Success Response (200) - **Device** (Device) - The created device details. ``` -------------------------------- ### Server Object Source: https://www.traccar.org/api-reference/openapi.yaml Represents server-wide configuration settings. ```APIDOC ## Server Object ### Description Represents server-wide configuration settings. ### Properties - **id** (integer, int64): Unique server configuration identifier. - **registration** (boolean): Whether new user registrations are allowed. - **readonly** (boolean): When true only administrators can modify server-wide settings. - **deviceReadonly** (boolean): Disallow device attribute changes for non-admins. - **limitCommands** (boolean): Restrict command execution to supported protocol commands. - **map** (string): Default map layer identifier. - **bingKey** (string): Bing Maps API key used when Bing is selected as a provider. - **mapUrl** (string): Custom tile server URL template if configured. - **poiLayer** (string): External point-of-interest layer configuration. - **announcement** (string): Message displayed to all users in the web application. - **latitude** (number): Default map center latitude. - **longitude** (number): Default map center longitude. - **zoom** (integer): Default map zoom level. - **version** (string): Traccar server version string. - **forceSettings** (boolean): Forces users to use the server-wide settings instead of their own. - **coordinateFormat** (string): Default coordinate format for displaying positions. - **openIdEnabled** (boolean): Indicates whether OpenID authentication is available. - **openIdForce** (boolean): Require OpenID authentication for all users when enabled. - **attributes** (object): Additional server-level configuration values. ``` -------------------------------- ### Create Command Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new command. ```APIDOC ## POST /commands ### Description Creates a new command. ### Method POST ### Endpoint /commands ### Request Body - **Command** (object) - Required - The command object to create. See schema definition for details. ``` -------------------------------- ### Get Group by ID Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a specific group by its unique identifier. ```APIDOC ## GET /groups/{id} ### Description Retrieves a specific group by its ID. ### Method GET ### Endpoint /groups/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the group. ``` -------------------------------- ### Create Permission Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new permission entry. ```APIDOC ## POST /permissions ### Description Creates a new permission. ### Method POST ### Endpoint /permissions ### Request Body - **Permission** (object) - Required - The permission object to create. See schema definition for details. ``` -------------------------------- ### Create Session Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new user session by authenticating with email and password. ```APIDOC ## POST /session ### Description Create a new Session. ### Method POST ### Endpoint /session ### Request Body - **email** (string) - Required - **password** (string) - Required ### Response #### Success Response (200) - (object) - User object #### Error Response (401) - Unauthorized ``` -------------------------------- ### Fetch a list of available Commands for the Device Source: https://www.traccar.org/api-reference/openapi.yaml Fetch a list of available Commands for the Device or all possible Commands if Device is omitted. This endpoint can retrieve command types for a specific device or a general list. ```APIDOC ## GET /commands/types ### Description Fetch a list of available Commands for the Device or all possible Commands if Device omitted. ### Method GET ### Endpoint /commands/types ### Parameters #### Query Parameters - **deviceId** (integer) - Optional - Internal device identifier. Only works if device has already reported some locations. - **textChannel** (boolean) - Optional - When `true` return SMS commands. If not specified or `false` return data commands. ### Response #### Success Response (200) - **CommandType[]** (CommandType[]) - A list of available command types. ``` -------------------------------- ### Fetch a list of Devices Source: https://www.traccar.org/api-reference/openapi.yaml Fetch a list of Devices. Without any parameters, returns a list of the user's devices. Supports filtering, pagination, and searching. ```APIDOC ## GET /devices ### Description Fetch a list of Devices. Without any params, returns a list of the user's devices. ### Method GET ### Endpoint /devices ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **id** (integer) - Optional - To fetch one or more devices. Multiple params can be passed like `id=31&id=42`. - **uniqueId** (string) - Optional - To fetch one or more devices. Multiple params can be passed like `uniqueId=333331&uniqieId=44442`. - **excludeAttributes** (boolean) - Optional - Exclude attributes field from device payload. - **limit** (integer) - Optional - Limit the number of returned results. - **offset** (integer) - Optional - Offset for pagination. - **keyword** (string) - Optional - Search keyword filter (searches name, uniqueId, phone, model, contact). ### Response #### Success Response (200) - **Device[]** (Device[]) - A list of devices. #### Error Response (400) - **No permission** - Indicates lack of necessary permissions. ``` -------------------------------- ### Fetch Drivers Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of drivers. Without parameters, it returns a list of drivers the user has access to. ```APIDOC ## GET /drivers ### Description Fetches a list of drivers. Without parameters, it returns a list of drivers the user has access to. ### Method GET ### Endpoint /drivers ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities - **userId** (integer) - Optional - Standard users can use this only with their own _userId_ - **deviceId** (integer) - Optional - Standard users can use this only with _deviceId_s they have access to - **groupId** (integer) - Optional - Standard users can use this only with _groupId_s they have access to - **refresh** (boolean) - Optional - **limit** (integer) - Optional - Limit the number of returned results - **offset** (integer) - Optional - Offset for pagination - **keyword** (string) - Optional - Search keyword filter ### Response #### Success Response (200) - **body** (array) - Array of Driver objects ``` -------------------------------- ### Create Calendar Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new Calendar. ```APIDOC ## POST /calendars ### Description Create a Calendar. ### Method POST ### Endpoint /calendars ``` -------------------------------- ### Create Calendar Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new calendar. ```APIDOC ## POST /calendars ### Description Creates a new calendar. ### Method POST ### Endpoint /calendars ### Request Body - **Calendar** (object) - Required - The calendar object to create. See schema definition for details. ``` -------------------------------- ### Create Calendar Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new calendar entry. ```APIDOC ## POST /calendars ### Description Creates a new calendar entry. ### Method POST ### Endpoint /calendars ### Request Body - **body** (object) - Required - Calendar object ### Response #### Success Response (200) - **body** (object) - Calendar object ``` -------------------------------- ### Fetch Supported Commands for Device Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of saved commands that are currently supported by a specific device and its associated groups, filtered by the device's protocol support. ```APIDOC ## GET /commands/send ### Description Fetch a list of Saved Commands supported by Device at the moment. Return a list of saved commands linked to Device and its groups, filtered by current Device protocol support. ### Method GET ### Endpoint /commands/send ### Parameters #### Query Parameters - **deviceId** (integer) - Required - Standard users can use this only with _deviceId_s, they have access to ### Response #### Success Response (200) - **(array of Command objects)** - OK ``` -------------------------------- ### Create Attribute Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new attribute. ```APIDOC ## POST /attributes ### Description Creates a new attribute. ### Method POST ### Endpoint /attributes ### Request Body - **Attribute** (object) - Required - The attribute object to create. See schema definition for details. ``` -------------------------------- ### Create an Order Source: https://www.traccar.org/api-reference/openapi.yaml Create an Order. This endpoint allows for the creation of new orders. ```APIDOC ## POST /orders ### Description Create an Order. ### Method POST ### Endpoint /orders ### Request Body - **body** (Order) - Required - The order object to create. ### Response #### Success Response (200) - **Order** (Order) - The created order details. ``` -------------------------------- ### Create Group Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new group. ```APIDOC ## POST /groups ### Description Creates a new group. ### Method POST ### Endpoint /groups ### Parameters #### Request Body - **body** (Group) - Required - The group object to create. ``` -------------------------------- ### Create Group Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new group. ```APIDOC ## POST /groups ### Description Creates a new group. ### Method POST ### Endpoint /groups ### Request Body - **Group** (object) - Required - The group object to create. See schema definition for details. ``` -------------------------------- ### Create a Notification Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new notification. ```APIDOC ## POST /notifications ### Description Creates a new notification. ### Method POST ### Endpoint /notifications ### Parameters #### Request Body - **body** (Notification) - Required - The Notification object to create. ### Request Example ```json { "type": "deviceOffline", "content": "Device is offline." } ``` ### Response #### Success Response (200) - **Notification** - The created Notification object. ``` -------------------------------- ### QueuedCommand Object Source: https://www.traccar.org/api-reference/openapi.yaml Represents a command that has been queued for delivery to a device. ```APIDOC ## QueuedCommand Object ### Description Represents a command that has been queued for delivery to a device. ### Properties - **id** (integer, int64): Identifier of the queued command job. - **deviceId** (integer, int64): Device identifier the queued command will be delivered to. - **type** (string): Command type that will be executed. - **textChannel** (boolean): Indicates whether the queued command uses SMS delivery. - **attributes** (object): Stored parameters for the queued command. ``` -------------------------------- ### Command Object Source: https://www.traccar.org/api-reference/openapi.yaml Represents a command that can be sent to a device. ```APIDOC ## Command Object ### Description Represents a command that can be sent to a device. ### Properties - **id** (integer, int64): Unique saved command identifier. - **deviceId** (integer, int64): Target device identifier when the command is bound to one device. - **description** (string): User friendly label displayed in the UI. - **type** (string): Command type as defined by the device protocol. - **textChannel** (boolean): Whether to send the command using the SMS channel. - **attributes** (object): Additional parameters required by the command type. ``` -------------------------------- ### Create Notification Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new notification. ```APIDOC ## POST /notifications ### Description Creates a new notification. ### Method POST ### Endpoint /notifications ### Request Body - **Notification** (object) - Required - The notification object to create. See schema definition for details. ``` -------------------------------- ### Create Maintenance Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new maintenance entry. ```APIDOC ## POST /maintenance ### Description Creates a new maintenance entry. ### Method POST ### Endpoint /maintenance ### Request Body - **Maintenance** (object) - Required - The maintenance object to create. See schema definition for details. ``` -------------------------------- ### OpenID Callback Source: https://www.traccar.org/api-reference/openapi.yaml Handles the callback from the OpenID Connect identity provider after authentication. ```APIDOC ## GET /session/openid/callback ### Description Handles the callback from the OpenID Connect identity provider after authentication. Upon successful authentication, the user is redirected to the homepage. ### Method GET ### Endpoint /session/openid/callback ### Response #### Success Response (303) - **description**: Successful authentication, redirect to homepage. ``` -------------------------------- ### List Devices Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of devices, with options to filter by device IDs or group IDs, and specify a time range. ```APIDOC ## GET /devices ### Description Retrieves a list of devices. Supports filtering by device IDs, group IDs, and a time range. ### Method GET ### Endpoint /devices ### Parameters #### Query Parameters - **deviceId** (array[integer]) - Optional - List of device identifiers to include. - **groupId** (array[integer]) - Optional - List of group identifiers to include. - **from** (string) - Required - Start time in ISO 8601 format. eg. `1963-11-22T18:30:00Z` - **to** (string) - Required - End time in ISO 8601 format. eg. `1963-11-22T18:30:00Z` ``` -------------------------------- ### Device Object Source: https://www.traccar.org/api-reference/openapi.yaml Represents a tracked device. ```APIDOC ## Device Object ### Description Represents a tracked device. ### Properties - **id** (integer, int64): Unique identifier assigned by Traccar. - **name** (string): Human friendly device label. - **uniqueId** (string): Hardware or protocol specific unique identifier. - **status** (string): Current connection status such as `online`, `offline`, or `unknown`. - **disabled** (boolean): Whether the device is disabled by an administrator. - **lastUpdate** (string, date-time): in ISO 8601 format. eg. `1963-11-22T18:30:00Z`. - **positionId** (integer, int64): Identifier of the last known position. - **groupId** (integer, int64): Parent group identifier when the device is assigned to a group. - **phone** (string): Contact phone number used for SMS commands. - **model** (string): Device model or hardware revision. - **contact** (string): Responsible person's contact information. - **category** (string): Free form category used for grouping devices in the UI. - **attributes** (object): Custom attributes for protocol or business specific data. ``` -------------------------------- ### Fetch a list of Orders Source: https://www.traccar.org/api-reference/openapi.yaml Fetch a list of Orders. Without parameters, it returns a list of Orders the user has access to. Supports filtering, pagination, and searching. ```APIDOC ## GET /orders ### Description Fetch a list of Orders. Without params, it returns a list of Orders the user has access to. ### Method GET ### Endpoint /orders ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **excludeAttributes** (boolean) - Optional - Skip returning the attributes map. - **limit** (integer) - Optional - Limit the number of returned results. - **offset** (integer) - Optional - Offset for pagination. - **keyword** (string) - Optional - Search keyword filter. ### Response #### Success Response (200) - **Order[]** (Order[]) - A list of orders. ``` -------------------------------- ### Upload Server File Source: https://www.traccar.org/api-reference/openapi.yaml Uploads a file to the server. ```APIDOC ## POST /server/file/{path} ### Description Upload a server file. ### Method POST ### Endpoint /server/file/{path} ### Parameters #### Path Parameters - **path** (string) - Required #### Request Body - **file** (string) - Required - Binary file content ### Response #### Success Response (200) - OK ``` -------------------------------- ### Create a Saved Command Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new saved command. This command can then be sent to devices. ```APIDOC ## POST /commands ### Description Create a Saved Command. ### Method POST ### Endpoint /commands ### Request Body - **(Command object)** - Required - The command object to be created. ### Response #### Success Response (200) - **(Command object)** - OK ``` -------------------------------- ### Fetch Session Information Source: https://www.traccar.org/api-reference/openapi.yaml Fetches information about the current session. ```APIDOC ## GET /session/openid/auth ### Description Fetches information about the current session. This endpoint is used for OpenID Connect authentication. ### Method GET ### Endpoint /session/openid/auth ### Response #### Success Response (303) - **description**: Redirect to OpenID Connect identity provider. ``` -------------------------------- ### Route Report Source: https://www.traccar.org/api-reference/openapi.yaml Fetch a list of Positions within a specified time period for the Devices or Groups. At least one _deviceId_ or one _groupId_ must be passed. ```APIDOC ## GET /reports/route ### Description Fetch a list of Positions within the time period for the Devices or Groups. ### Method GET ### Endpoint /reports/route ### Parameters #### Query Parameters - **deviceId** (array of integer) - Required - The ID(s) of the device(s). - **groupId** (array of integer) - Required - The ID(s) of the group(s). - **from** (string) - Required - Start of the time period in ISO 8601 format (e.g., `1963-11-22T18:30:00Z`). - **to** (string) - Required - End of the time period in ISO 8601 format (e.g., `1963-11-22T18:30:00Z`). ### Response #### Success Response (200) - **Position** (array) - A list of Position objects. #### Success Response (200) - Spreadsheet - **Position** (array) - A list of Position objects in spreadsheet format. ``` -------------------------------- ### Fetch Saved Commands Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of saved commands that the user has access to. This can be filtered by user ID, device ID, or group ID for standard users, or fetched in full by administrators. ```APIDOC ## GET /commands ### Description Fetch a list of Saved Commands. ### Method GET ### Endpoint /commands ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities - **userId** (integer) - Optional - Standard users can use this only with their own _userId_ - **deviceId** (integer) - Optional - Standard users can use this only with _deviceId_s, they have access to - **groupId** (integer) - Optional - Standard users can use this only with _groupId_s, they have access to - **refresh** (boolean) - Optional - **limit** (integer) - Optional - Limit the number of returned results - **offset** (integer) - Optional - Offset for pagination - **keyword** (string) - Optional - Search keyword filter ### Response #### Success Response (200) - **(array of Command objects)** - OK ``` -------------------------------- ### Fetch a list of Users Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of users. Admins and managers can filter by userId. Supports pagination and keyword search. ```APIDOC ## GET /users ### Description Retrieves a list of users. Admins and managers can filter by userId. Supports pagination and keyword search. ### Method GET ### Endpoint /users ### Parameters #### Query Parameters - **userId** (string) - Optional - Can only be used by admin or manager users. - **limit** (integer) - Optional - Limit the number of returned results. - **offset** (integer) - Optional - Offset for pagination. - **keyword** (string) - Optional - Search keyword filter (searches name, email). ### Response #### Success Response (200) - **array** - An array of User objects. #### Response Example ```json [ { "id": 1, "name": "User Name", "email": "user@example.com" } ] ``` #### Error Response (400) No Permission. ``` -------------------------------- ### Fetch Groups Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of groups. Admins can fetch all groups, while standard users can fetch groups they belong to. ```APIDOC ## GET /groups ### Description Fetches a list of groups. Admins can fetch all groups, while standard users can fetch groups they belong to. ### Method GET ### Endpoint /groups ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **limit** (integer) - Optional - Limit the number of returned results. - **offset** (integer) - Optional - Offset for pagination. - **keyword** (string) - Optional - Search keyword filter. ``` -------------------------------- ### Geofence Management Source: https://www.traccar.org/api-reference/openapi.yaml Endpoints for managing geofences, including fetching, creating, updating, and deleting them. ```APIDOC ## GET /geofences ### Description Fetch a list of Geofences the user has access to. Without parameters, it returns all accessible Geofences. ### Method GET ### Endpoint /geofences ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **deviceId** (integer) - Optional - Standard users can use this only with _deviceId_s they have access to. - **groupId** (integer) - Optional - Standard users can use this only with _groupId_s they have access to. - **refresh** (boolean) - Optional. - **limit** (integer) - Optional - Limit the number of returned results. - **offset** (integer) - Optional - Offset for pagination. - **keyword** (string) - Optional - Search keyword filter. ### Response #### Success Response (200) - **Geofence** (array) - A list of Geofence objects. ``` ```APIDOC ## POST /geofences ### Description Create a new Geofence. ### Method POST ### Endpoint /geofences ### Request Body - **body** (Geofence) - Required - The Geofence object to create. ### Response #### Success Response (200) - **Geofence** (Geofence) - The created Geofence object. ``` ```APIDOC ## PUT /geofences/{id} ### Description Update an existing Geofence. ### Method PUT ### Endpoint /geofences/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the Geofence to update. ### Request Body - **body** (Geofence) - Required - The updated Geofence object. ### Response #### Success Response (200) - **Geofence** (Geofence) - The updated Geofence object. ``` ```APIDOC ## DELETE /geofences/{id} ### Description Delete a Geofence. ### Method DELETE ### Endpoint /geofences/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the Geofence to delete. ### Response #### Success Response (204) No Content. ``` -------------------------------- ### Group Object Source: https://www.traccar.org/api-reference/openapi.yaml Represents a group of devices. ```APIDOC ## Group Object ### Description Represents a group of devices. ### Properties - **id** (integer, int64): Unique group identifier. - **name** (string): Group display name. - **groupId** (integer, int64): Parent group identifier for nested grouping. - **attributes** (object): Arbitrary metadata attached to the group. ``` -------------------------------- ### Fetch a list of available Notification types Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of all available notification types. ```APIDOC ## GET /notifications/types ### Description Retrieves a list of all available notification types. ### Method GET ### Endpoint /notifications/types ### Response #### Success Response (200) - **array** - An array of NotificationType objects. #### Response Example ```json [ "deviceOnline", "deviceOffline" ] ``` ``` -------------------------------- ### Dispatch commands to device Source: https://www.traccar.org/api-reference/openapi.yaml Dispatch a new command or Saved Command if _body.id_ is set. This endpoint allows sending commands to devices, either individually or to all devices within a group. ```APIDOC ## POST /commands ### Description Dispatch a new command or Saved Command if _body.id_ set. ### Method POST ### Endpoint /commands ### Parameters #### Query Parameters - **groupId** (integer) - Optional - Send the command to all devices in the group ### Request Body - **body** (Command) - Required - The command object to dispatch. ### Response #### Success Response (200) - **Command** (Command) - The dispatched command details. #### Success Response (202) - **QueuedCommand** or array of **QueuedCommand** (QueuedCommand[]) - Command queued for delivery. ``` -------------------------------- ### Device Statistics Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves statistical data for devices. ```APIDOC ## GET /statistics ### Description Retrieves statistical data including active users, active devices, API requests, and message counts. ### Method GET ### Endpoint /statistics ### Parameters #### Query Parameters - **from** (string) - Optional - Start time in ISO 8601 format. - **to** (string) - Optional - End time in ISO 8601 format. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **deviceId** (integer) - Optional - Standard users can use this only with _deviceId_s they have access to. - **groupId** (integer) - Optional - Standard users can use this only with _groupId_s they have access to. ``` -------------------------------- ### Trigger Garbage Collection Source: https://www.traccar.org/api-reference/openapi.yaml Initiates a garbage collection process on the server. ```APIDOC ## GET /server/gc ### Description Trigger garbage collection. ### Method GET ### Endpoint /server/gc ### Response #### Success Response (200) - OK ``` -------------------------------- ### Fetch a list of Notifications Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves a list of notifications. Users can fetch notifications they have access to. Admins can fetch all notifications. Supports filtering, pagination, and keyword search. ```APIDOC ## GET /notifications ### Description Retrieves a list of notifications. Users can fetch notifications they have access to. Admins can fetch all notifications. Supports filtering, pagination, and keyword search. ### Method GET ### Endpoint /notifications ### Parameters #### Query Parameters - **all** (boolean) - Optional - Can only be used by admins or managers to fetch all entities. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **deviceId** (integer) - Optional - Standard users can use this only with _deviceId_s they have access to. - **groupId** (integer) - Optional - Standard users can use this only with _groupId_s they have access to. - **refresh** (boolean) - Optional. - **limit** (integer) - Optional - Limit the number of returned results. - **offset** (integer) - Optional - Offset for pagination. - **keyword** (string) - Optional - Search keyword filter. ### Response #### Success Response (200) - **array** - An array of Notification objects. #### Response Example ```json [ { "id": 1, "type": "deviceOnline", "content": "Device is online." } ] ``` ``` -------------------------------- ### Create Maintenance Record Source: https://www.traccar.org/api-reference/openapi.yaml Creates a new maintenance record. ```APIDOC ## POST /maintenance ### Description Creates a new maintenance record. ### Method POST ### Endpoint /maintenance ### Request Body - **body** (Maintenance) - Required - The maintenance record object to create ### Response #### Success Response (200) - **response** (Maintenance) - The created maintenance record object ``` -------------------------------- ### Events Report Source: https://www.traccar.org/api-reference/openapi.yaml Fetch a list of Events within a specified time period for the Devices or Groups. At least one _deviceId_ or one _groupId_ must be passed. ```APIDOC ## GET /reports/events ### Description Fetch a list of Events within the time period for the Devices or Groups. ### Method GET ### Endpoint /reports/events ### Parameters #### Query Parameters - **deviceId** (array of integer) - Required - The ID(s) of the device(s). - **groupId** (array of integer) - Required - The ID(s) of the group(s). - **type** (array of string) - Optional - Filter events by type. '% can be used to return events of all types'. - **from** (string) - Required - Start of the time period in ISO 8601 format (e.g., `1963-11-22T18:30:00Z`). - **to** (string) - Required - End of the time period in ISO 8601 format (e.g., `1963-11-22T18:30:00Z`). ### Response #### Success Response (200) - **Event** (array) - A list of Event objects. #### Success Response (200) - Spreadsheet - **Event** (array) - A list of Event objects in spreadsheet format. ``` -------------------------------- ### Fetch Positions Source: https://www.traccar.org/api-reference/openapi.yaml Fetches a list of positions for devices. It is recommended to use the Traccar WebSocket API for real-time data. ```APIDOC ## GET /positions ### Description Fetches a list of positions for devices. It is recommended to use the Traccar WebSocket API for real-time data. Without any params, it returns a list of last known positions for all the user's Devices. _from_ and _to_ fields are not required with _id_. ### Method GET ### Endpoint /positions ### Parameters #### Query Parameters - **deviceId** (integer) - Optional - _deviceId_ is optional, but requires the _from_ and _to_ parameters when used. - **from** (string) - Optional - in ISO 8601 format. eg. `1963-11-22T18:30:00Z`. - **to** (string) - Optional - in ISO 8601 format. ``` -------------------------------- ### Device Accumulators Source: https://www.traccar.org/api-reference/openapi.yaml Retrieves accumulator data for a specific device. ```APIDOC ## GET /devices/{deviceId}/accumulators ### Description Retrieves accumulator data, such as total distance and engine hours, for a specific device. ### Method GET ### Endpoint /devices/{deviceId}/accumulators ### Parameters #### Path Parameters - **deviceId** (integer) - Required - The unique identifier of the device. #### Query Parameters - **refresh** (boolean) - Optional - Force refreshed values instead of cached results. - **userId** (integer) - Optional - Standard users can use this only with their own _userId_. - **deviceId** (integer) - Optional - Standard users can use this only with _deviceId_s they have access to. - **groupId** (integer) - Optional - Standard users can use this only with _groupId_s they have access to. ```