Getting Started

Getting Started

Welcome to the Avis Budget Group (ABG) Developer’s Platform.  With the platform, you can build, test, and deploy applications on ABG's highly-scalable and reliable infrastructure for your web, mobile, and backend solutions.

This getting started section will show you how to:

  • Sign Up for Access;
  • Create an Application and get API credentials;
  • Get an Access Token for authenticated use of an API;
  • Use an API with your access token;
  • Find out What’s Next

LET'S GET STARTED!

Step 1: Sign-up for Access

In order to use the APIs, you’ll need to create an account. Upon successful registration, you will be able to access our APIs immediately, in the web-based sandbox or via third-party tools like Postman.

  1. Click the user profile icon,  Profile Icon   on the top right of the screen.
  2. In the “Log In” pop-up, click Sign-Up
  3. Enter your account information, including your name and email address. 
    You will also specify the name of the Client Application to be used in our system.  This name must be unique across all ABG Client Applications.  If it is not unique, we will rename the Application for you to something that is.  You can always change this later, if needed.
  4. Click Sign-Up.
  5. Check your email for a verification/activation email. 
  6. Click the link in the email to complete the creation of your account.

Step 2: Request Access to APIs

Now that you have an account and a Client Application, you need to Request Access to APIs in our system.  The Client Application holds your credentials; the Client ID and Secret that gives you secure access to APIs.  You can have multiple Client Apps in your account and each App will have a unique Client ID/Secret combination. In this step, you will add APIs to your Client Application. 

(Your Client ID and Client Secret are valid in our sandbox and testing environments.  You will need a new Client ID/Secret when you are ready to deploy to our Production environment.)

  1. Make sure you’re logged in.  Click the user profile icon,  Profile Icon   on the top right of the screen to Log In.
  2. Click on Docs in the top navigation menu.
  3. Click on Rental Cars in the left navigation menu.
  4. Click on Car Locations in the left navigation menu.
  5. Click Request Access   on the top right of the screen.
  6. In the “Request API Access” pop-up: 
    • Under Application select the name of the Client Application you want to use.
    • Under API Instance select the name of the version of the API you want to use.
  7. Click  Request API Access when you’re finished.
  8. On the next pop-up, you’ll see your Client ID and Client Secret. You will need these later, so copy them from this pop-up or access them through your account Dashboard.

Step 3: Get an Access Token

We use OAuth 2.0 over SSL to secure our APIs.  You need to exchange your Application’s Client ID and Client Secret for a User Access Token. This Token is required every time you use one of our APIs. (You can retrieve the Client ID and Client Secret for your Client Applications from the Dashboard.) A User Access Token will be active for 7199 seconds (that's about 2 hours).

Getting an Access Token is easy.  Here’s an example using cURL:

curl -X GET \
  https://stage.abgapiservices.com/oauth/token/v1 \
  -H 'client_id: 7bc7af29041645fe80aa5d16e71876e5' \
  -H 'client_secret: 7bc7af29041645fe80aa5d16e71876e5'

 

A valid response with your access token looks like this:

{
   "access_token":"pehz7c0EpapbCW7wDG2TefeSPXh0",
   "token_type":"Bearer",
   "expires_in":7199
}

 

If you did something wrong with your request, you'll get an error similar to this:

{
   "status":{
      "request_time":"2018-07-04T13:05:10Z",
      "request_errors": 1,
      "errors":[
         {
            "code":"400",
            "message":"Bad Request",
            "reason": "invalid_request",
            "details": "Invalid credentials were provided in the request."
        }
      ]
  }
}

 

If your credentials were invalid or expired, you'll get an error that looks like this:

{
   "status":{
      "request_time":"2018-10-06T15:30:38Z",
      "request_errors": 1,
      "errors":[
         {
            "code":"401",
            "message":"Unauthorized",
            "reason":"authentication_failure",
            "details":"Missing or expired credentials were provided in the request."
         }
      ]
   }
}

 

Step 4: Use an API

Once you have an Access Token, you’re all set to make an API request. All ABG APIs require an Access Token to be passed in the Authorization header of your request. 

Here’s a cURL example of the Car Locations API using the Access Token:

curl -X GET \
'https://stage.abgapiservices.com/cars/locations/v1/?country_code=US&brand=Avis&keyword=Denver' \
  -H 'client_id: 7bc7af29041645fe80aa5d16e71876e5' \
  -H 'Authorization: Bearer pehz7c0EpapbCW7wDG2TefeSPXh0'

 

Step 5: What's Next

There’s a lot to explore in the Developer’s Portal:

  • Check out the Docs section for a look at all the APIs that are available to you.  The Rental Cars section provides details on how to use the APIs for the service that we’re most known for!
    • You may need to Request Access to each API you want to use.  Simply navigate to the specific API in the Docs and click Request Access  and add it to your existing Client Application.  You will automatically be given access to all the available APIs under Rental Cars whenever you Request Access for any of the Rental Cars APIs. 
  • Review the Guides section to get a better understanding of our API design approach
  • Contact us on the Support page if you have any issues.