In this article, you can read about retrieving and deleting logged work, logging absences and additions, managing work file attachments, and retrieving work log history via the API.
Get Work
GET
Retrieves a list of logged work with its corresponding details. You can use one or more of the search parameters below, and combine them, to narrow your results.
https://api.recman.io/v2/get/index.php?key={{api_key}}&scope=work&page=1&candidateId=5874692| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your API key |
| scope | string | Required | Must be set to work |
| page | integer | Required (at least one search criterion) | Page number. 1000 work records per page |
| workIds | string | Required (at least one search criterion) | A specific work ID, or comma-separated work IDs |
| minWorkId | integer | Required (at least one search criterion) | Lists work from a certain point onward |
| candidateId | integer | Required (at least one search criterion) | Retrieves work connected to a specific candidate |
| candidateIds | string | Required (at least one search criterion) | Retrieves work connected to multiple candidates, comma-separated |
| fields | string | Optional | Add the value globalTagIds to include global tag IDs in the response |
Note
You can combine different search parameters to adjust your fetch requests more precisely.
Work fields
| Field | Type | Description |
|---|---|---|
| workId | integer | Work ID |
| candidateId | integer | ID of the candidate this work belongs to |
| jobId | integer | ID of the job this work is logged against |
| projectId | integer | Project ID |
| articleId | integer | ID of the article used for this work entry |
| type | string | Article type. See valid values below |
| status | string | Approval status of the work entry |
| salaryPaid | integer | Whether the salary for this work has been paid |
| date | string | Date of the work entry |
| qty | number | Quantity logged |
| qtyExclBreak | number | Quantity excluding break |
| qtyInclBreak | number | Quantity including break |
| startTime | string | Start time |
| endTime | string | End time |
| breakTime | string | Break time |
| invoiceBreak | integer | Whether the break is invoiced |
| paidBreak | integer | Whether the break is paid |
| socialCost | integer | Whether social cost applies |
| timeExclBreak | string | Time excluding break |
| timeInclBreak | string | Time including break |
| unitSalaryPrice | number | Unit salary price |
| unitInvoicePrice | number | Unit invoice price |
| sumSalary | number | Total salary sum |
| sumInvoice | number | Total invoice sum |
| vatPercent | number | VAT percentage |
| vat | number | VAT amount |
| internalNotes | string | Internal notes |
| invoiceNotes | string | Invoice notes |
| created | string | Date of creation |
| updated | string | Date of last update |
| childProjectId | integer | Child project ID, if applicable |
| globalTagIds | string | Included only when requested via the fields parameter |
Valid values for type (article type):
- 1 = hour
- 2 = absence
- 3 = addition
- 4 = deduction
- 5 = piecework
- 6 = day
- 7 = month
- 8 = overtime
- 9 = hourAddition
- 10 = guaranteePay
- 11 = guaranteeAddition
- 12 = absence
- 13 = selfManagedAbsence
- 14 = receipt
- default = N/A
Delete Work
POST
Deletes a work record. The operation must be set to delete and the scope to work. It is required to specify the workId field when deleting a work record.
https://api.recman.io/v2/post/| Field | Type | Required | Description |
|---|---|---|---|
| workId | integer | Required | ID of the work record to delete |
Insert Absence
POST
Logs an absence for an employee. The operation must be set to insert and the scope to absence.
https://api.recman.io/v2/post/Note
Only absence articles connected to the employee's collective agreement can be logged.
| Field | Type | Required | Description |
|---|---|---|---|
| jobId | integer | Required | ID of the job this absence is logged against |
| articleId | integer | Required | ID of the absence article to use |
| start | string | Required | Start date and time of the absence. Format: YYYY-MM-DD HH:MM:SS |
| end | string | Required | End date and time of the absence. Format: YYYY-MM-DD HH:MM:SS |
| breakTime | string | Optional | Break time during the absence. Format: HH:MM:SS |
| notes | string | Optional | Notes about the absence |
Insert Addition
POST
Logs an addition for an employee. The operation must be set to insert and the scope to addition.
https://api.recman.io/v2/post/Note
Only addition articles connected to the employee's collective agreement can be logged. The log salary and log invoice permissions must be enabled for an article in order to register the unitSalary and unitInvoice fields.
| Field | Type | Required | Description |
|---|---|---|---|
| jobId | integer | Required | ID of the job this addition is logged against |
| date | string | Required | Date of the addition. Format: YYYY-MM-DD |
| articleId | integer | Required | ID of the addition article to use |
| qty | number | Required | Quantity for the addition |
| unitSalary | number | Optional | Unit salary value. Requires the log salary permission to be enabled for the article |
| unitInvoice | number | Optional | Unit invoice value. Requires the log invoice permission to be enabled for the article |
| notes | string | Optional | Notes about the addition |
Insert Work File
POST
Uploads a file and attaches it to a candidate's work record. The operation must be set to insert and the scope to workFile. The response includes the workFileId of the added file.
https://api.recman.io/v2/post/Note
To find a candidate's work IDs, use the Get Work request.
| Field | Type | Required | Description |
|---|---|---|---|
| workId | integer | Required | ID of the work record to attach the file to |
| file | object | Required | Best practice example: "file": {"name": "image.jpeg", "extension": "jpeg", "base64": "..."} |
Delete Work File
POST
Deletes a work file by its workFileId identifier. The operation must be set to delete and the scope to workFile.
https://api.recman.io/v2/post/| Field | Type | Required | Description |
|---|---|---|---|
| workFileId | integer | Required | ID of the work file to delete |
Get Work Log
GET
Retrieves a list of work log items, recording actions taken on work records.
https://api.recman.io/v2/get/index.php?key={{api_key}}&scope=
workLog&limit=300&fromWorkLogId=1345&workId=5431| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your API key |
| scope | string | Required | Must be set to workLog |
| limit | integer | Optional | Limit of items per request. Default is 100, maximum is 1000 |
| fromWorkLogId | integer | Optional | Used for pagination. Use the last workLogId from the previous request to move further down the list |
| workId | integer | Optional | Retrieves work log items connected to a specific work record |
Work log fields
| Field | Type | Description |
|---|---|---|
| workLogId | integer | Work log ID |
| workId | integer | ID of the related work record |
| categoryId | integer | Category of the logged action |
| userId | integer | ID of the co-worker who performed the action, if applicable |
| contactPersonId | integer | ID of the contact person who performed the action, if applicable |
| candidateId | integer | ID of the candidate who performed the action, if applicable |
| created | string | Date and time the log entry was created |