> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/tracking/tracker/counter.md).

# Counters

Odometer and engine-hour counters on a tracker, and the values they hold.

A counter accumulates a quantity for a tracker over its lifetime, such as distance travelled or engine running time. Unlike a sensor reading, which reports what is true now, a counter carries a running total that can be corrected when it drifts from the vehicle's own instrument.

Counters split into two things, and the operations follow that split. The counter itself is the entity and its multiplier, read and changed with `counter/read` and `counter/update`. Its value is separate, read and set through `counter/value`. For a worked example, see [how to retrieve sensor and counter data](/docs/navixy-api/user-api/guides/data-retrieval/sensor-data.md).

## API actions

Counter entities live under `/tracker/counter`, and their values under `/tracker/counter/value`. One call, `get_counters`, sits at the tracker root instead.

***

## Read a counter

> Get one of a tracker's counters, meaning the entity and its multiplier rather than its current value. Use \`counter/value/get\` for the value. Available to demo accounts.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"Counter":{"type":"object","description":"A tracker counter and how its raw source is scaled.","properties":{"id":{"type":"integer","description":"Counter ID."},"type":{"type":"string","description":"Which counter this is.","enum":["odometer","engine_hours"]},"multiplier":{"type":"number","description":"Factor applied to the raw source value."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/counter/read":{"post":{"tags":["Trackers"],"summary":"Read a counter","description":"Get one of a tracker's counters, meaning the entity and its multiplier rather than its current value. Use `counter/value/get` for the value. Available to demo accounts.","operationId":"trackerCounterRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."},"type":{"type":"string","description":"Which counter to act on.","enum":["odometer","engine_hours"]}},"required":["tracker_id","type"]}}}},"responses":{"200":{"description":"The counter","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"$ref":"#/components/schemas/Counter"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 204: no tracker with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended. Error 219: the tracker is a clone.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 204 - No tracker with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.
* 219 - The tracker is a clone.

***

## Update a counter

> Change a counter's multiplier, and for the odometer the sensor it reads from.\
> \
> \`sensor\_id\` applies \*\*only\*\* when \`type\` is \`odometer\`, and must be null otherwise. The sensor must be a metering sensor belonging to this same tracker; every one of those conditions is reported as error 7.\
> \
> Requires the \`tracker\_update\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/counter/update":{"post":{"tags":["Trackers"],"summary":"Update a counter","description":"Change a counter's multiplier, and for the odometer the sensor it reads from.\n\n`sensor_id` applies **only** when `type` is `odometer`, and must be null otherwise. The sensor must be a metering sensor belonging to this same tracker; every one of those conditions is reported as error 7.\n\nRequires the `tracker_update` right.","operationId":"trackerCounterUpdate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."},"type":{"type":"string","description":"Which counter to act on.","enum":["odometer","engine_hours"]},"multiplier":{"type":"number","description":"New multiplier for the counter."},"sensor_id":{"type":["integer","null"],"description":"Sensor to use as the odometer source. Must be null unless `type` is `odometer`."}},"required":["tracker_id","type","multiplier"]}}}},"responses":{"200":{"description":"The counter was updated","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 8: the queue service could not accept the change, retry later. Error 204: no tracker with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended. Error 219: the tracker is a clone.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 7 - `sensor_id` was given for a counter whose `type` is not `odometer`, or the sensor is not a metering sensor, or it belongs to another tracker.
* 8 - The queue service could not accept the change, retry later.
* 204 - No tracker with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.
* 219 - The tracker is a clone.

***

## Read all counter values

> Get the last value of every counter on a tracker. Available to demo accounts.\
> \
> Note the path: this one sits at the tracker root, not under \`tracker/counter\`.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"CounterValue":{"type":"object","description":"The last known value of one counter.","properties":{"type":{"type":"string","description":"Which counter this is.","enum":["odometer","engine_hours"]},"value":{"type":"number","description":"The counter value."},"update_time":{"type":"string","description":"When the value was last updated."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/get_counters":{"post":{"tags":["Trackers"],"summary":"Read all counter values","description":"Get the last value of every counter on a tracker. Available to demo accounts.\n\nNote the path: this one sits at the tracker root, not under `tracker/counter`.","operationId":"trackerGetCounters","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."}},"required":["tracker_id"]}}}},"responses":{"200":{"description":"The counter values","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"user_time":{"type":"string","description":"Current time in the account timezone."},"list":{"type":"array","items":{"$ref":"#/components/schemas/CounterValue"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 204: no tracker with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 204 - No tracker with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.

***

## Read one counter value

> Get the current value of one counter. Available to demo accounts.\
> \
> Error 204 covers three different situations: no such tracker, no such counter, and a counter that exists but has no values yet. Use \`counter/value/set\` to create a counter and give it a first value.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/counter/value/get":{"post":{"tags":["Trackers"],"summary":"Read one counter value","description":"Get the current value of one counter. Available to demo accounts.\n\nError 204 covers three different situations: no such tracker, no such counter, and a counter that exists but has no values yet. Use `counter/value/set` to create a counter and give it a first value.","operationId":"trackerCounterValueGet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."},"type":{"type":"string","description":"Which counter to act on.","enum":["odometer","engine_hours"]}},"required":["tracker_id","type"]}}}},"responses":{"200":{"description":"The counter value","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"type":"number","description":"The current value."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 204: no tracker with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 204 - No tracker with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.

***

## Read one counter across several trackers

> Get the current value of the same counter on many trackers. Available to demo accounts.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/counter/value/list":{"post":{"tags":["Trackers"],"summary":"Read one counter across several trackers","description":"Get the current value of the same counter on many trackers. Available to demo accounts.","operationId":"trackerCounterValueList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trackers":{"type":"array","description":"Tracker IDs.","items":{"type":"integer"}},"type":{"type":"string","description":"Which counter to act on.","enum":["odometer","engine_hours"]}},"required":["trackers","type"]}}}},"responses":{"200":{"description":"The counter values","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"type":"object","description":"Values keyed by tracker ID.","additionalProperties":{"type":"number","description":"The counter value for that tracker."}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 204: one of the counters does not exist or has no values yet. Error 217: the list names trackers that do not exist or are blocked.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 204 - One of the counters does not exist or has no values yet.
* 217 - The list names trackers that do not exist or are blocked.

***

## Set a counter value

> Set a counter's value, creating the counter if it does not exist yet. This is the call that seeds a counter so \`value/get\` stops answering error 204.\
> \
> Requires the \`tracker\_update\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/counter/value/set":{"post":{"tags":["Trackers"],"summary":"Set a counter value","description":"Set a counter's value, creating the counter if it does not exist yet. This is the call that seeds a counter so `value/get` stops answering error 204.\n\nRequires the `tracker_update` right.","operationId":"trackerCounterValueSet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."},"type":{"type":"string","description":"Which counter to act on.","enum":["odometer","engine_hours"]},"value":{"type":"number","description":"New value for the counter."}},"required":["tracker_id","type","value"]}}}},"responses":{"200":{"description":"The value was set","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 8: the queue service could not accept the change, retry later. Error 204: no tracker with this ID belongs to the account. Error 208: the tracker exists but is blocked, normally because its tariff ended. Error 219: the tracker is a clone.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 8 - The queue service could not accept the change, retry later.
* 204 - No tracker with this ID belongs to the account.
* 208 - The tracker exists but is blocked, normally because its tariff ended.
* 219 - The tracker is a clone.

***

## Read counter history

> Get a counter's recorded values over a period. Available to demo accounts.\
> \
> \*\*The period cannot exceed 31 days\*\*, and \`from\` must precede \`to\`; both are reported as error 7 rather than as the more general error 211.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Trackers","description":"Trackers, the devices the platform tracks, together with the geo links that share their live location with people outside the account. Resources under the /tracker/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/tracker/counter/data/read":{"post":{"tags":["Trackers"],"summary":"Read counter history","description":"Get a counter's recorded values over a period. Available to demo accounts.\n\n**The period cannot exceed 31 days**, and `from` must precede `to`; both are reported as error 7 rather than as the more general error 211.","operationId":"trackerCounterDataRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracker_id":{"type":"integer","description":"ID of the tracker, also known as the object ID. Must belong to the current account and not be blocked."},"type":{"type":"string","description":"Which counter to act on.","enum":["odometer","engine_hours"]},"from":{"type":"string","description":"Start of the period."},"to":{"type":"string","description":"End of the period. At most 31 days after `from`."}},"required":["tracker_id","type","from","to"]}}}},"responses":{"200":{"description":"The counter history","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","description":"Recorded values, oldest first.","items":{"type":"object","properties":{"value":{"type":"number","description":"The counter value at that moment."},"update_time":{"type":"string","description":"When the value was recorded."}}}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 204: no such tracker or counter. Error 208: the tracker exists but is blocked, normally because its tariff ended. Error 211: the period is longer than the platform allows.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 7 - `from` is after `to`, or the period exceeds 31 days. Reported as error 7 rather than the more general error 211.
* 204 - No such tracker or counter.
* 208 - The tracker exists but is blocked, normally because its tariff ended.
* 211 - The period is longer than the Navixy platform allows.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/tracking/tracker/counter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
