User balance status
The request lets you get information about a user's balance. The response body contains the currency code and the amount of money in their account.
Request format
To get information about an account, use an HTTP request with the GET
method:
GET /projects/<project_id>/services/<service_id>/personal_account
Host: api-developer.tech.yandex.net
X-Auth-Key: <your API key>
Resource
<project_id>
Project ID.
<service_id>
Service ID.
Request headers
Host
The URL of the node providing the API.
X-Auth-Key
Authorization key.
Response format
If the request has been completed successfully, the API returns a response with the code 200. The response body contains an object in JSON format:
{
"personal_account": {
"currency": "RUB",
"sum": "0"
}
}
Response properties
Key |
Value |
|
An object with information about the balance. |
The properties of the |
|
|
The code of the currency of the account balance. |
|
The amount of money in the account. |
If the request has failed, the response message contains information about errors:
HTTP error code |
Error description |
|
One of the request parameters has an invalid value or data format. |
|
The user or app does not have rights to access the resource; the request is rejected. |
|
The requested resource is not found. |
|
Internal service error. Try resending your request later. |
|
The API service is temporarily unavailable. |
The URL of the node providing the API.
Authorization key.
Project ID.
Service ID.