Getting Started


Eager to start using the API? Great! Before you begin, its important you understand how security works and the overall concepts of the API.

Security

In order to make calls to the API, FLEX needs to know:

  1. Your company credentials to determine the data you're licensed to use.
  2. Your developer credentials for analytics and call rate packages.

To tell FLEX what company you work for and who you are, you'll need to include two strings in the request headers for every call you make.

Name Type Value
Authorization String

JSON Web Token (JWT) obtained from JATO's OAuth 2.0 service. To retrieve your token for the Authorization header, you'll need to send a POST request to https://auth.jatoflex.com/oauth/token with the following body:

Key Value
username Your assigned us.customername or ca.customername username.
password Your assigned password.
grant_type password

Be sure to use the 'www-form-urlencoded' body format type when posting these values to the endpoint.

Once posted, the response follows the OAuth 2.0 format which is:

                {
                   "access_token": "string",
                   "token_type": "bearer",
                   "expires_in": int, //lifespan of token in seconds
                   "expires_time_remaining": int, //remaining lifespan of token in seconds
                   "expires_on": "string" //expiration datetime in UTC format
                }
            

The value you need to supply for Authorization is {token_type} + ' ' + {access_token}

For example: "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1Ni..."

Subscription-Key String The primary subscription key found in your developer profile.

API Concepts

If you've used a RESTful API before, you should feel right at home. If not, there are many resources available online so we won't cover the basics here.

Hyperlinks

Following the HATEOAS principal, FLEX is designed to incorporate the use of hyperlinks which tells you the future actions you can take. Every object and collection of objects contains a links[] collection. For example, the make object for Chrysler (/makes/Chrysler) contains a link to retrieve Chrysler models and manufacturer.

{
  "links": [
    {
      "href": "http://api.jatoflex.com/api/en-us/makes/Chrysler",
      "rel": "self"
    },
    {
      "href": "http://api.jatoflex.com/api/en-us/manufacturers/FCA",
      "rel": "getManufacturer"
    },
    {
      "href": "http://api.jatoflex.com/api/en-us/makes/Chrysler/models",
      "rel": "getModels"
    }
  ],
  "manufacturerName": "FCA",
  "makeName": "Chrysler"
}

Theoretically, you can navigate the entire API without ever needing to refer to the documentation!

Pagination

By default, the FLEX API paginates results by a default of 25 per "page" and provides the neccessary pagination links such as nextPage and lastPage in the links collection.

You can specify your own page size by tacking on the pageSize query parameter onto the URL. For example, http://api.jatoflex.com/api/en-us/makes?pageSize=10, will return 10 makes at a time. You can also set this value to a high number to remove pagination completely.

Using The Docs

Now that you have the concepts down, its time to check out our interactive API docs where you can browse all the available calls and even try them out right from the documentation!

  1. Navigate to the API Documentation.
  2. Select a specific API.
  3. Select an individual call in the left column that you wish to explore.
  4. To test the call, click the 'Try it' button to launch the console.
  5. Select a culture you have access to and fill in other parameters as needed.
  6. Under Authorization and next to JATO, select 'Client Credentials' from the drop down menu.
  7. Click the 'Authorize' button when prompted to retrieve a valid OAuth 2.0 token.
  8. Click the 'Send' button at the bottom to exectute the call and view the response.

It's time to start building your app! Still have questions? We're here to help. Contact us at any time.