Difference between revisions of "MOR API user balance update"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 13: | Line 13: | ||
* Methods: POST, GET(if allowed, not recomended) | * Methods: POST, GET(if allowed, not recomended) | ||
* Params: | * Params: | ||
** user_id - Users ID in MOR database, whose balance we want to change. Required. | ** user_id - Users ID in MOR database, whose balance we want to change. '''Required'''. | ||
** u - username to login. Required. | ** u - username to login. '''Required'''. | ||
** p - password to login. Required. | ** p - password to login. '''Required'''. | ||
** balance - new user balance. Required. | ** balance - new user balance. '''Required'''. | ||
** [[MOR API hash construction | hash]] - SHA1 hash constructed using params and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). Required. | ** [[MOR API hash construction | hash]] - SHA1 hash constructed using params and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ||
* Returns: | * Returns: | ||
** Errors: | ** Errors: |
Revision as of 07:56, 20 September 2011
This functionality is available from MOR 10
Login and change user balance.
- Call: /api/change_user_balance
- Methods: POST, GET(if allowed, not recomended)
- Params:
- user_id - Users ID in MOR database, whose balance we want to change. Required.
- u - username to login. Required.
- p - password to login. Required.
- balance - new user balance. Required.
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
- Returns:
- Errors:
- <error>User was not found</error> - User was not found using user_id. Use correct user_id.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>Bad login</error> - User not loged in the system. Check username and password.
- <error>User balance not updeted</error> - Params balance is not correct or user is not saved. Check balance param.
- Errors: