# Account

## API actions

API path: `panel/account`.

### auth

Does not require session hash and does not need any permissions. Auths dealer in a panel (planned also for dealer's "sub-users") and gets hash.

#### Parameters

| name     | description               | type   |
| -------- | ------------------------- | ------ |
| login    | A panel's login (number). | string |
| password | A panel's password.       | string |

#### Example

cURL

```sh
curl -X POST 'https://api.eu.navixy.com/v2/panel/account/auth' \
    -H 'Content-Type: application/json' \
    -d '{"login": "20410", "password": "12f@14Y$"}'
```

#### Response

```json
{
 "hash": "fa7bf873fab9333144e171372a321b06",
 "success": true,
 "permissions": {
  "base": [
   "get_dealer_info"
  ],
  "service_settings": [
   "read",
   "update"
  ],
  "notification_settings": [
   "read",
   "update"
  ],
  "trackers": [
   "corrupt",
   "create",
   "delete",
   "global",
   "read",
   "report",
   "update"
  ],
  "users": [
   "corrupt",
   "create",
   "read",
   "update"
  ],
  "user_sessions": [
   "create"
  ],
  "tariffs": [
   "create",
   "read",
   "update"
  ],
  "transactions": [
   "create",
   "read"
  ],
  "activation_code": [
   "read",
   "update"
  ],
  "password": [
   "update"
  ],
  "email_gateways": [
   "create",
   "delete",
   "read",
   "send_email",
   "update"
  ],
  "subpaas": [
   "create",
   "delete",
   "read",
   "update"
  ]
 }
}
```

* `hash` - string. A session key.
* `permissions` - object representing permissions for the panel. See panel account [permissions](/docs/navixy-api/panel-api/getting-started.md#admin-panel-api-permissions).

#### Errors

* 11 - Access denied - if dealer blocked.
* 12 - Dealer not found.

### get\_permissions

Returns permissions for current panel session.

#### Parameters

Only session `hash`.

#### Examples

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

```sh
curl -X POST 'https://api.eu.navixy.com/v2/panel/account/get_permissions' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "fa7bf873fab9333144e171372a321b06"}'
```

{% endtab %}

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

```http
https://api.eu.navixy.com/v2/panel/account/get_permissions?hash=fa7bf873fab9333144e171372a321b06
```

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

#### Response

```json
{
 "success": true,
 "permissions": {
  "base": [
   "get_dealer_info"
  ],
  "service_settings": [
   "read",
   "update"
  ],
  "notification_settings": [
   "read",
   "update"
  ],
  "trackers": [
   "corrupt",
   "create",
   "delete",
   "global",
   "read",
   "report",
   "update"
  ],
  "users": [
   "corrupt",
   "create",
   "read",
   "update"
  ],
  "user_sessions": [
   "create"
  ],
  "tariffs": [
   "create",
   "read",
   "update"
  ],
  "transactions": [
   "create",
   "read"
  ],
  "activation_code": [
   "read",
   "update"
  ],
  "password": [
   "update"
  ],
  "email_gateways": [
   "create",
   "delete",
   "read",
   "send_email",
   "update"
  ],
  "subpaas": [
   "create",
   "delete",
   "read",
   "update"
  ]
 }
}
```

#### Errors

[General](https://github.com/SquareGPS/navixy-api/blob/master/docs/user-api/backend-api/getting-started/errors.md#error-codes) types only.

### logout

Ends the current session.

#### Parameters

Only session `hash`.

#### Examples

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

```sh
curl -X POST 'https://api.eu.navixy.com/v2/panel/account/logout' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "fa7bf873fab9333144e171372a321b06"}'
```

{% endtab %}

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

```http
https://api.eu.navixy.com/v2/panel/account/logout?hash=fa7bf873fab9333144e171372a321b06
```

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

#### Response

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

#### Errors

[General](https://github.com/SquareGPS/navixy-api/blob/master/docs/user-api/backend-api/getting-started/errors.md#error-codes) types only.


---

# Agent Instructions: 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:

```
GET https://navixy.com/docs/navixy-api/panel-api/resources/account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
