Skip to content

Paylocity API API

by paylocity.com

OAuthHTTPSFinance
Open documentation ↗

Overview

For general questions and support of the API, contact: [email protected] # Overview Paylocity Web Services API is an externally facing RESTful Internet protocol. The Paylocity API uses HTTP verbs and a RESTful endpoint structure. OAuth 2.0 is used as the API Authorization framework. Request and response payloads are formatted as JSON. Paylocity supports v1 and v2 versions of its API endpoints. v1, while supported, won't be enhanced with additional functionality. For direct link to v1 documentation, please click [here](https://docs.paylocity.com/weblink/guides/Paylocity_Web_Services_API/v1/Paylocity_Web_Services_API.htm). For additional resources regarding v1/v2 differences and conversion path, please contact [email protected]. ##### Setup Paylocity will provide the secure client credentials and set up the scope (type of requests and allowed company numbers). You will receive the unique client id, secret, and Paylocity public key for the data encryption. The secret will expire in 365 days. * Paylocity will send you an e-mail 10 days prior to the expiration date for the current secret. If not renewed, the second e-mail notification will be sent 5 days prior to secret's expiration. Each email will contain the code necessary to renew the client secret. * You can obtain the new secret by calling API endpoint using your current not yet expired credentials and the code that was sent with the notification email. For details on API endpoint, please see Client Credentials section. * Both the current secret value and the new secret value will be recognized during the transition period. After the current secret expires, you must use the new secret. * If you were unable to renew the secret via API endpoint, you can still contact Service and they will email you new secret via secure email. When validating the request, Paylocity API will honor the defaults and required fields set up for the company default New Hire Template as defined in Web Pay. # Authorization Paylocity Web Services API uses OAuth2.0 Authentication with JSON Message Format. All requests of the Paylocity Web Services API require a bearer token which can be obtained by authenticating the client with the Paylocity Web Services API via OAuth 2.0. The client must request a bearer token from the authorization endpoint: auth-server for production: https://api.paylocity.com/IdentityServer/connect/token auth-server for testing: https://apisandbox.paylocity.com/IdentityServer/connect/token Paylocity reserves the right to impose rate limits on the number of calls made to our APIs. Changes to API features/functionality may be made at anytime with or without prior notice. ##### Authorization Header The request is expected to be in the form of a basic authentication request, with the "Authorization" header containing the client-id and client-secret. This means the standard base-64 encoded user:password, prefixed with "Basic" as the value for the Authorization header, where user is the client-id and password is the client-secret. ##### Content-Type Header The "Content-Type" header is required to be "application/x-www-form-urlencoded". ##### Additional Values The request must post the following form encoded values within the request body: grant_type = client_credentials scope = WebLinkAPI ##### Responses Success will return HTTP 200 OK with JSON content: { "access_token": "xxx", "expires_in": 3600, "token_type": "Bearer" } # Encryption Paylocity uses a combination of RSA and AES cryptography. As part of the setup, each client is issued a public RSA key. Paylocity recommends the encryption of the incoming requests as additional protection of the sensitive data. Clients can opt-out of the encryption during the initial setup process. Opt-out will allow Paylocity to process unencrypted requests. The Paylocity Public Key has the following properties: * 2048 bit key size * PKCS1 key format * PEM encoding ##### Properties * key (base 64 encoded): The AES symmetric key encrypted w

Paylocity API is a finance API from paylocity.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 30 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Finance
Base URL
https://api.paylocity.com/api
Version
2
Endpoints
30
Spec updated
2023-03-06

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://api.paylocity.com/api/v2/companies/COMPANYID/codes/CODERESOURCE" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.paylocity.com/api/v2/companies/COMPANYID/codes/CODERESOURCE", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://api.paylocity.com/api/v2/companies/COMPANYID/codes/CODERESOURCE",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/v2/companies/{companyId}/codes/{codeResource}Get All Company Codes
GET/v2/companies/{companyId}/customfields/{category}Get All Custom Fields
POST/v2/companies/{companyId}/employeesAdd new employee
GET/v2/companies/{companyId}/employees/Get all employees
GET/v2/companies/{companyId}/employees/{employeeId}Get employee
PATCH/v2/companies/{companyId}/employees/{employeeId}Update employee
PUT/v2/companies/{companyId}/employees/{employeeId}/additionalRatesAdd/update additional rates
PUT/v2/companies/{companyId}/employees/{employeeId}/benefitSetupAdd/update employee's benefit setup
GET/v2/companies/{companyId}/employees/{employeeId}/directDepositGet All Direct Deposit
GET/v2/companies/{companyId}/employees/{employeeId}/earningsGet All Earnings
PUT/v2/companies/{companyId}/employees/{employeeId}/earningsAdd/Update Earning
GET/v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}Get Earnings by Earning Code
GET/v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}/{startDate}Get Earning by Earning Code and Start Date
DELETE/v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}/{startDate}Delete Earning by Earning Code and Start Date
PUT/v2/companies/{companyId}/employees/{employeeId}/emergencyContactsAdd/update emergency contacts
GET/v2/companies/{companyId}/employees/{employeeId}/localTaxesGet all local taxes
POST/v2/companies/{companyId}/employees/{employeeId}/localTaxesAdd new local tax
GET/v2/companies/{companyId}/employees/{employeeId}/localTaxes/{taxCode}Get local taxes by tax code
DELETE/v2/companies/{companyId}/employees/{employeeId}/localTaxes/{taxCode}Delete local tax by tax code
PUT/v2/companies/{companyId}/employees/{employeeId}/nonprimaryStateTaxAdd/update non-primary state tax
GET/v2/companies/{companyId}/employees/{employeeId}/paystatement/details/{year}Get employee pay statement details data for the specified year.
GET/v2/companies/{companyId}/employees/{employeeId}/paystatement/details/{year}/{checkDate}Get employee pay statement details data for the specified year and check date.
GET/v2/companies/{companyId}/employees/{employeeId}/paystatement/summary/{year}Get employee pay statement summary data for the specified year.
GET/v2/companies/{companyId}/employees/{employeeId}/paystatement/summary/{year}/{checkDate}Get employee pay statement summary data for the specified year and check date.
PUT/v2/companies/{companyId}/employees/{employeeId}/primaryStateTaxAdd/update primary state tax
GET/v2/companies/{companyId}/employees/{employeeId}/sensitivedataGet sensitive data
PUT/v2/companies/{companyId}/employees/{employeeId}/sensitivedataAdd/update sensitive data
GET/v2/companies/{companyId}/openapiGet Company-Specific Open API Documentation
POST/v2/credentials/secretsObtain new client secret.
POST/v2/weblinkstaging/companies/{companyId}/employees/newemployeesAdd new employee to Web Link

Questions

Does the Paylocity API API need an API key?

Yes. The Paylocity API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Paylocity API API support HTTPS?

Yes, the Paylocity API API is served over HTTPS.

How many endpoints does the Paylocity API API have?

Its OpenAPI description lists 30 endpoints in version 2. All of them are shown on this page.

What are alternatives to the Paylocity API API?

Other Finance APIs include Stripe, SEC EDGAR Data, Plaid, Fed Treasury, Razorpay IFSC.

Compare alternatives →

Listed from APIs.guru (CC0).