Difference between revisions of "MOR API user details get"
From Kolmisoft Wiki
Jump to navigationJump to search
| Line 16: | Line 16: | ||
<account>Postpaid</account> | <account>Postpaid</account> | ||
<balance>0.0000 USD</balance> | <balance>0.0000 USD</balance> | ||
<balance_number>0.0000</balance_number> | |||
<balance_currency>USD</balance_currency> | |||
<credit>Unlimited</credit> | <credit>Unlimited</credit> | ||
</main_detail> | </main_detail> | ||
Revision as of 14:30, 17 February 2012
This functionality is available from MOR 8
Retrieves user details
Result
<page>
<pagename>Personal_details</pagename>
<language>en</language>
<userid>0</userid>
<details>
<main_detail>
<account>Postpaid</account>
<balance>0.0000 USD</balance>
<balance_number>0.0000</balance_number>
<balance_currency>USD</balance_currency>
<credit>Unlimited</credit>
</main_detail>
<other_details>
<username>admin</username>
<first_name>System</first_name>
<surname>Admin</surname>
<personalid></personalid>
<agreement_number></agreement_number>
<agreement_date>2007-03-26</agreement_date>
<taxation_country>Afghanistan</taxation_country>
<vat_reg_number></vat_reg_number>
<vat_percent>18.0</vat_percent>
</other_details>
<registration>
<reg_address></reg_address>
<reg_postcode></reg_postcode>
<reg_city></reg_city>
<reg_country></reg_country>
<reg_state></reg_state>
<reg_direction></reg_direction>
<reg_phone></reg_phone>
<reg_mobile></reg_mobile>
<reg_fax></reg_fax>
<reg_email></reg_email>
</registration>
</details>
</page>
- Call: /api/user_details
- Methods: POST, GET(if allowed, not recomended)
- Params:
- user_id - Users ID in MOR database. Required. Type: INTEGER
- u - Users username. Required.
- p - Users password. Required.
- hash - SHA1 hash constructed using user_id 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.\
- Errors:
- Example:
- We have user_id = 123, API Secret Key = 456789
- Hash string to be converted: "123456789"
- We send:
- /api/user_details?u=admin&p=admin&user_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* Note that username and password are not included in hash