This guide explains how to integrate payslips from external HR systems into Beekeeper using the Beekeeper API. While we provide support, the development and implementation of the integration are your responsibility. Here are the steps you need to follow to send users direct chat messages with the payslip attached as a PDF file.
Requirements
You should have coding skills and the ability to develop and host your code independently. You also should be able to export payslips from your HR system in PDF format. This can be achieved through direct export functionality or a script to generate PDFs from data.
Steps to Implement Payslip Integration
Step 1: Upload Payslip Files
Follow the steps from here to upload a file:
- Get an upload token by sending a
GET
request to/files/{usage_type}/upload/token
, which returns an upload URL, additional form data, and registration requirements. -
Upload the file to the cloud storage using a
POST
request with form data containing the received parameters and the file binary. - If required, register the file by sending a
POST
request to/files/{usage_type}/upload
, providing the key returned in the previous step along with additional parameters.
Step 2: Retrieve User UUIDs
Use the “Get a user with a given username” GET
request to retrieve the UUIDs of the users who will receive the payslips. The UUIDs are necessary for sending direct chat messages to the respective users.
Step 3: Send Payslips to Users
Iterate over each user (using a loop) and send them a direct message containing the payslip file attachment. Use the “Send a message to a given recipient” POST
API call for each user.
Troubleshooting
Use Postman to test the API calls and ensure they function correctly.
Additional Resources / Links
Please refer to the Beekeeper API Documentation for further assistance and detailed information on the Beekeeper API.
Comments
0 comments
Please sign in to leave a comment.