Making your first call

Requesting a bearer token

Each request to one of ADP's APIs needs to be accompanied by an Authorization header containing a bearer token issued by the ADP Security Token Service.

  1. In Postman, open the Token Request. To expose the headers, click Headers.



     
  2. If your POST request is successful, you will receive an HTTP 200 from the server with your token in the body of the response. Copy the access_token value.



     
  3. You will receive an Access Token in response, which is valid for 1 hour. The same can be used to make API calls by adding the following header:

    Authorization: Bearer{accessToken}

    Postman allows you to store a collection of APIs and share them with others. ADP will continue to share sample collections on GITHUB.

    For example, you can find the ADP Workforce Now collection by clicking here. When at the location, download the file and click Import to import the list file.

Making an API Call with your bearer token

If you already have an API collection, you can select an API from a collection. The following sample shows selecting the GET HR - Worker (List) API and making the first call.

  1. Open the HR > Worker (List) request and click Headers to expose the headers.

  2. Paste your bearer token into the Authorization header and click Send.

    Remember to leave the Bearer and a space to the left of your token. Since Postman is a browser-based application, the browser caching mechanism will save responses to the cache. To ensure that changes you make in ADP applications are reflected in Postman, we recommend placing a cache-buster into the query string between each request.

    For example, preventCache=timestamp, where timestamp is a unique value such as the current time. You won't need to do this when you're building your application because browser-based caching won't come into play.

     

    If your request was successful, you'll receive an HTTP 200 message from the server within a few records. The following sample shows a response of the GET HR - Worker (List) API request: