# Unconfirmed commands

## API actions

API path: `/tracker/command/unconfirmed`.

### count

Gets number of commands in queue for the specified tracker.

#### Parameters

| name        | description                                                                                      | type | format |
| ----------- | ------------------------------------------------------------------------------------------------ | ---- | ------ |
| tracker\_id | ID of the tracker (aka "object\_id"). Tracker must belong to authorized user and not be blocked. | int  | 123456 |

#### Examples

{% tabs %}
{% tab title="cURL" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/tracker/command/unconfirmed/count' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "tracker_id": 123456}'
```

{% endtab %}

{% tab title="HTTP GET" %}
{% code overflow="wrap" %}

```http
https://api.eu.navixy.com/v2/tracker/command/unconfirmed/count?hash=a6aa75587e5c59c32d347da438505fc3&tracker_id=123456
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Response

```json
{
  "success": true,
  "count": 0
}
```

* `count` - int. Number of unconfirmed commands in a queue.

#### Errors

* 204 – Entity not found - if there is no tracker with such ID belonging to authorized user.
* 208 – Device blocked - if tracker exists but was blocked due to tariff restrictions or some other reason.

### reset

Removes all pending SMS commands from the queue for the specified tracker.

**required sub-user rights:** `tracker_update`.

#### Parameters

| name        | description                                                                                      | type | format |
| ----------- | ------------------------------------------------------------------------------------------------ | ---- | ------ |
| tracker\_id | ID of the tracker (aka "object\_id"). Tracker must belong to authorized user and not be blocked. | int  | 123456 |

#### Examples

{% tabs %}
{% tab title="cURL" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/tracker/command/unconfirmed/reset' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "tracker_id": 123456}'
```

{% endtab %}

{% tab title="HTTP GET" %}
{% code overflow="wrap" %}

```http
https://api.eu.navixy.com/v2/tracker/command/unconfirmed/reset?hash=a6aa75587e5c59c32d347da438505fc3&tracker_id=123456
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Response

```json
{
  "success": true
}
```

#### Errors

* 204 – Entity not found - if there is no tracker with such ID belonging to authorized user.
* 208 – Device blocked - if tracker exists but was blocked due to tariff restrictions or some other reason.
