Overview

MyPayslips allows creation of a module to integrate with your organization's employee portal. Your organization's employees can access and view payslips in Exchange.

The endpoint that can be used for this is /api/v4/documents/payslip_data.

Uses

  • Employees can access and view payslips.

  • (HR) Managers with access to Exchange can access and view employee payslips if they are in their authorization scope.

Technical Tutorial

Using the JWT bearer token, the token key must be part of the exchange database. A token key needs to be configured in the RoR token configuration by the Alight Application Support Team.

The JWT bearer token contains the user identifier. This is used by Exchange for access control and ensures only employees and document types are returned that the user has access to. This is controlled in Exchange.

[
{
"relatedBodId": "string",
"year": "string",
"sequence": "string",
"occurence": "string",
    "id": "string",
    "displayName": "string",
"pexName": "string",
    "lcc": "string",
    "documentType": "string",
    "documentModel": "string",
    "payGroup": "string",
    "payPeriod": "string",
          "date": "string",
    "extension": "string",
    "status": "string"
}
]

Flows supported

To retrieve a list of payslips use the following: /api/v4/documents. This returns a list of:

{
  "status": "string",
  "document": "string",
  "mime_type": "string"
}

This returns the pay period, year, and filename for the available payslip.

An individual payslip can be retrieved by providing its Document ID to this API: /api /v4 /documents /{documentId}

This returns the following fields:

[
{
"next_pay_date": "string",
"published_date": "string",
"pc_start_date": "string",
"pc_end_date": "string",
"employer_contributions": "string",
"basic_salary": "string",
"total_other_payments": "string",
"total_overtime": "string",
"gross_pay": "string",
"net_pay": "string",
"currency_code": "string",
"taxes": "string",
"other_deductions": "string"
}
]

This returns a Base64 encoded string in the document field and its mime-type, e.g., application/pdf. This can be saved as a file on a server or used for inline display.

To query for additional payslip data use the following endpoint: /api/v4/documents/payslip_data

Error handling

An error code combined with a JSON formatted error message is returned for any of the APIs in case of a problem.

Picture

https://devror.ngahr.com/z05/api-docs/index.html  covers the Swagger definition for this API.  

Limitations

MyPayslips calls involve one call per employee and document type and should not be used to request documents for all employees in a data migration scenario. If you need to migrate data, contact your Alight Service Delivery Manager.