API: Economy – Paychecks and Payroll

This article explains how to retrieve active and deleted paychecks; add or delete paycheck export logs; create a candidate's payroll record; and attach a payslip, such as a PDF, via the API.

Get Paycheck

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=paycheck&page=1

Retrieve paychecks through the GET method. page is required. If exported is not specified, all paychecks are returned. The paycheck list is sorted in descending order.

Note

If a paycheck has an attached object, it can be downloaded separately using the 
workAttachment scope.

URLhttps://api.recman.io/v2/get/
scopepaycheck
pagePage number, 1000 paychecks per page
parametersminPaycheckId, payCheckIds, paycheckId, exported, paycheckSystemId

Parameters explained

ParameterDescription
payCheckIdsEnter several paycheck IDs to list specific ones. Comma-separated, no spaces.
paycheckIdSelect only one paycheck to export.
exportedRequest only paychecks that have been exported or not.
"0" = Not exported, "1" = Exported.
paycheckSystemIdGives an ID based on what kind of export the paycheck has been exported to. exported must be set to "1" for this parameter to work.
minPaycheckIdLists all paychecks over a specified paycheck ID, and none below.

PARAMS

key{{api_key}}
scopepaycheck
page1

Get Paycheck – Deleted

GET

https://api.recman.io/v2/get/?key={{api_key}}&
scope=deletedPaycheck&page=1

Gives you a list of all paychecks that have been deleted. The same pagination and parameters as the standard paycheck scope apply.

URLhttps://api.recman.io/v2/get/
ScopedeletedPaycheck
PagePage number, 1000 paychecks per page
ParametersminPaycheckId, payCheckIds, paycheckId, exported, paycheckSystemId

PARAMS

key{{api_key}}
scopedeletedPaycheck
page1

Insert / Delete Paycheck Export Log

POST

https://api.recman.io/v2/post/

The POST method is used for inserting and deleting paycheck export logs.

URL POSThttps://api.recman.io/v2/post/
ScopepaycheckExportLog
Operationinsert / delete

Fields

FieldDescription
paycheckId
integer
Paycheck ID. 
Required on operation: insert
userId
integer
User ID. 
Required on operation: insert
paycheckSystemId
integer
Paycheck system ID. 
Required on operation: insert
paycheckExportLogId
integer
Paycheck export log ID. 
Required on operation: delete

Request Body – Insert

key{{api_key}}
scopepaycheckExportLog
operationinsert
data.paycheckId423562
data.userId13236
data.paycheckSystemId755682

Request Body – Delete

key{{api_key}}
scopepaycheckExportLog
operationdelete
data.paycheckExportLogId321312

Insert / Delete Deleted-Paycheck Export Log

POST

https://api.recman.io/v2/post/

The POST method is used for inserting and deleting export logs specifically for deleted paychecks. 
Fields and behavior are identical to the standard paycheck export log, but apply to the
deletedPaycheckExportLog scope.

URL POSThttps://api.recman.io/v2/post/
ScopedeletedPaycheckExportLog
Operationinsert / delete

Fields

FieldDescription
paycheckId
integer
Paycheck ID. 
Required on operation: insert
userId
integer
User ID. 
Required on operation: insert
paycheckSystemId
integer
Paycheck system ID. 
Required on operation: insert
paycheckExportLogId
integer
Paycheck export log ID. 
Required on operation: delete

Request Body – Insert

key{{api_key}}
scopedeletedPaycheckExportLog
operationinsert
data.paycheckId423562
data.userId13236
data.paycheckSystemId755682

Insert Payroll

POST

https://api.recman.io/v2/post/

Here you can find an overview of how to request payrolls and what you can do with them.

URL POSThttps://api.recman.io/v2/post/
Scopepayroll
Operationinsert

Payroll fields

FieldDescription
candidateId
integer
ID of the candidate for whom to insert the payroll
grossAmount
integer
The amount before deduction
netAmount
integer
The amount after deduction
year
integer
Which year the payroll was created. Format: yyyy
month
integer
Which month the payroll was created. Format: m
date
date
Which date the payroll was uploaded. Format: y-m-d
attachments
object
See "Attaching a File to a Payroll Record" below

Request Body

key{{api_key}}
scopepayroll
operationinsert
data.candidateId3772436
data.grossAmount1000
data.netAmount1000
data.year2022
data.month1
data.date2022-05-25 21:05:16

Attaching a File to a Payroll Record

POST

https://api.recman.io/v2/post/

A file (e.g., a payslip PDF) can be attached to a payroll record at the same time it is inserted, by including an attachments object in the request.

Attachments — sub-fields

FieldDescription
name
string
Name of the file to be uploaded
ext
string
File extension type. Valid values: pdf, docx, etc.
base64
string
Base64-encoded string of the file

Request Body

key{{api_key}}
scopepayroll
operationinsert
data.candidateId3772436
data.grossAmount1000
data.netAmount1000
data.year2022
data.month1
data.date2022-05-25 21:05:16
data.attachments.nameattachmentsName.pdf
data.attachments.extpdf
data.attachments.base64(base64-encoded file content)
Was this article helpful?
0 out of 0 found this helpful