Integrating ADP with Mule 4 and accessing Workers Data

Prathamesh Kulkarni
Another Integration Blog
4 min readJun 8, 2023

In this article, we are going to see how to connect to ADP and get the workers data with the ADP provided API’s.

What is ADP?

ADP, or Automatic Data Processing, is one of the biggest providers of human resources (HR) software solutions and outsourced services in the world.

ADP is a comprehensive global provider of cloud-based human capital management (HCM) solutions that unite payroll, HR, talent, time, tax and benefits, and a leader in business outsourcing services and analytics and compliance expertise.

Requirements to integrate with Mule

  1. An active ADP account. As of now, ADP does not provide free accounts so you must have an active account.
  2. A Client ID and Client Secret for your ADP or an Authorization Token received from ADP.
  3. An ADP p12 certificate is used to connect to your ADP system and access token generation.

Along with this p12 certificate, you also need the password which is used to download this certificate.

NOTE: This p12 certificate is used to uniquely identify your ADP system partner/client, so it will be provided by a trusted partner/client only.

How to connect to ADP with Mule 4 using Anypoint Studio?

To connect with ADP, as I mentioned above you need to have an active account.

The link to the ADP API Explorer portal is ADP API Explorer. Here we are going to work with Workers and for this we will be using hr/v2/workers

Requesting a Bearer Token

In order to connect with Workers you need to authenticate it with an OAuth 2.0 Token which will be valid for 60 min. After each 60 min period you will be required to get a token to access Workers data.

While configuring the ADP Authorization Request, make sure you have configured the ADP SSL certificate provided by ADP in your request configuration which is P12 and the type is PKCS12.

The key password and password are the same which is used to create the p12 certificate.

The authorization host for UAT is: uat-accounts.adp.com and for production it is: accounts.adp.com.

Path of ADP Certificate is given along with Key Password and Password

You will also get Client ID and Client Secret from ADP which we will be using to get an OAuth2.0 token.

Configure your request body as per the below screenshot.

Request body to get Authorization Token
Request endpoint and method are mentioned in above image

You’ll receive an Access Token in the response, which is valid for 1 hour. The same is used to make API calls by adding the following header:
Authorization: Bearer {accessToken}

Create another request configuration. In this request configuration you again need to pass the SSL certificate, the same certificate that is used to fetch the Access Token but here the host is different, the hosts are — ADP host for UAT is: uat-api.adp.com and for production it is: api.adp.com.
The port for both environments is 443.

Request configuration for Get ADP Workers
Required Headers for Get ADP Workers

Save your application and run it. Now you are set to make your first call to ADP Workers.

The response will look like this:

Response of ADP Get Workers

If you want to get a specific worker you can do that by passing associateOID which is unique per worker.
The end point for that is /hr/v2/workers/{aoid}.

ADP application programming interfaces (APIs) support the following optional parameters defined in Open Data Protocol (OData):

  • $select
  • $filter
  • $top
  • $skip

These parameters allow a client device to control the representation it gets back from the server. Multiple query parameters may be used together by separating each option with the & character.

For more information you can follow below url : Introduction to ADP API Open Data Protocol (OData)

--

--