User Information
Returns information about a user of the account.
When no other user is specified, it returns information about the user_id used to make the API calls. Mostly used for continuous validation of a user past the login screen on front-end store applications, since incorrect credentials will return an error message, and correct ones will return information about the user including their permissions level which could be tainted if stored in a cookie or as hidden form data.
Headers
|
|
Key |
|
Value |
|
Note |
|
|
|
api_access_key |
|
user_api_key |
|
Optional |
|
   
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.1 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959ca5645adac9b13dcb3 |
|
Required if not included in the headers |
|
|
|
type |
|
user_info |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
user_name |
|
clerk33 |
|
Optional |
|
|
|
suppress_permissions |
|
Yes |
|
Optional |
|
|
|
terminal |
|
Yes |
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Notes:
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'user_info';
- $data['account_id'] = 'greatwidgets';
Success XML Response -- Account Owner credentials only:
- <response status="success">
- <user>
- <user_id>johnnyclerk</user_id>
- <user_is_owner>true</user_is_owner>
- <user_biz_name>Demo Co.</user_biz_name>
- <user_language>EN</user_language>
- <user_timzone>14</user_timezone>
- <user_level>A</user_level>
- </user>
- </response>
NOTES:
- Account Owner user accounts do not have first_name, last_name, or addtl_info fields
- Account Owners are always level "A". This is included even if not needed to simplify permission checks at the application / integration level.
- Timezone and language code tables are available on the menu on the left.
Success XML Response -- Account Users credentials:
- <response status="success">
- <user>
- <user_id>johnnyclerk</user_id>
- <user_is_owner>false</user_is_owner>
- <user_first_name>John</user_first_name>
- <user_last_name>Smith</user_last_name>
- <user_addtl_info>store 35</user_addtl_info>
- <user_language>EN</user_language>
- <user_timzone>14</user_timezone>
- <user_level>K</user_level>
- </user>
- </response>
NOTES:
- Account Users do not have a biz_name field.
- timezone , language, and user_level code tables are available on the menu on the left.
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|