Overview

MyDocuments allow access to employee documents such as payslips and/or tax documents from Exchange.

  • Iterate over these documents using a document ID list.

  • Delete documents.

  • Query for additional payslip data.

Technical Tutorial

Using the JWT bearer token, the token key must be part of the Exchange database. A token key must 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",
"id": "string",
"date": "string",
"extension": "string",
"status": "string"
}
]

Flows Supported

Listing document IDs through /api/v4/documents will return a list of documents for a specific employee:

To retrieve the document content for a specific document ID use /api /v4 /documents /{documentId}

This returns the following fields:

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

This returns a Base64 encoded string in the document field and its mime-type, e.g., application/pdf.

To delete documents, use /api/v4/documents/{documentId} This marks the document as deleted but does not physically delete it.

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

[
{
"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 additional data such as the net pay, currency, pay date, and a breakdown of the salary components.

Error Handling

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

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

Picture

Limitations

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