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
{ "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:

  • dashboard: Can see Shop performance and statistics
  • orders: Can view and modify orders
  • customers: Can view and modify customers
  • marketing: Can view and modify marketing related products such as discount codes
  • products: Can view and modify products
  • gift_cards: Can view and modify gift cards
  • pages: Can view and modify shop pages
  • links: Can view and modify links and link lists
  • themes: Can view and modify shop themes
  • applications: Can authorize the installation of third party applications
  • preferences: Can view the preferences and configuration of a shop
  • reports: Can view and create reports


phone
{ "phone" : "(555) 555-5555" }

Phone number associated with the account

Pin is deprecated and will be removed on 2014-08-01
pin
{ "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 is deprecated and will be removed on 2014-06-01
screen_name
{ "screen_name" : "joesmith" }


url
{ "url" : "http://example.com" }

Homepage or other web address

user_type
{ "user_type" : "regular" }


The type that the account is:

  • regular - A normal account that can access the web admin
  • open_id - A user account that uses google authentication to access web admin
  • restricted - A user account that cannot access the web admin


Endpoints

GET/admin/users.json

Get all the users

GET /admin/users.json
View 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/admin/users/799407056.json

Get a user

GET /admin/users/#{id}.json
View 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
  }
}