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

# Получить данные аккаунта

> Возвращает данные аккаунта, информацию о компании и доступный баланс.

**Требуемое разрешение:** `ACCOUNT:READ` или `FULL_ACCESS`



## OpenAPI

````yaml openapi.ru.json GET /account
openapi: 3.0.0
info:
  title: pague.dev API
  description: Документация платёжного API pague.dev
  version: '1.0'
  contact: {}
servers:
  - url: https://api-gateway.pague.dev/v2
security: []
paths:
  /account:
    get:
      tags:
        - External API - Account (Conta)
      summary: Получить данные аккаунта и баланс
      description: |-
        Возвращает данные аккаунта, информацию о компании и доступный баланс.

        **Требуемое разрешение:** `ACCOUNT:READ` или `FULL_ACCESS`
      operationId: ExternalAccountController_getAccountInfo
      parameters:
        - $ref: '#/components/parameters/SubAccount'
      responses:
        '200':
          description: Данные аккаунта и баланс
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccountInfoOutput'
        '401':
          description: Unauthorized — требуется аутентификация
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden — доступ запрещён
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '404':
          description: Not Found — аккаунт не найден
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '500':
          description: Internal Server Error — внутренняя ошибка сервера
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    SubAccount:
      name: X-Sub-Account
      in: header
      required: false
      description: >-
        Reference субсчёта, в котором должна выполняться операция. Если
        заголовок не передан, операция выполняется в основном аккаунте;
        зарезервированное значение `principal` также указывает на основной
        аккаунт и равнозначно отсутствию заголовка. Принимается всеми
        эндпоинтами, кроме `POST /auth` и самих эндпоинтов `/sub-accounts`,
        которые всегда работают с основным аккаунтом.


        Возможные ошибки: `404 SUB_ACCOUNT_NOT_FOUND`, `403
        SUB_ACCOUNT_FORBIDDEN`, `403 SUB_ACCOUNT_SUSPENDED`.


        Требует, чтобы у учётных данных был включён **доступ к субсчетам**
        (Настройки → Интеграция → Учётные данные API). По умолчанию он выключен
        и не заменяется никаким разрешением, даже `FULL_ACCESS`: без него ответ
        — `403 SUB_ACCOUNT_FORBIDDEN`.
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9_-]{1,31}$
        example: loja-centro
  schemas:
    GetAccountInfoOutput:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/AccountInfoDetail'
          description: Данные аккаунта
        balance:
          $ref: '#/components/schemas/BalanceInfoDetail'
          description: Баланс аккаунта
      required:
        - account
        - balance
    UnauthorizedErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication token is required
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    ForbiddenErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: You do not have permission to access this resource
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    NotFoundErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 404
        error:
          type: string
          example: NotFound
        message:
          type: string
          example: Resource with id 550e8400-e29b-41d4-a716-446655440000 not found
        details:
          type: object
          example:
            resource: Example
            id: 550e8400-e29b-41d4-a716-446655440000
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: InternalError
        message:
          type: string
          example: An unexpected error occurred
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
          example: 2771463d58840c8e116dc6dda1e1e5d0
      required:
        - statusCode
        - error
        - message
        - timestamp
    AccountInfoDetail:
      type: object
      properties:
        id:
          type: string
          description: ID аккаунта
          format: uuid
        status:
          type: string
          enum:
            - approved
            - pending
            - pending_documents
            - pending_approval
            - rejected
            - suspended
          description: Статус аккаунта
      required:
        - id
        - status
    BalanceInfoDetail:
      type: object
      properties:
        available:
          $ref: '#/components/schemas/BalanceAmountDetail'
          description: Доступный баланс (основной счёт)
        promotional:
          $ref: '#/components/schemas/BalanceAmountDetail'
          description: Промобаланс
        held:
          $ref: '#/components/schemas/BalanceAmountDetail'
          description: Заблокированный баланс
        total:
          $ref: '#/components/schemas/BalanceAmountDetail'
          description: Общий баланс (доступный + промо)
        currency:
          type: string
          description: Код валюты
          example: BRL
        updatedAt:
          type: string
          format: date-time
          description: Дата последнего обновления баланса
      required:
        - available
        - promotional
        - held
        - total
        - currency
        - updatedAt
    BalanceAmountDetail:
      type: object
      properties:
        amount:
          type: number
          description: Баланс в сентаво
          example: 150000
        amountFormatted:
          type: number
          description: Баланс в реалах в отформатированном виде (amount / 100)
          example: 1500
      required:
        - amount
        - amountFormatted
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Токен доступа, полученный через POST /auth (client_id + client_secret).
        Действителен в течение 300 секунд.

````