curl --request POST \
--url https://sandbox.rollfi.xyz/adminPortal/upsertTimeEntry \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "upsertTimeEntry",
"userId": "C4CA148F-F2C6-4E70-8349-57CC6DFC1C2B",
"companyId": "5221FFCF-E84B-4690-B7DC-DE29D549096B",
"timeEntry": {
"timeEntryId": "D70A1260-A592-4A5D-B0E5-36E02AF1BC4C",
"clockInTime": "9:00:00",
"clockOutTime": "20:30:00",
"breaks": [
{
"breakStart": "12:00:00",
"breakEnd": "12:45:00"
},
{
"breakStart": "16:00:00",
"breakEnd": "16:30:00"
}
]
}
}
'{
"timeEntry": {
"timeEntryId": "D70A1260-A592-4A5D-B0E5-36E02AF1BC4C",
"status": "Ready",
"message": "Time entry updated successfully."
}
}Admin Portal
upsertTimeEntry
Use upsertTimeEntry to update an existing time entry or to insert a new time entry for an employee
When to use:
- When an employee forgets to clock in or clock out for a shift
- When an employee forgets to add a break in a shift
- When the clock in or clock out time for a shift needs amending
What it does:
- Inserts a time entry if no existing timeEntryId is provided
- Updates an exiting time entry if a timeEntryId is provided
- Ensures there is no overlap between inserted and updated time entries and any other shifts on the same day
- Triggers time card recalculation in accordance with the overtime rules for the policy
Note:
- To remove a shift entirely use the
deleteTimeEntryAPI - Use workDate when inserting a timeEntry, and timeEntryId when updating an existing time entry
POST
/
adminPortal
/
upsertTimeEntry
curl --request POST \
--url https://sandbox.rollfi.xyz/adminPortal/upsertTimeEntry \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "upsertTimeEntry",
"userId": "C4CA148F-F2C6-4E70-8349-57CC6DFC1C2B",
"companyId": "5221FFCF-E84B-4690-B7DC-DE29D549096B",
"timeEntry": {
"timeEntryId": "D70A1260-A592-4A5D-B0E5-36E02AF1BC4C",
"clockInTime": "9:00:00",
"clockOutTime": "20:30:00",
"breaks": [
{
"breakStart": "12:00:00",
"breakEnd": "12:45:00"
},
{
"breakStart": "16:00:00",
"breakEnd": "16:30:00"
}
]
}
}
'{
"timeEntry": {
"timeEntryId": "D70A1260-A592-4A5D-B0E5-36E02AF1BC4C",
"status": "Ready",
"message": "Time entry updated successfully."
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Response
Time entry upserted
Show child attributes
Show child attributes
