> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vargopartners.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Устройства клиента

> Подключённые устройства и лимит. Без подписки список пуст. Если платформа не ответила — `503 SERVICE_UNAVAILABLE`, а не пустой список: пустой ответ всегда значит «устройств нет».



## OpenAPI

````yaml GET /api/partner/v1/clients/{client_id}/devices
openapi: 3.1.0
info:
  title: VARGO Partner API
  version: '1.0'
  description: >-
    REST API для продажи VPN в своём боте, мини-аппе или на сайте: тарифы,
    счета, клиенты и их устройства. Клиент платит платформе, наценка партнёра
    начисляется на его баланс.


    Ключ партнёра — в заголовке `Authorization: Bearer vgo_live_…`, его выдаёт
    платформа. Ключ живёт только на сервере партнёра: в коде мини-аппа или сайта
    его быть не должно. Деньги — строки в рублях (`"150.00"`), даты — ISO-8601
    UTC. Ошибки — `{error: {code, message, fields}}`: ветвиться по `code`,
    `message` клиенту не показывать.
servers:
  - url: https://api.vargopartners.com
security:
  - PartnerKey: []
paths:
  /api/partner/v1/clients/{client_id}/devices:
    get:
      tags:
        - Partner API
      summary: Устройства клиента
      description: >-
        Подключённые устройства и лимит. Без подписки список пуст. Если
        платформа не ответила — `503 SERVICE_UNAVAILABLE`, а не пустой список:
        пустой ответ всегда значит «устройств нет».
      operationId: list_devices_api_partner_v1_clients__client_id__devices_get
      parameters:
        - name: client_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9._:@+-]*[A-Za-z0-9_:@+-][A-Za-z0-9._:@+-]*$
            description: Id клиента в вашей системе
            title: Client Id
          description: Id клиента в вашей системе
      responses:
        '200':
          description: Устройства и лимит
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDevices'
        '401':
          description: >-
            Ключ не принят: `UNAUTHORIZED`. Неверный и отозванный ключ,
            выключенный доступ к API — один ответ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: >-
            Запрос не прошёл проверку: `code` — `VALIDATION_ERROR`, в `fields` —
            поле и причина
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Превышен лимит: `RATE_LIMITED` — повторить после паузы из
            `Retry-After`. У суточных лимитов (`NEW_CLIENTS_DAILY_LIMIT`,
            `TRIAL_DAILY_LIMIT`) заголовка нет — повторять на следующие сутки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            Retry-After:
              description: >-
                Пауза в секундах до повтора; есть у `RATE_LIMITED` и
                `LINK_ROTATE_TOO_SOON`
              schema:
                type: integer
                minimum: 1
        default:
          description: >-
            Ошибка — тот же конверт; ветвиться по `code`, список кодов — в
            документации
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ApiDevices:
      properties:
        devices:
          items:
            $ref: '#/components/schemas/ApiDevice'
          type: array
          title: Devices
          description: Подключённые устройства
        devices_count:
          type: integer
          title: Devices Count
          description: Сколько устройств подключено
        devices_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Devices Limit
          description: Сколько устройств можно подключить; `null` — без ограничения
      type: object
      required:
        - devices
        - devices_count
        - devices_limit
      title: ApiDevices
    ApiError:
      description: 'Конверт любой ошибки: статус HTTP плюс `error.code`.'
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
          description: Код, текст и поля ошибки
      required:
        - error
      title: ApiError
      type: object
    ApiDevice:
      properties:
        device_id:
          type: string
          title: Device Id
          description: HWID устройства; в пути запроса — URL-кодированный
        platform:
          type: string
          title: Platform
          description: Платформа устройства
          examples:
            - iOS
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Модель устройства, если приложение её сообщило
        os_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Version
          description: Версия ОС, если приложение её сообщило
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Когда устройство подключилось впервые, UTC
      type: object
      required:
        - device_id
        - platform
        - model
        - os_version
        - created_at
      title: ApiDevice
    ApiErrorBody:
      properties:
        code:
          description: Машиночитаемый код ошибки — ветвиться по нему
          examples:
            - VALIDATION_ERROR
          title: Code
          type: string
        message:
          description: >-
            Текст для логов на языке из `Accept-Language` (`ru` или `en`);
            клиенту не показывать
          title: Message
          type: string
        fields:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          description: Поле → причина у `VALIDATION_ERROR`; у остальных ошибок `null`
          title: Fields
      required:
        - code
        - message
        - fields
      title: ApiErrorBody
      type: object
  securitySchemes:
    PartnerKey:
      type: http
      scheme: bearer
      description: >-
        Ключ партнёра `vgo_live_…`, его выдаёт платформа. Хранится только на
        сервере партнёра.

````