Skip to main content

Shifts

Fetch Overtime policies

GET

Summary

Get Overtime Policies

Description

Get all configured Overtime Policies.

Parameters
NameLocated inDescriptionRequiredSchema
limitqueryNostring (int64)
currentPagequeryNostring (int64)
orderBy.fieldqueryNostring
orderBy.orderqueryNostring
searchStringqueryNostring
searchFieldqueryNostring
getComponentsqueryNoboolean
fromDatequeryNodateTime
toDatequeryNodateTime
userTypequeryNostring
cpfAccountqueryNostring
accountTypequeryNostring
getBenefitsqueryNoboolean
orderqueryNostring
fieldqueryNostring
isInCompleteProfilequeryNoboolean
stagequeryNostring
includeDraftqueryNoboolean
ignTeamDataqueryNoboolean
ignRolesqueryNoboolean
ignUserApproversqueryNoboolean
ignTeamMembersqueryNoboolean
userIdsqueryNo[ string ]
isCustomFieldFilterqueryNoboolean
onlyTeamMembersqueryNoboolean
Responses
CodeDescriptionSchema
200A successful response.v1GetOvertimeResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime?limit=20&currentPage=1
Curl
curl -X GET "https://bifrost-us.deskera.com/v1/people/tenants/overtime?limit=20&currentPage=1" -H "accept: application/json" -H "x-access-token: sampletoken"
Sample Request

Sample Response
{
"status": "OK",
"data": [
{
"id": "63316ecf46f40e1b904e6af9",
"policyName": "OT Policy 2",
"description": "OT Policy 2",
"activated": true,
"effectiveFrom": "2022-08-31T18:30:00Z",
"status": "ACTIVE",
"remark": "AA",
"employees": [
{
"employeeId": "6218718e01c98198c7a3e41d",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
},
{
"employeeId": "624595fdb0bc1377fac94575",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
},
{
"employeeId": "626a292ceee2302daeee58b1",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
}
],
"employeeIamUserIds": [

],
"applicableToAll": false,
"breakHours": {
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00",
"all": "01:00"
},
"maxOvertime": {
"daily": "04:00",
"weekly": "20:00",
"monthly": "80:00",
"quarterly": "240:00"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_DOWN",
"blockTime": 30,
"hasExpiry": false,
"actionDue": 0,
"calculationType": "SHIFT",
"calculationMethod": "COMPONENT",
"flatAmount": "0",
"component": "63316ee999b248f47220d2cb",
"employeeDetails": [
{
"userId": "6218718e01c98198c7a3e41d",
"firstName": "Rohan",
"lastName": "Shelar",
"iamUserId": "
},
{
"userId": "624595fdb0bc1377fac94575",
"firstName": "Karan",
"lastName": "Bhandari",
"iamUserId": "
},
{
"userId": "626a292ceee2302daeee58b1",
"firstName": "Shubham",
"lastName": "Parihar",
"iamUserId": "
}
],
"eUIMap": {

},
"createdAt": "2022-09-26T09:20:15.898Z",
"multiplier": {
"restDay": "2",
"offDay": "2",
"holiday": "2",
"regularDay": "1",
"halfDay": "1",
"all": "
},
"createdBy": "Ganesh Karale (00001)",
"updatedAt": "2022-09-26T09:21:44.586Z",
"updatedBy": "Ganesh Karale (00001)",
"employeeCount": 3
}
],
"filterConfig": {
"page": "1",
"numberOfElements": "3",
"sizePerPage": "20",
"totalPage": "1",
"numberOfRecords": "3"
}
}

POST

Summary

Add a Overtime

Description

Add a new Overtime.

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1Overtime
Responses
CodeDescriptionSchema
200A successful response.v1Overtime
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime
Curl
curl -X POST "https://bifrost-us.deskera.com/v1/people/tenants/overtime" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"policyName\":\"Day Shift\",\"description\":\"Day shift policy\",\"remark\":\"\",\"breakHours\":{\"all\":\"01:00\",\"restDay\":\"01:00\",\"offDay\":\"01:00\",\"holiday\":\"01:00\",\"regularDay\":\"01:00\",\"halfDay\":\"01:00\"},\"maxOvertime\":{\"daily\":\"02:00\",\"weekly\":\"10:00\",\"monthly\":\"40:00\",\"quarterly\":\"120:00\"},\"multiplier\":{\"all\":\"1\",\"restDay\":\"1\",\"offDay\":\"1\",\"holiday\":\"1\",\"regularDay\":\"1\",\"halfDay\":\"1\"},\"minHours\":\"00:30\",\"otToRoundOff\":\"ROUND_UP\",\"blockTime\":15,\"hasExpiry\":false,\"actionDue\":null,\"actionDueDate\":\"\",\"calculationType\":\"SHIFT\",\"calculationMethod\":\"FLAT\",\"flatAmount\":100,\"component\":\"\",\"effectiveFrom\":\"0001-01-01T00:00:00Z\",\"updatedAt\":\"2022-10-28T10:21:49.614Z\",\"status\":\"DRAFT\",\"activated\":false,\"employees\":[\"635a7c7e0ab739d2f218da6d\",\"63109c4f18ca88d8a9a9a035\"],\"applicableToAll\":false}"
Sample Request
{
"policyName": "Day Shift",
"description": "Day shift policy",
"remark": ",
"breakHours": {
"all": "01:00",
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00"
},
"maxOvertime": {
"daily": "02:00",
"weekly": "10:00",
"monthly": "40:00",
"quarterly": "120:00"
},
"multiplier": {
"all": "1",
"restDay": "1",
"offDay": "1",
"holiday": "1",
"regularDay": "1",
"halfDay": "1"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_UP",
"blockTime": 15,
"hasExpiry": false,
"actionDue": null,
"actionDueDate": ",
"calculationType": "SHIFT",
"calculationMethod": "FLAT",
"flatAmount": 100,
"component": ",
"effectiveFrom": "0001-01-01T00:00:00Z",
"updatedAt": "2022-10-28T10:21:49.614Z",
"status": "DRAFT",
"activated": false,
"employees": [
"635a7c7e0ab739d2f218da6d",
"63109c4f18ca88d8a9a9a035"
],
"applicableToAll": false
}
Sample Response
{
"id": "635bad3f0ab739d2f218da74",
"policyName": "Day Shift",
"description": "Day shift policy",
"activated": false,
"effectiveFrom": "0001-01-01T00:00:00Z",
"status": "DRAFT",
"remark": ",
"employees": [
],
"applicableToAll": false,
"breakHours": {
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00",
"all": "01:00"
},
"maxOvertime": {
"daily": "02:00",
"weekly": "10:00",
"monthly": "40:00",
"quarterly": "120:00"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_UP",
"blockTime": 15,
"hasExpiry": false,
"actionDue": 0,
"calculationType": "SHIFT",
"calculationMethod": "FLAT",
"flatAmount": "100",
"component": ",
"multiplier": {
"restDay": "1",
"offDay": "1",
"holiday": "1",
"regularDay": "1",
"halfDay": "1",
"all": "1"
}
}

PATCH

Summary

Update Overtime policy

Description

Update Overtime policy.

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1Overtime
Responses
CodeDescriptionSchema
200A successful response.v1Overtime
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime
Curl
curl -X PATCH "https://bifrost-us.deskera.com/v1/people/tenants/overtime" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"policyName\":\"Day Shift\",\"description\":\"Day shift policy\",\"remark\":\"\",\"breakHours\":{\"all\":\"01:00\",\"restDay\":\"01:00\",\"offDay\":\"01:00\",\"holiday\":\"01:00\",\"regularDay\":\"01:00\",\"halfDay\":\"01:00\"},\"maxOvertime\":{\"daily\":\"02:00\",\"weekly\":\"10:00\",\"monthly\":\"40:00\",\"quarterly\":\"120:00\"},\"multiplier\":{\"all\":\"1\",\"restDay\":\"1\",\"offDay\":\"1\",\"holiday\":\"1\",\"regularDay\":\"1\",\"halfDay\":\"1\"},\"minHours\":\"00:30\",\"otToRoundOff\":\"ROUND_UP\",\"blockTime\":15,\"hasExpiry\":false,\"actionDue\":0,\"actionDueDate\":\"\",\"calculationType\":\"SHIFT\",\"calculationMethod\":\"FLAT\",\"flatAmount\":100,\"component\":\"\",\"effectiveFrom\":\"0001-01-01T00:00:00Z\",\"updatedAt\":\"0001-01-01T00:00:00Z\",\"status\":\"DRAFT\",\"activated\":false,\"employees\":[\"635a7c7e0ab739d2f218da6d\",\"63109c4f18ca88d8a9a9a035\"],\"applicableToAll\":false,\"id\":\"635bad3f0ab739d2f218da74\"}"
Sample Request
{
"policyName": "Day Shift",
"description": "Day shift policy",
"remark": ",
"breakHours": {
"all": "01:00",
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00"
},
"maxOvertime": {
"daily": "02:00",
"weekly": "10:00",
"monthly": "40:00",
"quarterly": "120:00"
},
"multiplier": {
"all": "1",
"restDay": "1",
"offDay": "1",
"holiday": "1",
"regularDay": "1",
"halfDay": "1"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_UP",
"blockTime": 15,
"hasExpiry": false,
"actionDue": 0,
"actionDueDate": ",
"calculationType": "SHIFT",
"calculationMethod": "FLAT",
"flatAmount": 100,
"component": ",
"effectiveFrom": "0001-01-01T00:00:00Z",
"updatedAt": "0001-01-01T00:00:00Z",
"status": "DRAFT",
"activated": false,
"employees": [
"635a7c7e0ab739d2f218da6d",
"63109c4f18ca88d8a9a9a035"
],
"applicableToAll": false,
"id": "635bad3f0ab739d2f218da74"
}
Sample Response
{
"id": "635bad3f0ab739d2f218da74",
"policyName": "Day Shift",
"description": "Day shift policy",
"activated": false,
"effectiveFrom": "0001-01-01T00:00:00Z",
"status": "DRAFT",
"remark": ",
"employees": [
],
"applicableToAll": false,
"breakHours": {
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00",
"all": "01:00"
},
"maxOvertime": {
"daily": "02:00",
"weekly": "10:00",
"monthly": "40:00",
"quarterly": "120:00"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_UP",
"blockTime": 15,
"hasExpiry": false,
"actionDue": 0,
"calculationType": "SHIFT",
"calculationMethod": "FLAT",
"flatAmount": "100",
"component": ",
"multiplier": {
"restDay": "1",
"offDay": "1",
"holiday": "1",
"regularDay": "1",
"halfDay": "1",
"all": "1"
}
}

Delete overtime policy

Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime/delete
Curl
curl -X POST "https://bifrost-us.deskera.com/v1/people/tenants/overtime/delete" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"ids\":[\"635bad3f0ab739d2f218da74\"],\"forcedDelete\":true}"
Sample Request
{
"ids": [
"635bad3f0ab739d2f218da74"
],
"forcedDelete": true
}
Sample Response
{
"status": "OK",
"message": "Deleted {1} document(s) with Id(s) {[635bad3f0ab739d2f218da74]}",
"errCode": "
}

POST

Summary

Delete Overtime policy

Description

Delete overtime policies

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1BulkIdRequest
Responses
CodeDescriptionSchema
200A successful response.v1DeleteResponse
defaultAn unexpected error response.gatewayruntimeError

Seach Overtime policies

POST

Summary

Get a OT Policy by Employee id

Description

Get a OT Policy by Employee id

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1ShiftIdRequest
Responses
CodeDescriptionSchema
200A successful response.v1GetOvertimeResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime/find
Curl
curl -X POST "https://bifrost-us.deskera.com/v1/people/tenants/overtime/find" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"iamUserIds\":[\"66194\"]}"
Sample Request
{
"iamUserIds": [
"55189"
]
}
Sample Response
{
"status": "OK",
"data": [
{
"id": "633152f3dbe993639a0b3110",
"policyName": "OT Policy 1",
"description": "OT Policy 1",
"activated": true,
"effectiveFrom": "2022-08-31T18:30:00Z",
"status": "ACTIVE",
"remark": ",
"employees": [
{
"employeeId": "60b734520a2aaa7131f2c588",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
},
{
"employeeId": "60d4374e32ed46f7fe1eb013",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
},
{
"employeeId": "627a69e05bb6f9ec5715525c",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
}
],
"employeeIamUserIds": [
"55189",
"0",
"0"
],
"applicableToAll": false,
"breakHours": {
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00",
"all": "01:00"
},
"maxOvertime": {
"daily": "02:00",
"weekly": "10:00",
"monthly": "40:00",
"quarterly": "120:00"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_DOWN",
"blockTime": 30,
"hasExpiry": false,
"actionDue": 0,
"calculationType": "SHIFT",
"calculationMethod": "FLAT",
"flatAmount": "5",
"component": ",
"employeeDetails": [
],
"eUIMap": {
},
"createdAt": "1970-01-01T00:00:00Z",
"multiplier": {
"restDay": "2",
"offDay": "2",
"holiday": "2",
"regularDay": "1",
"halfDay": "1",
"all": "
},
"createdBy": "55189",
"updatedAt": "1970-01-01T00:00:00Z",
"updatedBy": "55189",
"employeeCount": 0
}
],
"filterConfig": null
}

Manage Overtime multiplier

GET

Summary

Get Overtime Payroll Multiplier

Description

Get Overtime Payroll Multiplier

Parameters
NameLocated inDescriptionRequiredSchema
limitqueryNostring (int64)
currentPagequeryNostring (int64)
orderBy.fieldqueryNostring
orderBy.orderqueryNostring
searchStringqueryNostring
searchFieldqueryNostring
getComponentsqueryNoboolean
fromDatequeryNodateTime
toDatequeryNodateTime
userTypequeryNostring
cpfAccountqueryNostring
accountTypequeryNostring
getBenefitsqueryNoboolean
orderqueryNostring
fieldqueryNostring
isInCompleteProfilequeryNoboolean
stagequeryNostring
includeDraftqueryNoboolean
ignTeamDataqueryNoboolean
ignRolesqueryNoboolean
ignUserApproversqueryNoboolean
ignTeamMembersqueryNoboolean
userIdsqueryNo[ string ]
isCustomFieldFilterqueryNoboolean
onlyTeamMembersqueryNoboolean
Responses
CodeDescriptionSchema
200A successful response.v1OvertimePayrollMultiplierResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime/ot-multiplier
Curl
curl -X GET "https://bifrost-us.deskera.com/v1/people/tenants/overtime/ot-multiplier" -H "accept: application/json" -H "x-access-token: sampletoken"
Sample Request

Sample Response
{
"status": "OK",
"overtimePayrollMultiplier": {
"id": "6331529246f40e1b904e6adb",
"overtimeMultiplierValues": [
{
"value": "1",
"description": "
},
{
"value": "2",
"description": "
},
{
"value": "3",
"description": "
},
{
"value": "4",
"description": "
}
]
}
}

PATCH

Summary

Update Overtime Payroll Multiplier

Description

Update Overtime Payroll Multiplier.

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1OvertimePayrollMultiplier
Responses
CodeDescriptionSchema
200A successful response.v1OvertimePayrollMultiplierResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime/ot-multiplier
Curl
curl -X PATCH "https://bifrost-us.deskera.com/v1/people/tenants/overtime/ot-multiplier" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"overtimeMultiplierValues\":[{\"value\":\"1\",\"description\":\"\"},{\"value\":\"2\",\"description\":\"\"},{\"value\":\"3\",\"description\":\"\"},{\"value\":\"4.2\",\"description\":\"\"}],\"id\":\"6331529246f40e1b904e6adb\"}"
Sample Request
{
"overtimeMultiplierValues": [
{
"value": "1",
"description": "
},
{
"value": "2",
"description": "
},
{
"value": "3",
"description": "
},
{
"value": "4.2",
"description": "
}
],
"id": "6331529246f40e1b904e6adb"
}
Sample Response
{
"status": "OK",
"overtimePayrollMultiplier": {
"id": "6331529246f40e1b904e6adb",
"overtimeMultiplierValues": [
{
"value": "1",
"description": "
},
{
"value": "2",
"description": "
},
{
"value": "3",
"description": "
},
{
"value": "4.2",
"description": "
}
]
}
}

Fetch Overtime policy by id

GET

Summary

Get an overtime policy by id

Description

Get an overtime policy by id

Parameters
NameLocated inDescriptionRequiredSchema
idpathYesstring
Responses
CodeDescriptionSchema
200A successful response.v1OvertimeResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/overtime/633152f3dbe993639a0b3110
Curl
curl -X GET "https://bifrost-us.deskera.com/v1/people/tenants/overtime/633152f3dbe993639a0b3110" -H "accept: application/json" -H "x-access-token: sampletoken"
Sample Request

Sample Response
{
"id": "633152f3dbe993639a0b3110",
"policyName": "OT Policy 1",
"description": "OT Policy 1",
"activated": true,
"effectiveFrom": "2022-08-31T18:30:00Z",
"status": "ACTIVE",
"remark": ",
"employees": [
{
"employeeId": "60b734520a2aaa7131f2c588",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
},
{
"employeeId": "60d4374e32ed46f7fe1eb013",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
},
{
"employeeId": "627a69e05bb6f9ec5715525c",
"dateOfAssign": "2022-09-26T00:00:00.000Z"
}
],
"employeeIamUserIds": [
],
"applicableToAll": false,
"breakHours": {
"restDay": "01:00",
"offDay": "01:00",
"holiday": "01:00",
"regularDay": "01:00",
"halfDay": "01:00",
"all": "01:00"
},
"maxOvertime": {
"daily": "02:00",
"weekly": "10:00",
"monthly": "40:00",
"quarterly": "120:00"
},
"minHours": "00:30",
"otToRoundOff": "ROUND_DOWN",
"blockTime": 30,
"hasExpiry": false,
"actionDue": 0,
"calculationType": "SHIFT",
"calculationMethod": "FLAT",
"flatAmount": "5",
"component": ",
"employeeDetails": [
{
"userId": "60b734520a2aaa7131f2c588",
"firstName": "Ganesh",
"lastName": "Karale",
"iamUserId": "55189"
},
{
"userId": "60d4374e32ed46f7fe1eb013",
"firstName": "Sandeep",
"lastName": "Misal",
"iamUserId": "55728"
},
{
"userId": "627a69e05bb6f9ec5715525c",
"firstName": "Amit",
"lastName": "Gunjal",
"iamUserId": "56844"
}
],
"eUIMap": {
},
"createdAt": "2022-09-26T07:21:23.380Z",
"multiplier": {
"restDay": "2",
"offDay": "2",
"holiday": "2",
"regularDay": "1",
"halfDay": "1",
"all": "
},
"createdBy": "Ganesh Karale (00001)",
"updatedAt": "2022-09-26T07:21:43.181Z",
"updatedBy": "Ganesh Karale (00001)",
"employeeCount": 3
}

Manage shifts

GET

Summary

Get Shifts

Description

Get Shifts.

Parameters
NameLocated inDescriptionRequiredSchema
limitqueryNostring (int64)
currentPagequeryNostring (int64)
orderBy.fieldqueryNostring
orderBy.orderqueryNostring
searchStringqueryNostring
searchFieldqueryNostring
getComponentsqueryNoboolean
fromDatequeryNodateTime
toDatequeryNodateTime
userTypequeryNostring
cpfAccountqueryNostring
accountTypequeryNostring
getBenefitsqueryNoboolean
orderqueryNostring
fieldqueryNostring
isInCompleteProfilequeryNoboolean
stagequeryNostring
includeDraftqueryNoboolean
ignTeamDataqueryNoboolean
ignRolesqueryNoboolean
ignUserApproversqueryNoboolean
ignTeamMembersqueryNoboolean
userIdsqueryNo[ string ]
isCustomFieldFilterqueryNoboolean
onlyTeamMembersqueryNoboolean
Responses
CodeDescriptionSchema
200A successful response.v1GetShiftResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/shifts?orderBy.field=updatedAt&orderBy.order=desc&currentPage=1&limit=20
Curl
curl -X GET "https://bifrost-us.deskera.com/v1/people/tenants/shifts?orderBy.field=updatedAt&orderBy.order=desc&currentPage=1&limit=20" -H "accept: application/json" -H "x-access-token: sampletoken"
Sample Request

Sample Response
{
"status": "OK",
"data": [
{
"id": "633a7b71faf6115ea85eb5af",
"name": "New Shift 2",
"from": "09:05",
"to": "17:05",
"shiftMargin": true,
"shiftMarginBefore": "00:30",
"shiftMarginAfter": "00:30",
"reqdHrsToMarkPresent": "08:00",
"reqdHrsToMarkHalfPresent": "04:00",
"applicableTo": false,
"employees": [

],
"isOvertimeEnabled": false,
"overtimeThreshold": "0",
"overtimeUnit": "0",
"overtimeMapping": ",
"shiftWorkWeek": [
{
"day": "MONDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:05",
"outTime": "17:05",
"otMapped": [

]
},
{
"day": "TUESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:05",
"outTime": "17:05",
"otMapped": [

]
},
{
"day": "WEDNESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:05",
"outTime": "17:05",
"otMapped": [

]
},
{
"day": "THURSDAY",
"workingStatus": "OFF_DAY",
"inTime": "00:00",
"outTime": "00:00",
"otMapped": [

]
},
{
"day": "FRIDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:05",
"outTime": "17:05",
"otMapped": [

]
},
{
"day": "SATURDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:05",
"outTime": "17:05",
"otMapped": [

]
},
{
"day": "SUNDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:05",
"outTime": "17:05",
"otMapped": [

]
}
],
"employeeDetails": [

],
"eUIMap": {

},
"createdAt": "
}
],
"filterConfig": {
"page": "1",
"numberOfElements": "4",
"sizePerPage": "20",
"totalPage": "1",
"numberOfRecords": "4"
}
}

POST

Summary

Add a Shift

Description

Add a new Shift.

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1Shift
Responses
CodeDescriptionSchema
200A successful response.v1Shift
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/shifts
Curl
curl -X POST "https://bifrost-us.deskera.com/v1/people/tenants/shifts" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"name\":\"Morning Shift\",\"from\":\"07:00\",\"to\":\"15:00\",\"shiftMargin\":true,\"shiftMarginBefore\":\"03:00\",\"shiftMarginAfter\":\"03:00\",\"reqdHrsToMarkPresent\":\"08:00\",\"reqdHrsToMarkHalfPresent\":\"04:00\",\"applicableTo\":false,\"employees\":[\"626a292ceee2302daeee58b1\",\"624595fdb0bc1377fac94575\"],\"shiftWorkWeek\":[{\"day\":\"MONDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"TUESDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"WEDNESDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"THURSDAY\",\"workingStatus\":\"OFF_DAY\",\"inTime\":\"00:00\",\"outTime\":\"00:00\"},{\"day\":\"FRIDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"SATURDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"SUNDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"}]}"
Sample Request
{
"name": "Morning Shift",
"from": "07:00",
"to": "15:00",
"shiftMargin": true,
"shiftMarginBefore": "03:00",
"shiftMarginAfter": "03:00",
"reqdHrsToMarkPresent": "08:00",
"reqdHrsToMarkHalfPresent": "04:00",
"applicableTo": false,
"employees": [
"626a292ceee2302daeee58b1",
"624595fdb0bc1377fac94575"
],
"shiftWorkWeek": [
{
"day": "MONDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "TUESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "WEDNESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "THURSDAY",
"workingStatus": "OFF_DAY",
"inTime": "00:00",
"outTime": "00:00"
},
{
"day": "FRIDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "SATURDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "SUNDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
}
]
}
Sample Response
{
"id": "635bba8e0ab739d2f218da7b",
"name": "Morning Shift",
"from": "07:00",
"to": "15:00",
"shiftMargin": true,
"shiftMarginBefore": "03:00",
"shiftMarginAfter": "03:00",
"reqdHrsToMarkPresent": "08:00",
"reqdHrsToMarkHalfPresent": "04:00",
"applicableTo": false,
"employees": [
],
"isOvertimeEnabled": false,
"overtimeThreshold": "0",
"overtimeUnit": "0",
"overtimeMapping": ",
"shiftWorkWeek": [
{
"day": "MONDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "TUESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "WEDNESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "THURSDAY",
"workingStatus": "OFF_DAY",
"inTime": "00:00",
"outTime": "00:00",
"otMapped": [
]
},
{
"day": "FRIDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "SATURDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "SUNDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
}
]
}

PATCH

Summary

Update a Shift

Description

Update a Shift.

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1Shift
Responses
CodeDescriptionSchema
200A successful response.v1Shift
defaultAn unexpected error response.gatewayruntimeError

"

Request URL
https://bifrost-us.deskera.com/v1/people/tenants/shifts
Curl
curl -X PATCH "https://bifrost-us.deskera.com/v1/people/tenants/shifts" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"name\":\"Morning Shift\",\"from\":\"07:00\",\"to\":\"15:00\",\"shiftMargin\":true,\"shiftMarginBefore\":\"03:00\",\"shiftMarginAfter\":\"03:00\",\"reqdHrsToMarkPresent\":\"08:00\",\"reqdHrsToMarkHalfPresent\":\"04:00\",\"applicableTo\":false,\"employees\":[\"626a292ceee2302daeee58b1\",\"624595fdb0bc1377fac94575\"],\"shiftWorkWeek\":[{\"day\":\"MONDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"TUESDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"WEDNESDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"THURSDAY\",\"workingStatus\":\"OFF_DAY\",\"inTime\":\"00:00\",\"outTime\":\"00:00\"},{\"day\":\"FRIDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"SATURDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"},{\"day\":\"SUNDAY\",\"workingStatus\":\"WEEK_DAY\",\"inTime\":\"07:00\",\"outTime\":\"15:00\"}]}"
Sample Request
{
"name": "Morning Shift",
"from": "07:00",
"to": "15:00",
"shiftMargin": true,
"shiftMarginBefore": "03:00",
"shiftMarginAfter": "03:00",
"reqdHrsToMarkPresent": "08:00",
"reqdHrsToMarkHalfPresent": "04:00",
"id": "635bba8e0ab739d2f218da7b",
"applicableTo": false,
"employees": [
"626a292ceee2302daeee58b1",
"624595fdb0bc1377fac94575"
],
"shiftWorkWeek": [
{
"day": "MONDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "TUESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "WEDNESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "THURSDAY",
"workingStatus": "OFF_DAY",
"inTime": "00:00",
"outTime": "00:00"
},
{
"day": "FRIDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "SATURDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
},
{
"day": "SUNDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00"
}
]
}
Sample Response
{
"id": "635bba8e0ab739d2f218da7b",
"name": "Morning Shift",
"from": "07:00",
"to": "15:00",
"shiftMargin": true,
"shiftMarginBefore": "03:00",
"shiftMarginAfter": "03:00",
"reqdHrsToMarkPresent": "08:00",
"reqdHrsToMarkHalfPresent": "04:00",
"applicableTo": false,
"employees": [
],
"isOvertimeEnabled": false,
"overtimeThreshold": "0",
"overtimeUnit": "0",
"overtimeMapping": ",
"shiftWorkWeek": [
{
"day": "MONDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "TUESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "WEDNESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "THURSDAY",
"workingStatus": "OFF_DAY",
"inTime": "00:00",
"outTime": "00:00",
"otMapped": [
]
},
{
"day": "FRIDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "SATURDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
},
{
"day": "SUNDAY",
"workingStatus": "WEEK_DAY",
"inTime": "07:00",
"outTime": "15:00",
"otMapped": [
]
}
]
}

Delete shifts

POST

Summary

Delete a Shift

Description

Delete multiple Shifts

Parameters
NameLocated inDescriptionRequiredSchema
bodybodyYesv1BulkIdRequest
Responses
CodeDescriptionSchema
200A successful response.v1DeleteResponse
defaultAn unexpected error response.gatewayruntimeError
Request URL
https://bifrost-us.deskera.com/v1/people/tenants/shifts/delete
Curl
curl -X POST "https://bifrost-us.deskera.com/v1/people/tenants/shifts/delete" -H "accept: application/json" -H "x-access-token: sampletoken" -H "Content-Type: application/json" -d "{\"ids\":[\"635bba8e0ab739d2f218da7b\"]}"
Sample Request
{
"ids": [
"635bba8e0ab739d2f218da7b"
]
}
Sample Response
{
"status": "OK",
"message": "Deleted {1} document(s) with Id(s) {[635bba8e0ab739d2f218da7b]}",
"errCode": ""
}

Fetch shifts by id

GET

Summary

Get a Shift by id

Description

Get a Shift by id

Parameters
NameLocated inDescriptionRequiredSchema
idpathYesstring
Responses
CodeDescriptionSchema
200A successful response.v1ShiftResponse
defaultAn unexpected error response.gatewayruntimeError

"

Request URL
https://bifrost-us.deskera.com/v1/people/tenants/shifts/633aa30d7ee86486e5858ef9
Curl
curl -X GET "https://bifrost-us.deskera.com/v1/people/tenants/shifts/633aa30d7ee86486e5858ef9" -H "accept: application/json" -H "x-access-token: sampletoken"
Sample Request

Sample Response
{
"id": "633aa30d7ee86486e5858ef9",
"name": "New",
"from": "09:00",
"to": "16:00",
"shiftMargin": true,
"shiftMarginBefore": "01:00",
"shiftMarginAfter": "02:00",
"reqdHrsToMarkPresent": "07:00",
"reqdHrsToMarkHalfPresent": "03:30",
"applicableTo": false,
"employees": [
{
"employeeId": "627a69e05bb6f9ec5715525c",
"dateOfAssign": "2022-10-03T00:00:00.000Z"
},
{
"employeeId": "626a292ceee2302daeee58b1",
"dateOfAssign": "2022-10-28T00:00:00.000Z"
}
],
"isOvertimeEnabled": false,
"overtimeThreshold": "0",
"overtimeUnit": "0",
"overtimeMapping": "",
"shiftWorkWeek": [
{
"day": "MONDAY",
"workingStatus": "WEEK_DAY",
"inTime": "10:00",
"outTime": "16:00",
"otMapped": [
]
},
{
"day": "TUESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "10:00",
"outTime": "16:00",
"otMapped": [
]
},
{
"day": "WEDNESDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:00",
"outTime": "17:00",
"otMapped": [
]
},
{
"day": "THURSDAY",
"workingStatus": "OFF_DAY",
"inTime": "00:00",
"outTime": "00:00",
"otMapped": [
]
},
{
"day": "FRIDAY",
"workingStatus": "OFF_DAY",
"inTime": "09:00",
"outTime": "16:00",
"otMapped": [
]
},
{
"day": "SATURDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:00",
"outTime": "16:00",
"otMapped": [
]
},
{
"day": "SUNDAY",
"workingStatus": "WEEK_DAY",
"inTime": "09:00",
"outTime": "16:00",
"otMapped": [
]
}
],
"employeeDetails": [
{
"userId": "626a292ceee2302daeee58b1",
"firstName": "Shubham",
"lastName": "Parihar",
"iamUserId": "59466"
},
{
"userId": "627a69e05bb6f9ec5715525c",
"firstName": "Amit",
"lastName": "Gunjal",
"iamUserId": "56844"
}
],
"eUIMap": {
},
"createdAt": ""
}

Models

gatewayruntimeError

NameTypeDescriptionRequired
errorstringNo
codeintegerNo
messagestringNo
details[ protobufAny ]No

protobufAny

Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.

Example 1: Pack and unpack a message in C++.

Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}

Example 2: Pack and unpack a message in Java.

Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}

Example 3: Pack and unpack a message in Python.

foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
any.Unpack(foo)
...

Example 4: Pack and unpack a message in Go

 foo := &pb.Foo{...}
any, err := ptypes.MarshalAny(foo)
...
foo := &pb.Foo{}
if err := ptypes.UnmarshalAny(any, foo); err != nil {
...
}

The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".

JSON

The JSON representation of an Any value uses the regular representation of the deserialized, embedded message, with an additional field @type which contains the type URL. Example:

package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}

{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}

If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field value which holds the custom JSON in addition to the @type field. Example (for message [google.protobuf.Duration][]):

{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}
NameTypeDescriptionRequired
type_urlstringA URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in path/google.protobuf.Duration). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http, https, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: If no scheme is provided, https is assumed. An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than http, https (or the empty scheme) might be used with implementation specific semantics.No
valuebyteMust be a valid serialized protocol buffer of the above specified type.No

v1BreakHours

NameTypeDescriptionRequired
restDaystringNo
offDaystringNo
holidaystringNo
regularDaystringNo
halfDaystringNo
allstringNo

v1BulkIdRequest

NameTypeDescriptionRequired
ids[ string ]No
forcedDeletebooleanNo

v1Condition

NameTypeDescriptionRequired
colIdstringNo
valuestringNo
oprstringNo
keystringNo

v1DeleteResponse

NameTypeDescriptionRequired
statusv1StatusNo
messagestringNo
errCodestringNo

v1EmployeeShiftData

NameTypeDescriptionRequired
employeeIdstringNo
dateOfAssignstringNo

v1FilterConfig

NameTypeDescriptionRequired
pagestring (int64)No
numberOfElementsstring (int64)No
sizePerPagestring (int64)No
totalPagestring (int64)No
numberOfRecordsstring (int64)No

v1GetOvertimeResponse

NameTypeDescriptionRequired
statusv1StatusNo
data[ v1OvertimeResponse ]No
filterConfigv1FilterConfigNo

v1GetShiftResponse

NameTypeDescriptionRequired
statusv1StatusNo
data[ v1ShiftResponse ]No
filterConfigv1FilterConfigNo

v1MaxOvertime

NameTypeDescriptionRequired
dailystringNo
weeklystringNo
monthlystringNo
quarterlystringNo

v1OrderBy

NameTypeDescriptionRequired
fieldstringNo
orderstringNo

v1OtMapped

NameTypeDescriptionRequired
keystringNo
otTypestringNo
valuestringNo

v1Overtime

NameTypeDescriptionRequired
idstringNo
policyNamestringNo
descriptionstringNo
activatedbooleanNo
effectiveFromdateTimeNo
statusstringNo
remarkstringNo
employees[ string ]No
applicableToAllbooleanNo
breakHoursv1BreakHoursNo
maxOvertimev1MaxOvertimeNo
minHoursstringNo
otToRoundOffstringNo
blockTimelongNo
hasExpirybooleanNo
actionDuelongNo
calculationTypestringNo
calculationMethodstringNo
flatAmountstring (uint64)No
componentstringNo
multiplierv1OvertimeMultiplierMappingsNo

v1OvertimeMultiplierMappings

NameTypeDescriptionRequired
restDaystringNo
offDaystringNo
holidaystringNo
regularDaystringNo
halfDaystringNo
allstringNo

v1OvertimeMultiplierValues

NameTypeDescriptionRequired
valuestringNo
descriptionstringNo

v1OvertimePayrollMultiplier

NameTypeDescriptionRequired
idstringNo
overtimeMultiplierValues[ v1OvertimeMultiplierValues ]No

v1OvertimePayrollMultiplierResponse

NameTypeDescriptionRequired
statusv1StatusNo
overtimePayrollMultiplierv1OvertimePayrollMultiplierNo

v1OvertimeResponse

NameTypeDescriptionRequired
idstringNo
policyNamestringNo
descriptionstringNo
activatedbooleanNo
effectiveFromdateTimeNo
statusstringNo
remarkstringNo
employees[ v1EmployeeShiftData ]No
employeeIamUserIds[ string (int64) ]No
applicableToAllbooleanNo
breakHoursv1BreakHoursNo
maxOvertimev1MaxOvertimeNo
minHoursstringNo
otToRoundOffstringNo
blockTimelongNo
hasExpirybooleanNo
actionDuelongNo
calculationTypestringNo
calculationMethodstringNo
flatAmountstring (uint64)No
componentstringNo
employeeDetails[ v1UserMeta ]No
eUIMapobjectNo
createdAtdateTimeNo
multiplierv1OvertimeMultiplierMappingsNo
createdBystringNo
updatedAtdateTimeNo
updatedBystringNo
employeeCountlongNo

v1Shift

NameTypeDescriptionRequired
idstringNo
namestringNo
fromstringNo
tostringNo
shiftMarginbooleanNo
shiftMarginBeforestringNo
shiftMarginAfterstringNo
reqdHrsToMarkPresentstringNo
reqdHrsToMarkHalfPresentstringNo
applicableTobooleanNo
employees[ string ]No
isOvertimeEnabledbooleanNo
overtimeThresholdstring (int64)No
overtimeUnitstring (int64)No
overtimeMappingstringNo
shiftWorkWeek[ v1ShiftWorkWeek ]No

v1ShiftIdRequest

NameTypeDescriptionRequired
employeeIds[ string ]No
iamUserIds[ string (int64) ]No

v1ShiftIdsRequest

NameTypeDescriptionRequired
shiftIds[ string ]No

v1ShiftResponse

NameTypeDescriptionRequired
idstringNo
namestringNo
fromstringNo
tostringNo
shiftMarginbooleanNo
shiftMarginBeforestringNo
shiftMarginAfterstringNo
reqdHrsToMarkPresentstringNo
reqdHrsToMarkHalfPresentstringNo
applicableTobooleanNo
employees[ v1EmployeeShiftData ]No
isOvertimeEnabledbooleanNo
overtimeThresholdstring (int64)No
overtimeUnitstring (int64)No
overtimeMappingstringNo
shiftWorkWeek[ v1ShiftWorkWeek ]No
employeeDetails[ v1UserMeta ]No
eUIMapobjectNo
createdAtstringNo

v1ShiftWorkWeek

NameTypeDescriptionRequired
daystringNo
workingStatusstringNo
inTimestringNo
outTimestringNo
otMapped[ v1OtMapped ]No

v1Status

NameTypeDescriptionRequired
v1Statusstring

v1UserFilter

NameTypeDescriptionRequired
conditions[ v1Condition ]No

v1UserMeta

NameTypeDescriptionRequired
userIdstringNo
firstNamestringNo
lastNamestringNo
iamUserIdstringNo