Manage Payslips

You can use the Payroll REST API to view a list of payslips for a given person. A payslip provides a record of individual payroll payments received, including pay amounts, deductions taken, and accruals.

You can submit a GET request on the payslips resource to view your latest payslip or the last few payslips. The application returns payslips for all payroll relationships of the person.

For example, salaried employees might want to view their payslips if they anticipate a change in their pay as a result of bonus or benefit enrollment changes.

In this use case, we discuss these scenarios:

  • Retrieve the Latest Payslip

  • Retrieve the Payslip by Payment Date

  • Retrieve the Last Three Payslips

Retrieve the Latest Payslip

Let's say that John wants to retrieve his latest payslip to check how much bonus he received in the last month's paycheck.

To retrieve his latest payslip:

  1. Perform a GET operation on the payslips resource by providing the current date as the PayslipViewDate.
  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

GET

https://<host>:<port>/hcmRestApi/resources/11.13.18.05/payslips?q=PersonId=100100004259961&orderBy=PaymentDate:desc&limit=3&expand=documents&onlyData=true

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "Amount": 23854.97,
      "DefaultCurrencyCode": "USD",
      "PayslipViewDate": "2011-05-31",
      "PeriodStartDate": "2011-05-01",
      "PeriodEndDate": "2011-05-31",
      "PaymentDate": "2011-05-31",
      "DocumentsOfRecordId": 300100196498101,
      "AttachmentEntityName": "HR_DOCUMENTS_OF_RECORD",
      "PayrollRelationshipNumber": "100004259961",
      "PersonId": 100100004259961,
      "links": []
    },
    {
      "Amount": 21559.97,
      "DefaultCurrencyCode": "USD",
      "PayslipViewDate": "2011-01-31",
      "PeriodStartDate": "2011-01-01",
      "PeriodEndDate": "2011-01-31",
      "PaymentDate": "2011-01-31",
      "DocumentsOfRecordId": 300100016912800,
      "AttachmentEntityName": "HR_DOCUMENTS_OF_RECORD",
      "PayrollRelationshipNumber": "100004259961",
      "PersonId": 100100004259961,
      "links": []
    }
  ],
  "count": 2,
  "hasMore": false,
  "limit": 25,
  "offset": 0,
  "links": []
}

Retrieve the Payslip by Payment Date

Bala is preparing to file his taxes for the 2017 tax year. He wants to see how much pre-tax he has contributed to a tax-deferred retirement plan. He requests the payslip for Dec 31, 2017 to view the year-to-date totals.

To retrieve his payslips by payment date:

  1. Perform a GET operation on the payslips resource using the Payment Date parameter.
  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

GET

https://<host>:<port>/hcmRestApi/resources/11.13.18.05/payslips?q=PaymentDate<2011-05-31

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "Amount": 23854.97,
      "DefaultCurrencyCode": "USD",
      "PayslipViewDate": "2011-05-31",
      "PeriodStartDate": "2011-05-01",
      "PeriodEndDate": "2011-05-31",
      "PaymentDate": "2011-05-31",
      "DocumentsOfRecordId": 300100206533718,
      "AttachmentEntityName": "HR_DOCUMENTS_OF_RECORD",
      "PayrollRelationshipNumber": "100004259961",
      "PersonId": 100100004259961,
      "links": []
    },
    {
      "Amount": 21559.97,
      "DefaultCurrencyCode": "USD",
      "PayslipViewDate": "2011-01-31",
      "PeriodStartDate": "2011-01-01",
      "PeriodEndDate": "2011-01-31",
      "PaymentDate": "2011-01-31",
      "DocumentsOfRecordId": 300100016912800,
      "AttachmentEntityName": "HR_DOCUMENTS_OF_RECORD",
      "PayrollRelationshipNumber": "100004259961",
      "PersonId": 100100004259961,
      "links": []
    }
  ],
  "totalResults": 2,
  "count": 2,
  "hasMore": false,
  "limit": 3,
  "offset": 0,
  "links": []
}

Retrieve the Last Three Payslips

Jane is looking to get a mortgage loan to buy a new home. She needs to provide the bank with her latest 3 payslips as proof of employment and income.

To retrieve her last three payslips:

  1. Perform a GET operation on the payslips resource using the current date as the PayslipViewDate with limit=3.
  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

GET

https://<host>:<port>/hcmRestApi/resources/11.13.18.05/payslips?q=PersonId=10010000425996&orderBy=PaymentDate:desc&totalResults=true&limit=3

Example Response

Here's an example of the response body in JSON format.

{
  "items": [
    {
      "Amount": 21559.97,
      "DefaultCurrencyCode": "USD",
      "PayslipViewDate": "2011-01-31",
      "PeriodStartDate": "2011-01-01",
      "PeriodEndDate": "2011-01-31",
      "PaymentDate": "2011-01-31",
      "DocumentsOfRecordId": 300100016912800,
      "AttachmentEntityName": "HR_DOCUMENTS_OF_RECORD",
      "PayrollRelationshipNumber": "100004259961",
      "PersonId": 100100004259961,
      "links": []
    }
  ],
  "count": 1,
  "hasMore": false,
  "limit": 25,
  "offset": 0,
  "links": []
}