Companies and Sessions

In order to use Rollee Connect, our product's interface, we must have Users and Sessions.

Companies are instances of a Client's account, and a Client can have as many Companies as desired. Each Connected Account is associated with a Company. Companies are represented by an unique ID (UUID). In order to help you identify which Company you created, we allow Metadata to be added on the creation optionally.

Sessions are Company identifiers with specific time ranges for when Rollee Connect is allowed to operate on behalf of a Company. Each Session is uniquely associated with a Company, although a Company can have many Sessions.
One easy way to look at Sessions is comparing them to Hotel Room Key Cards: you have an Hotel Room, but you can have more than 1 Key Card (for your child to keep, for instance), the Key Cards are only valid during your stay and whatever purchase made at the Hotel using your Room Key Card will be associated with you.
Each Session is represented by a unique ID (UUID) and has a 30 minute validity period (this can be changed if requested).

Here are some requests that will be helpful to interact with Users and Sessions:

  • Create a Company:
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.getrollee.com/api/company/v0.1/companies

# with metadata
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.getrollee.com/api/company/v0.1/companies --data '
{
     "metadata": {
          "newKey": "New Value",
          "newKey-1": "New Value"
     }
}
'
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.sand.getrollee.com/api/company/v0.1/companies

# with Metadata
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.sand.getrollee.com/api/company/v0.1/companies --data '
{
     "metadata": {
          "newKey": "New Value",
          "newKey-1": "New Value"
     }
}
'
  • Create a new Session
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.getrollee.com/api/company/v0.1/companies/<YOUR_COMPANY_ID>/sessions/new
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.sand.getrollee.com/api/company/v0.1/companies/<YOUR_COMPANY_ID>/sessions/new
  • Get all Companies:
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.getrollee.com/api/company/v0.1/companies
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.sand.getrollee.com/api/company/v0.1/companies