Get group balance

POST /user/balance


Description

The method returns the current balance of the account (the group the user belongs to). A token is required, see Authorization.


Request format

  • HTTP method: POST
  • URL: /user/balance
  • Content Type: application/json

Authorization

Pass the token in one of two ways:

  • the token: <jwt-token> header — a temporary JWT token obtained with user/login;
  • the token field in the request body — a permanent API token (UUID) from your account.

Without a token the request returns 401 access denied.


Example Request (cURL)

curl -X POST "https://api.neuro-vision.ru/v1/user/balance" -H "Content-Type: application/json" -H "token: <jwt-token>"

Example Answers

Success (200 OK)

{
  "status": "ok",
  "message": "balance",
  "balance": 1250.5
}
FieldTypeDescription
balancenumberCurrent account balance; 0 when there are no funds

Error (400 Bad Request)

{
  "message": "invalid schema",
  "status": "error"
}

Error (400 Bad Request) — the user is not in a group

{
  "message": "Access denied",
  "status": "error"
}

Error (401 Unauthorized)

{
  "message": "access denied",
  "status": "error"
}