> 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/panel-api/resources/tariff.md).

# Plans

This resource is `tariff` in API paths and is called a plan in the Admin Panel interface. It manages the service plans a dealer offers to its users, and returns each one as a `Plan` object.

## Plan object

## The Plan object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"components":{"schemas":{"Plan":{"type":"object","description":"A service plan offered to a dealer's users. Called a plan in the interface and a tariff in the API paths.","readOnly":true,"properties":{"id":{"type":"integer","description":"Plan ID."},"name":{"type":"string","description":"Plan name."},"group_id":{"type":"integer","description":"Plan group number."},"active":{"type":"boolean","description":"`true` if a user is allowed to switch their current plan to this one."},"type":{"type":"string","description":"Billing type. `activeday` applies to the `tracker` device type only.","enum":["monthly","activeday"]},"price":{"type":"number","description":"Subscription price, usually per month."},"early_change_price":{"type":["number","null"],"description":"Price of switching from this plan to another less than 30 days after the last change, governed by the `tariff.freeze.period` config option. When absent or `null`, users cannot change plan frequently."},"device_limit":{"type":"integer","description":"Maximum devices per user. Not used for cameras or sockets."},"has_reports":{"type":"boolean","description":"`true` if the plan includes reports."},"store_period":{"type":"string","description":"Data storage period, as a short duration: `2h`, `3d`, `5m`, `1y`. Note this differs from the ISO 8601 form used by `store_period` on the dealer object."},"proportional_charge":{"type":"boolean","description":"When `true`, the monthly fee is reduced if the device was blocked during the month. Applies to `monthly` plans only."},"auto_prolong":{"type":"boolean","description":"When `true`, the plan renews automatically."},"features":{"type":"array","description":"Platform features the plan grants.","items":{"type":"string"}},"map_filter":{"$ref":"#/components/schemas/MapFilter"},"service_prices":{"$ref":"#/components/schemas/ServicePrices"},"device_type":{"type":"string","description":"Device type the plan applies to.","enum":["tracker","camera","socket"]}}},"MapFilter":{"type":"object","description":"Restricts which maps the plan may use.","properties":{"exclusion":{"type":"boolean","description":"When `true`, `values` lists the maps to exclude. When `false`, it lists the only maps allowed."},"values":{"type":"array","description":"Map codes the filter applies to.","items":{"type":"string"}}}},"ServicePrices":{"type":"object","description":"Per-unit prices for chargeable services.","properties":{"incoming_sms":{"type":"number","description":"Price per incoming SMS."},"outgoing_sms":{"type":"number","description":"Price per outgoing SMS."},"service_sms":{"type":"number","description":"Price per service SMS."},"traffic":{"type":"number","description":"Price per 1 MB of traffic."}}}}}}
```

Notes on individual fields:

* `type`, `device_type`, and the map codes inside `map_filter` use platform-wide enums described in the [data types](/docs/navixy-api/user-api/backend-api.md#data-types) section.
* `store_period` uses a short duration form here, such as `1y`, which is **not** the ISO 8601 form used by `store_period` on the [dealer object](/docs/navixy-api/panel-api/resources/dealer.md).
* `early_change_price` is omitted from the response when it has no value, in which case users cannot change plan frequently.

## API actions

API path: `panel/tariff`.

***

*required permissions*: `"tariffs": "create"`.

Plan creation counts against the dealer's plan quota.

## Create plan

> Create a plan for the current dealer.\
> \
> The plan definition is passed as a \`tariff\` object with no \`id\`, since the platform assigns one. Plan creation counts against the dealer's plan quota.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"Tariff","description":"Service plans a dealer offers to its users, and the per-device-type defaults applied on device registration. Called plans in the interface and tariffs in the API paths. All resources under the /panel/tariff/ 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":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"PlanDraft":{"type":"object","description":"A plan definition for creation. Carries no `id`, which the platform assigns.","properties":{"name":{"type":"string","description":"Plan name."},"group_id":{"type":"integer","description":"Plan group number."},"active":{"type":"boolean","description":"`true` if a user is allowed to switch their current plan to this one."},"type":{"type":"string","description":"Billing type. `activeday` applies to the `tracker` device type only.","enum":["monthly","activeday"]},"price":{"type":"number","description":"Subscription price, usually per month."},"early_change_price":{"type":["number","null"],"description":"Price of switching from this plan to another less than 30 days after the last change, governed by the `tariff.freeze.period` config option. When absent or `null`, users cannot change plan frequently."},"device_limit":{"type":"integer","description":"Maximum devices per user. Not used for cameras or sockets."},"has_reports":{"type":"boolean","description":"`true` if the plan includes reports."},"store_period":{"type":"string","description":"Data storage period, as a short duration: `2h`, `3d`, `5m`, `1y`. Note this differs from the ISO 8601 form used by `store_period` on the dealer object."},"proportional_charge":{"type":"boolean","description":"When `true`, the monthly fee is reduced if the device was blocked during the month. Applies to `monthly` plans only."},"auto_prolong":{"type":"boolean","description":"When `true`, the plan renews automatically."},"features":{"type":"array","description":"Platform features the plan grants.","items":{"type":"string"}},"map_filter":{"$ref":"#/components/schemas/MapFilter"},"service_prices":{"$ref":"#/components/schemas/ServicePrices"},"device_type":{"type":"string","description":"Device type the plan applies to.","enum":["tracker","camera","socket"]}}},"MapFilter":{"type":"object","description":"Restricts which maps the plan may use.","properties":{"exclusion":{"type":"boolean","description":"When `true`, `values` lists the maps to exclude. When `false`, it lists the only maps allowed."},"values":{"type":"array","description":"Map codes the filter applies to.","items":{"type":"string"}}}},"ServicePrices":{"type":"object","description":"Per-unit prices for chargeable services.","properties":{"incoming_sms":{"type":"number","description":"Price per incoming SMS."},"outgoing_sms":{"type":"number","description":"Price per outgoing SMS."},"service_sms":{"type":"number","description":"Price per service SMS."},"traffic":{"type":"number","description":"Price per 1 MB of traffic."}}}},"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 a 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.","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":{"/panel/tariff/create":{"post":{"tags":["Tariff"],"summary":"Create plan","operationId":"tariffCreate","description":"Create a plan for the current dealer.\n\nThe plan definition is passed as a `tariff` object with no `id`, since the platform assigns one. Plan creation counts against the dealer's plan quota.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tariff"],"properties":{"tariff":{"$ref":"#/components/schemas/PlanDraft"}}}}}},"responses":{"200":{"description":"Plan created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"id":{"type":"integer","description":"ID of the created plan.","readOnly":true}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

*required permissions*: `"tariffs": "read"`.

## List plans

> List the plans belonging to the current dealer, with optional filtering by device type, text filtering, ordering and pagination.\
> \
> The response also carries \`wholesale\_service\_prices\`, the prices the dealer itself is charged, which is not part of any individual plan.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"Tariff","description":"Service plans a dealer offers to its users, and the per-device-type defaults applied on device registration. Called plans in the interface and tariffs in the API paths. All resources under the /panel/tariff/ 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":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"Plan":{"type":"object","description":"A service plan offered to a dealer's users. Called a plan in the interface and a tariff in the API paths.","readOnly":true,"properties":{"id":{"type":"integer","description":"Plan ID."},"name":{"type":"string","description":"Plan name."},"group_id":{"type":"integer","description":"Plan group number."},"active":{"type":"boolean","description":"`true` if a user is allowed to switch their current plan to this one."},"type":{"type":"string","description":"Billing type. `activeday` applies to the `tracker` device type only.","enum":["monthly","activeday"]},"price":{"type":"number","description":"Subscription price, usually per month."},"early_change_price":{"type":["number","null"],"description":"Price of switching from this plan to another less than 30 days after the last change, governed by the `tariff.freeze.period` config option. When absent or `null`, users cannot change plan frequently."},"device_limit":{"type":"integer","description":"Maximum devices per user. Not used for cameras or sockets."},"has_reports":{"type":"boolean","description":"`true` if the plan includes reports."},"store_period":{"type":"string","description":"Data storage period, as a short duration: `2h`, `3d`, `5m`, `1y`. Note this differs from the ISO 8601 form used by `store_period` on the dealer object."},"proportional_charge":{"type":"boolean","description":"When `true`, the monthly fee is reduced if the device was blocked during the month. Applies to `monthly` plans only."},"auto_prolong":{"type":"boolean","description":"When `true`, the plan renews automatically."},"features":{"type":"array","description":"Platform features the plan grants.","items":{"type":"string"}},"map_filter":{"$ref":"#/components/schemas/MapFilter"},"service_prices":{"$ref":"#/components/schemas/ServicePrices"},"device_type":{"type":"string","description":"Device type the plan applies to.","enum":["tracker","camera","socket"]}}},"MapFilter":{"type":"object","description":"Restricts which maps the plan may use.","properties":{"exclusion":{"type":"boolean","description":"When `true`, `values` lists the maps to exclude. When `false`, it lists the only maps allowed."},"values":{"type":"array","description":"Map codes the filter applies to.","items":{"type":"string"}}}},"ServicePrices":{"type":"object","description":"Per-unit prices for chargeable services.","properties":{"incoming_sms":{"type":"number","description":"Price per incoming SMS."},"outgoing_sms":{"type":"number","description":"Price per outgoing SMS."},"service_sms":{"type":"number","description":"Price per service SMS."},"traffic":{"type":"number","description":"Price per 1 MB of traffic."}}}},"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 a 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.","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":{"/panel/tariff/list":{"post":{"tags":["Tariff"],"summary":"List plans","operationId":"tariffList","description":"List the plans belonging to the current dealer, with optional filtering by device type, text filtering, ordering and pagination.\n\nThe response also carries `wholesale_service_prices`, the prices the dealer itself is charged, which is not part of any individual plan.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"device_type":{"type":"string","description":"Optional. Filter by device type.","enum":["tracker","camera","socket"]},"filter":{"type":"string","description":"Optional. Text filter."},"order_by":{"type":"string","description":"Optional. Field to order by.","enum":["id","name","device_type","group_id","price"],"default":"id"},"ascending":{"type":"boolean","description":"Optional. Ascending when `true`.","default":true},"offset":{"type":"integer","description":"Optional. Starting offset, for pagination.","minimum":0,"default":0},"limit":{"type":"integer","description":"Optional. Maximum records to return.","minimum":0}}}}}},"responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","readOnly":true,"description":"The matching plans.","items":{"$ref":"#/components/schemas/Plan"}},"wholesale_service_prices":{"allOf":[{"$ref":"#/components/schemas/ServicePrices"}],"readOnly":true,"description":"Per-unit service prices charged to the dealer, as opposed to the prices in each plan."},"count":{"type":"integer","readOnly":true,"description":"Total number of matching records, ignoring `offset` and `limit`."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

`wholesale_service_prices` reports the prices the dealer itself is charged, and is not part of any individual plan.

***

*required permissions*: `"tariffs": "read"`.

## Read plan

> Read a single plan belonging to the current dealer.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"Tariff","description":"Service plans a dealer offers to its users, and the per-device-type defaults applied on device registration. Called plans in the interface and tariffs in the API paths. All resources under the /panel/tariff/ 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":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"Plan":{"type":"object","description":"A service plan offered to a dealer's users. Called a plan in the interface and a tariff in the API paths.","readOnly":true,"properties":{"id":{"type":"integer","description":"Plan ID."},"name":{"type":"string","description":"Plan name."},"group_id":{"type":"integer","description":"Plan group number."},"active":{"type":"boolean","description":"`true` if a user is allowed to switch their current plan to this one."},"type":{"type":"string","description":"Billing type. `activeday` applies to the `tracker` device type only.","enum":["monthly","activeday"]},"price":{"type":"number","description":"Subscription price, usually per month."},"early_change_price":{"type":["number","null"],"description":"Price of switching from this plan to another less than 30 days after the last change, governed by the `tariff.freeze.period` config option. When absent or `null`, users cannot change plan frequently."},"device_limit":{"type":"integer","description":"Maximum devices per user. Not used for cameras or sockets."},"has_reports":{"type":"boolean","description":"`true` if the plan includes reports."},"store_period":{"type":"string","description":"Data storage period, as a short duration: `2h`, `3d`, `5m`, `1y`. Note this differs from the ISO 8601 form used by `store_period` on the dealer object."},"proportional_charge":{"type":"boolean","description":"When `true`, the monthly fee is reduced if the device was blocked during the month. Applies to `monthly` plans only."},"auto_prolong":{"type":"boolean","description":"When `true`, the plan renews automatically."},"features":{"type":"array","description":"Platform features the plan grants.","items":{"type":"string"}},"map_filter":{"$ref":"#/components/schemas/MapFilter"},"service_prices":{"$ref":"#/components/schemas/ServicePrices"},"device_type":{"type":"string","description":"Device type the plan applies to.","enum":["tracker","camera","socket"]}}},"MapFilter":{"type":"object","description":"Restricts which maps the plan may use.","properties":{"exclusion":{"type":"boolean","description":"When `true`, `values` lists the maps to exclude. When `false`, it lists the only maps allowed."},"values":{"type":"array","description":"Map codes the filter applies to.","items":{"type":"string"}}}},"ServicePrices":{"type":"object","description":"Per-unit prices for chargeable services.","properties":{"incoming_sms":{"type":"number","description":"Price per incoming SMS."},"outgoing_sms":{"type":"number","description":"Price per outgoing SMS."},"service_sms":{"type":"number","description":"Price per service SMS."},"traffic":{"type":"number","description":"Price per 1 MB of traffic."}}}},"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 a 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.","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":{"/panel/tariff/read":{"post":{"tags":["Tariff"],"summary":"Read plan","operationId":"tariffRead","description":"Read a single plan belonging to the current dealer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tariff_id"],"properties":{"tariff_id":{"type":"integer","description":"Plan ID.","minimum":1}}}}}},"responses":{"200":{"description":"The plan","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"$ref":"#/components/schemas/Plan"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

* 201 - Not found in the database - if the plan does not exist or belongs to another dealer.

***

*required permissions*: `tariffs: "update"`.

A plan's `device_type` cannot be changed after creation, so the update object omits it.

## Update plan

> Update an existing plan.\
> \
> The plan definition is passed as a \`tariff\` object that includes \`id\` but omits \`device\_type\`: a plan's device type cannot be changed after creation.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"Tariff","description":"Service plans a dealer offers to its users, and the per-device-type defaults applied on device registration. Called plans in the interface and tariffs in the API paths. All resources under the /panel/tariff/ 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":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"PlanEdit":{"type":"object","description":"A plan definition for update. Requires `id` and omits `device_type`, which cannot change after creation.","required":["id"],"properties":{"id":{"type":"integer","description":"ID of the plan to update."},"name":{"type":"string","description":"Plan name."},"group_id":{"type":"integer","description":"Plan group number."},"active":{"type":"boolean","description":"`true` if a user is allowed to switch their current plan to this one."},"type":{"type":"string","description":"Billing type. `activeday` applies to the `tracker` device type only.","enum":["monthly","activeday"]},"price":{"type":"number","description":"Subscription price, usually per month."},"early_change_price":{"type":["number","null"],"description":"Price of switching from this plan to another less than 30 days after the last change, governed by the `tariff.freeze.period` config option. When absent or `null`, users cannot change plan frequently."},"device_limit":{"type":"integer","description":"Maximum devices per user. Not used for cameras or sockets."},"has_reports":{"type":"boolean","description":"`true` if the plan includes reports."},"store_period":{"type":"string","description":"Data storage period, as a short duration: `2h`, `3d`, `5m`, `1y`. Note this differs from the ISO 8601 form used by `store_period` on the dealer object."},"proportional_charge":{"type":"boolean","description":"When `true`, the monthly fee is reduced if the device was blocked during the month. Applies to `monthly` plans only."},"auto_prolong":{"type":"boolean","description":"When `true`, the plan renews automatically."},"features":{"type":"array","description":"Platform features the plan grants.","items":{"type":"string"}},"map_filter":{"$ref":"#/components/schemas/MapFilter"},"service_prices":{"$ref":"#/components/schemas/ServicePrices"}}},"MapFilter":{"type":"object","description":"Restricts which maps the plan may use.","properties":{"exclusion":{"type":"boolean","description":"When `true`, `values` lists the maps to exclude. When `false`, it lists the only maps allowed."},"values":{"type":"array","description":"Map codes the filter applies to.","items":{"type":"string"}}}},"ServicePrices":{"type":"object","description":"Per-unit prices for chargeable services.","properties":{"incoming_sms":{"type":"number","description":"Price per incoming SMS."},"outgoing_sms":{"type":"number","description":"Price per outgoing SMS."},"service_sms":{"type":"number","description":"Price per service SMS."},"traffic":{"type":"number","description":"Price per 1 MB of traffic."}}}},"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 a 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.","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":{"/panel/tariff/update":{"post":{"tags":["Tariff"],"summary":"Update plan","operationId":"tariffUpdate","description":"Update an existing plan.\n\nThe plan definition is passed as a `tariff` object that includes `id` but omits `device_type`: a plan's device type cannot be changed after creation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tariff"],"properties":{"tariff":{"$ref":"#/components/schemas/PlanEdit"}}}}}},"responses":{"200":{"$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.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

## defaults object

Defaults are applied when a device is registered: which plan it lands on, and what bonus and free period it receives. They are keyed by device type.

## The TariffDefaults object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"components":{"schemas":{"TariffDefaults":{"type":"object","description":"Defaults applied when a device of a given type is registered.","properties":{"tariff_id":{"type":"integer","description":"ID of the default plan for this device type."},"activation_bonus":{"type":"number","description":"Money added to the bonus balance on device registration."},"free_days":{"type":"integer","description":"Number of fee-free days after device registration."},"free_days_device_limit":{"type":["integer","null"],"description":"Maximum number of a user's activated devices that get the free period. `null` means no limit."}}}}}}
```

***

*required permissions*: `tariffs: "read"`.

The defaults sit at the top level of the response under their device-type key, not nested under `value`.

## Read plan defaults

> Read the plan defaults applied when a device is registered: which plan it lands on, and what bonus and free period it receives.\
> \
> Defaults are keyed by device type. Only \`tracker\` was observed in responses. Takes no parameters beyond the session credential.\
> \
> Note that the defaults sit at the top level of the response, not nested under a \`value\` key.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"Tariff","description":"Service plans a dealer offers to its users, and the per-device-type defaults applied on device registration. Called plans in the interface and tariffs in the API paths. All resources under the /panel/tariff/ 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":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"TariffDefaults":{"type":"object","description":"Defaults applied when a device of a given type is registered.","properties":{"tariff_id":{"type":"integer","description":"ID of the default plan for this device type."},"activation_bonus":{"type":"number","description":"Money added to the bonus balance on device registration."},"free_days":{"type":"integer","description":"Number of fee-free days after device registration."},"free_days_device_limit":{"type":["integer","null"],"description":"Maximum number of a user's activated devices that get the free period. `null` means no limit."}}}},"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 a 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.","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":{"/panel/tariff/defaults/read":{"post":{"tags":["Tariff"],"summary":"Read plan defaults","operationId":"tariffDefaultsRead","description":"Read the plan defaults applied when a device is registered: which plan it lands on, and what bonus and free period it receives.\n\nDefaults are keyed by device type. Only `tracker` was observed in responses. Takes no parameters beyond the session credential.\n\nNote that the defaults sit at the top level of the response, not nested under a `value` key.","responses":{"200":{"description":"Plan defaults, keyed by device type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"tracker":{"$ref":"#/components/schemas/TariffDefaults"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

*required permissions*: `tariffs: "update"`.

## Update plan defaults

> Update the plan defaults for a device type.\
> \
> The defaults object sits at the top level of the request under its device-type key, not nested under a wrapper.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"Tariff","description":"Service plans a dealer offers to its users, and the per-device-type defaults applied on device registration. Called plans in the interface and tariffs in the API paths. All resources under the /panel/tariff/ 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":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"TariffDefaults":{"type":"object","description":"Defaults applied when a device of a given type is registered.","properties":{"tariff_id":{"type":"integer","description":"ID of the default plan for this device type."},"activation_bonus":{"type":"number","description":"Money added to the bonus balance on device registration."},"free_days":{"type":"integer","description":"Number of fee-free days after device registration."},"free_days_device_limit":{"type":["integer","null"],"description":"Maximum number of a user's activated devices that get the free period. `null` means no limit."}}}},"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 a 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.","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":{"/panel/tariff/defaults/update":{"post":{"tags":["Tariff"],"summary":"Update plan defaults","operationId":"tariffDefaultsUpdate","description":"Update the plan defaults for a device type.\n\nThe defaults object sits at the top level of the request under its device-type key, not nested under a wrapper.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tracker"],"properties":{"tracker":{"$ref":"#/components/schemas/TariffDefaults"}}}}}},"responses":{"200":{"$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.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```


---

# 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/panel-api/resources/tariff.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.
