User
Information
The User resource is currently only available to haravan Plus Customers.
What can you do with User?
The haravan API lets you do the following with the User resource. More detailed versions of these general actions may be available:
User Properties
account_owner | { "account_owner" : "false" } Identifies if the user is the owner of the haravan account |
bio | { "bio" : "A person on a mission" } User specified description of oneself |
{ "email" : "joe@example.com" } Email address associated with this account | |
first_name | { "first_name" : "Joe" } The first name of the account user |
id | { "id" : 1234567890 } The account id |
im | { "im" : "joe-chat@example.com" } The IM account address |
last_name | { "last_name" : "Smith" } The last name of the account user |
permissions | { "permissions" : ["full"] } { "permissions" : ["limited", "orders", "products"] } The permissions that the account has. Users will either have "full" or "limited" permissions. Limited permissions are scoped to a user in that they can only view certain parts of the haravan Admin The types of permissions a limited user can have are as follows:
|
phone | { "phone" : "(555) 555-5555" } Phone number associated with the account |
pin Pin is deprecated and will be removed on 2014-08-01 | { "pin" : "1234" } Point of Sale Access Code for this account |
receive_announcements | { "receive_announcements" : 0 } Whether or not this account will receive email announcements from haravan |
screen_name Screen_name is deprecated and will be removed on 2014-06-01 | { "screen_name" : "joesmith" } |
url | { "url" : "http://example.com" } Homepage or other web address |
user_type | { "user_type" : "regular" } The type that the account is:
|
Endpoints
GET/com/users.json
Get all the users
GET /com/users.jsonView Response
HTTP/1.1 200 OK { "users": [ { "account_owner": true, "bio": null, "email": "steve@apple.com", "first_name": "Steve", "id": 799407056, "im": null, "last_name": "Jobs", "permissions": [ "full" ], "phone": null, "receive_announcements": 1, "screen_name": null, "url": "www.apple.com", "user_type": "regular", "display_payments_banner": true, "dashboard_announcement": { "announcement_url": "http:\/\/www.haravan.com", "created_at": "2015-03-26T13:31:19-04:00", "description": "I got a fever...", "expires_at": "2015-06-28T13:31:19-04:00", "id": 3, "image_url": "https:\/\/www.socialmediaexplorer.com\/wp-content\/uploads\/2011\/01\/morecowbell.jpg", "is_modal": true, "modal_content": "<img src='https:\/\/www.socialmediaexplorer.com\/wp-content\/uploads\/2011\/01\/morecowbell.jpg'\/>", "name": "Dashboard - Announcing haravan with more cowbell!", "published_at": "2015-03-26T13:31:19-04:00", "segment": "", "use_push_state": false, "viewed": null }, "has_unviewed_announcements?": true, "recent_admin_browser_sessions": [ ], "phone_validated?": false, "tfa_enabled?": false }, { "account_owner": false, "bio": null, "email": "noaccesssteve@jobs.com", "first_name": "noaccesssteve", "id": 930143300, "im": null, "last_name": "Jobs", "permissions": [ "limited" ], "phone": null, "receive_announcements": 1, "screen_name": null, "url": "www.apple.com", "user_type": "regular", "display_payments_banner": false, "dashboard_announcement": { "announcement_url": "http:\/\/www.haravan.com", "created_at": "2015-03-26T13:31:19-04:00", "description": "I got a fever...", "expires_at": "2015-06-28T13:31:19-04:00", "id": 3, "image_url": "https:\/\/www.socialmediaexplorer.com\/wp-content\/uploads\/2011\/01\/morecowbell.jpg", "is_modal": true, "modal_content": "<img src='https:\/\/www.socialmediaexplorer.com\/wp-content\/uploads\/2011\/01\/morecowbell.jpg'\/>", "name": "Dashboard - Announcing haravan with more cowbell!", "published_at": "2015-03-26T13:31:19-04:00", "segment": "", "use_push_state": false, "viewed": null }, "has_unviewed_announcements?": true, "recent_admin_browser_sessions": [ ], "phone_validated?": false, "tfa_enabled?": false } ] }
GET/com/users/799407056.json
Get a user
GET /admin/users/#{id}.jsonView Response
HTTP/1.1 200 OK { "user": { "account_owner": true, "bio": null, "email": "steve@apple.com", "first_name": "Steve", "id": 799407056, "im": null, "last_name": "Jobs", "permissions": [ "full" ], "phone": null, "receive_announcements": 1, "screen_name": null, "url": "www.apple.com", "user_type": "regular", "display_payments_banner": true, "dashboard_announcement": { "announcement_url": "http:\/\/www.haravan.com", "created_at": "2015-03-26T13:31:19-04:00", "description": "I got a fever...", "expires_at": "2015-06-28T13:31:19-04:00", "id": 3, "image_url": "https:\/\/www.socialmediaexplorer.com\/wp-content\/uploads\/2011\/01\/morecowbell.jpg", "is_modal": true, "modal_content": "<img src='https:\/\/www.socialmediaexplorer.com\/wp-content\/uploads\/2011\/01\/morecowbell.jpg'\/>", "name": "Dashboard - Announcing haravan with more cowbell!", "published_at": "2015-03-26T13:31:19-04:00", "segment": "", "use_push_state": false, "viewed": null }, "has_unviewed_announcements?": true, "recent_admin_browser_sessions": [ ], "phone_validated?": false, "tfa_enabled?": false } }