Onboarding Quickstart Guide

  1. Get your client ID and client secret
    Your client ID and client secret have already been created and approved by Arity, and will be provided to you.
  2. Generate a b2b-scope access token
    Use the generateToken method to generate a b2b-scope access token by sending your client ID and client secret. This access token expires every hour and must be passed in the header of all subsequent API calls.
  3. Create and register new users
    Use the createUser method to create new users (representing your individual end-users) on Arity's platform and register them to the "Driving Behavior" product. When you create a new user, you can specify the userId and corresponding deviceId, or leave them blank and let Arity generate them for you.
  4. Create a group for each user
    Use the createGroup method to create one group for each end-user from step 3. This is necessary because Arity generates driving scores at a group level.
  5. Generate a mobile-scope access token for each user
    Return to the generateToken method and generate a mobile-scope access token by sending your client ID and client secret, along with the userId and deviceId from step 3. The mobile-scope token that is returned is uniquely associated with that user.

Authorization

Method
Description

POST

generateToken

https://api.arity.com/platform/oauth/v1/token

Generate an access token that you can use for authorization on subsequent API calls.

Users

Method
Description

POST

createUser

https://api.arity.com/registration/v2/users/products

Create a new end-user on the Arity platform, and register that user to a product (in this case, Driving Behavior).

GET

getUserDetails

https://api.arity.com/registration/v2/users/{userId}

Get details of an end-user on the Arity platform.

Trips

Method
Description

GET

getTripSummary

https://api.arity.com/drivingBehavior/v3/trips

Get a summary of all trips associated with an end-user during a specified time period.

GET

getTripDetails

https://api.arity.com/drivingBehavior/v3/trips/{tripId}

Get the details of a single trip, including distance, duration, and events (speeding, hard braking, etc.).

GET

getTripGeopoints

https://api.arity.com/drivingBehavior/v3/trips/{tripId}/geopoints

Get the GPS trail of a single trip.

POST

rejectTrip

https://api.arity.com/drivingbehavior/v3/users/{userId}/trips/{tripId}

Reject a trip captured for an end-user who was not driving (e.g., the user was a passenger) to remove it from that user's score.

Scoring

Method
Description

POST

createGroup

https://api.arity.com/drivinginsights/v1/orgs/{orgId}/groups

Create a group and assign one of Arity's scoring models so that any user(s) in the group can be scored according to that model.

GET

getScoreForUser

https://api.arity.com/drivinginsights/v1/orgs/{orgId}/users/{userId}/user-score

Get an end-user's driving score.

© 2019 Arity, LLC. All rights reserved.  | Privacy Policy | Terms of Use | Legacy APIs