For the complete documentation index, see llms.txt. This page is also available as Markdown.

Commands

Create, manage, and execute custom device commands and HTTP POST webhooks for individual trackers.

Commands let you define reusable commands for a tracker and execute them on demand. Two command types are supported:

  • Hardware — sends a protocol-level command string directly to the device (e.g. to reboot firmware or toggle a relay).

  • HTTP — sends an HTTP POST request with a JSON body to any URL, optionally embedding live device attributes in the payload.

Commands are stored per tracker and can be executed at any time from the Commands block in the platform UI.

Commands is designed for manual, on-demand actions targeting a single tracker. For automated, rule-based command sending across multiple devices, use IoT Logic with the Device action or Webhook nodes.

Object structure

Each command has a common set of fields. The config object differs by type.

{
  "id": 19,
  "name": "Reboot",
  "type": "hardware",
  "config": {
    "command": "cpureset",
    "reliable": true
  }
}
  • id - int. Unique command ID. Assigned by the server on creation. Read-only.

  • name - string. Human-readable label shown in the Commands block (e.g. "engine_stop").

  • type - string. Always "hardware" for this variant.

  • config - object. Hardware command configuration.

    • command - string. The exact protocol-level command string sent to the device (e.g. "RELAY,1#"). Valid values are device-specific — refer to your device manufacturer's documentation.

    • reliable - boolean. If true, the platform requests delivery confirmation (acknowledgement) from the device before marking the command as successfully sent.

API actions

API base path: /tracker/command.

All API calls require authentication. Pass your API key or user session hash as the hash parameter in the request body, as a query string parameter, or in the Authorization: NVX <value> header. API keys are recommended for integrations — they don't expire and can be managed independently. See Authentication for details.

create

Creates a new command for a tracker.

Required sub-user rights: tracker_update.

Parameters

name
description
type
format

hash

API key or user session hash.

string

"your_api_key"

tracker_id

ID of the tracker to create the command for.

int

70074765

command

Command object without id. See object structure.

object

See examples

Examples

Response

Returns the server-assigned id of the created command.

  • success - boolean. Always true for successful responses.

  • id - int. ID of the newly created command.

Errors

  • 7 - Invalid parameters – if required fields are missing or malformed.

  • 201 - Not found in the database – if no tracker with the given tracker_id belongs to the current user.

General error codes


update

Updates an existing command. The full object including id must be provided.

Required sub-user rights: tracker_update.

Parameters

name
description
type
format

hash

API key or user session hash.

string

"your_api_key"

tracker_id

ID of the tracker that owns the command.

int

70074765

command

Updated command object including id. See object structure.

object

See example

Examples

Response

  • success - boolean. Always true for successful responses.

Errors

  • 7 - Invalid parameters – if required fields are missing or malformed.

  • 201 - Not found in the database – if the command or tracker does not exist.

General error codes


execute

Executes a command immediately. For hardware commands, the command string is sent to the device. For HTTP commands, an HTTP POST request is dispatched to the configured URL with the current device attribute values substituted into the body.

Required sub-user rights: tracker_update.

Parameters

name
description
type
format

hash

API key or user session hash.

string

"your_api_key"

tracker_id

ID of the tracker that owns the command.

int

70074765

command_id

ID of the command to execute.

int

3

Examples

Response

  • success - boolean. Always true for successful responses.

Errors

  • 7 - Invalid parameters – if required fields are missing or malformed.

  • 201 - Not found in the database – if the command or tracker does not exist.

General error codes


delete

Deletes a command.

Required sub-user rights: tracker_update.

Parameters

name
description
type
format

hash

API key or user session hash.

string

"your_api_key"

tracker_id

ID of the tracker that owns the command.

int

70074765

command_id

ID of the command to delete.

int

5

Examples

Response

  • success - boolean. Always true for successful responses.

Errors

  • 7 - Invalid parameters – if required fields are missing or malformed.

  • 201 - Not found in the database – if the command or tracker does not exist.

General error codes


Batch operations

API path: /tracker/batch_get_commands.

batch_get_commands

Returns all commands for the specified trackers, grouped by tracker ID. If trackers is omitted or empty, returns commands for all trackers accessible to the current user.

Required sub-user rights: tracker_update.

Parameters

name
description
type
format

hash

API key or user session hash.

string

"your_api_key"

trackers

Optional. List of tracker IDs to retrieve commands for. If omitted, all accessible trackers are included.

int array

[70074765, 70074766]

Examples

Response

Returns a result object whose keys are tracker IDs (as strings) and values are arrays of command objects for that tracker. Trackers with no configured commands return an empty array.

  • success - boolean. Always true for successful responses.

  • result - object. Keys are tracker IDs (string). Values are arrays of command objects. See object structure.

Errors

  • 7 - Invalid parameters – if the trackers array contains invalid values.

General error codes

Last updated

Was this helpful?