Skip to content

Account Management

NearIT let you configure multiple accounts with platform access.
Every account will belong to your Owner Account (the one you registered with).

Accounts VS Profiles

Please remember the difference bewtween Accounts and Profiles:

  • Accounts are the platform users, they can access our web-plaform or the APIs.
  • Profiles are your mobile app users identified by NearIT.

Roles

NearIT supports different Account roles with different access to our UIs.

Role Description key
Owner The master account you registered with. agent
Developer Can tweak every settings of the app. app-manager
Marketer Don't have access to technical settings. marketer
Cashier Have only access to the NearIT coupon redeem UIs cashier

Create an Account

An API call allows to create sub-accounts. You will need to specify the new credentials and a reference to the master account (owner) and to the apps the user will have access to.
NB: You will need to call this API using your owner credentials.

POST /accounts

{
  "data": { 
    "attributes": {
      "email": "john@nearit.com";
      "role_key": "marketer",
      "name": "John Doe",
      "company_name": "NearIT", // optional
      "password": "XXX",
      "newsletter": false, // whether or not the user will be receiving our newsletter
      "avatar": "data:image/jpeg;base64..." // optional base64 encoded image to be used as avatar
    },
    "relationships": {
      "parent": {
        "id": "OWNER_ID",
        "type": "accounts"
      },
      "apps": {  // apps the user will have access to
        "data": [
          {
            "id": "APP_ID_0",
            "type": "apps"
          },
          {
            "id": 'APP_ID_1',
            "type": "apps"
          },
          {
            "id": "APP_ID_2",
            "type": "apps"
          }
        ]
      }
    }
  }
}

The call response will include user properties, references and its Account ID:

{
  "data": { 
    "type": "accounts",
    "id": "YOUR_NEW_USER_ACCOUNT_ID",
    "attributes": {
      ...
    },
    relationships: {
      ...
    }
  }
}

Complete reference

For more details about NearIT auth system please look at the NearIT Accounts APIs reference.