Skip to main content

Payschedule

Payschedule apis allow admins to manage (create/update/list/delete) payschedules for running payruns

API​


Add payschedule​

POST​

Summary​

Add Payschedule

Description​

Add payschedule

Parameters​
NameLocated inDescriptionRequiredSchema
payschedulebodyPayschedule Request BodyYesdto.Schedule
Responses​
CodeDescriptionSchema
200OKdto.Schedule
Security​
Security SchemaScopes
ApiKeyAuth
Request URL​
https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedule
Curl​
curl --location --request POST 'https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedule' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Content-Type: application/json' \
--header 'x-access-token: sampletoken' \
--data-raw '{"employees":["63525be29f4afb9427b6f509","6310886bc741a206031c257c"],"firstPayDate":"2022-10-31T23:59:59+08:00","isForAllUsers":false,"name":"oct-payschedule","payDay":"lastWorkingDayMonth","payPeriod":"monthly","workPeriod":{"from":"01/10/2022","to":"31/10/2022"},"workWeek":[5,1,2,3,4],"location":0,"customFields":[{"fieldId":"6323d1eeaabe99169d328446","fieldName":"C1","fieldValue":["c1"]}]}'
Sample Response​
{
"id": "635a44f89baf6fc88bb19d3e",
"name": "nov-payschedule",
"payPeriod": "monthly",
"workWeek": [
5,
1,
2,
3,
4
],
"payDay": "lastWorkingDayMonth",
"firstPayDay": "",
"secondPayDay": "",
"firstPayDate": "2022-10-31T23:59:59+08:00",
"workPeriod": {
"from": "01/10/2022",
"to": "31/10/2022"
},
"isForAllUsers": false,
"employees": [
"63525be29f4afb9427b6f509",
"6310886bc741a206031c257c"
],
"location": 0,
"customFields": [
{
"fieldId": "6323d1eeaabe99169d328446",
"fieldName": "C1",
"fieldValue": [
"c1"
]
}
]
}

Fetch payschedule​

GET​

Summary​

Get Payschedule By ID

Description​

Get payschedule by ID

Parameters​
NameLocated inDescriptionRequiredSchema
idpathPayschedule IdYesstring
Responses​
CodeDescriptionSchema
200OKdto.Schedule
Security​
Security SchemaScopes
ApiKeyAuth

Update payschedule​

Summary​

Update Payschedule By Id

Description​

Update Payschedule By Id for a Tenant

Parameters​
NameLocated inDescriptionRequiredSchema
idpathPayschedule IdYesstring
payschedulebodyPayschedule Request BodyYesdto.Schedule
Responses​
CodeDescriptionSchema
200OKdto.Schedule
Request URL​
https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedule/635a44f89baf6fc88bb19d3e
Curl​
curl --location --request PUT 'https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedule/635a44f89baf6fc88bb19d3e' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Content-Type: application/json' \
--header 'x-access-token: sampletoken' \
--data-raw '{
"employees": [
"63525be29f4afb9427b6f509",
"6310886bc741a206031c257c"
],
"firstPayDate": "2022-10-31T23:59:59+08:00",
"isForAllUsers": false,
"name": "nov-payschedule",
"payDay": "lastWorkingDayMonth",
"payPeriod": "monthly",
"workPeriod": {
"from": "01/10/2022",
"to": "31/10/2022"
},
"workWeek": [
5,
1,
2,
3,
4
],
"location": 0,
"customFields": [
{
"fieldId": "6323d1eeaabe99169d328446",
"fieldName": "C1",
"fieldValue": [
"c1"
]
}
],
"_id": "635a44f89baf6fc88bb19d3e"
}'
Sample Request​
{
"employees": [
"63525be29f4afb9427b6f509",
"6310886bc741a206031c257c"
],
"firstPayDate": "2022-10-31T23:59:59+08:00",
"isForAllUsers": false,
"name": "nov-payschedule",
"payDay": "lastWorkingDayMonth",
"payPeriod": "monthly",
"workPeriod": {
"from": "01/10/2022",
"to": "31/10/2022"
},
"workWeek": [
5,
1,
2,
3,
4
],
"location": 0,
"customFields": [
{
"fieldId": "6323d1eeaabe99169d328446",
"fieldName": "C1",
"fieldValue": [
"c1"
]
}
],
"_id": "635a44f89baf6fc88bb19d3e"
}
Sample Response​
{
"id": "635a44f89baf6fc88bb19d3e",
"name": "nov-payschedule",
"payPeriod": "monthly",
"workWeek": [
5,
1,
2,
3,
4
],
"payDay": "lastWorkingDayMonth",
"firstPayDay": "",
"secondPayDay": "",
"firstPayDate": "2022-10-31T23:59:59+08:00",
"workPeriod": {
"from": "01/10/2022",
"to": "31/10/2022"
},
"isForAllUsers": false,
"employees": [
"63525be29f4afb9427b6f509",
"6310886bc741a206031c257c"
],
"location": 0,
"customFields": [
{
"fieldId": "6323d1eeaabe99169d328446",
"fieldName": "C1",
"fieldValue": [
"c1"
]
}
]
}
Security​
Security SchemaScopes
ApiKeyAuth

DELETE payschedule​

Summary​

Delete Payschedule By Id

Description​

Delete Payschedule By Id

Parameters​
NameLocated inDescriptionRequiredSchema
idpathPayschedule IdYesstring
Responses​
CodeDescriptionSchema
200OKdto.Schedule
Request URL​
https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedules/bulk
Curl​
curl 'https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedules/bulk' \
-X 'DELETE' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Content-Type: application/json' \
--header 'x-access-token: sampletoken' \
--data-raw '[{"scheduleId":"635a44f89baf6fc88bb19d3e"}]' \
--compressed
Sample Request​
[{"scheduleId":"635a44f89baf6fc88bb19d3e"}]
Sample Response​
{
"id": "000000000000000000000000",
"name": "",
"payPeriod": "",
"workWeek": null,
"payDay": "",
"firstPayDay": "",
"secondPayDay": "",
"firstPayDate": "",
"workPeriod": {
"from": "",
"to": ""
},
"isForAllUsers": false,
"employees": null,
"location": 0,
"customFields": null
}
Security​
Security SchemaScopes
ApiKeyAuth

Fetch all payschedules​

GET​

Summary​

Get Payschedules

Description​

Get all payschedules of a tenant

Parameters​
NameLocated inDescriptionRequiredSchema
orderqueryOrderNostring
fieldqueryFieldNostring
limitqueryLimit per PageNointeger
currentPagequeryCurrent Page numberNointeger
searchStringquerySearch StringNostring
Responses​
CodeDescriptionSchema
200OKdto.SchedulesResponse
Request URL​
https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedules/tenant?limit=20&currentPage=1&order=desc&field=_id
Curl​
curl --location --request GET 'https://bifrost-us.deskera.com/v1/people-pay-schedule/pay-schedules/tenant?limit=20&currentPage=1&order=desc&field=_id' \
--header 'Accept: application/json, text/plain, */*' \
--header 'x-access-token: sampletoken' \
Sample Response​
{
"schedules": [
{
"id": "6359f7029baf6fc88bb19d39",
"name": "oct-payschedule",
"payPeriod": "monthly",
"workWeek": [
5,
1,
2,
3,
4
],
"payDay": "lastWorkingDayMonth",
"firstPayDay": "",
"secondPayDay": "",
"firstPayDate": "2022-10-31T23:59:59+08:00",
"workPeriod": {
"from": "01/10/2022",
"to": "31/10/2022"
},
"isForAllUsers": false,
"employees": [
"63525be29f4afb9427b6f509",
"6310886bc741a206031c257c"
],
"location": 0,
"customFields": [
{
"fieldId": "6323d1eeaabe99169d328446",
"fieldName": "C1",
"fieldValue": [
"c1"
]
}
]
},
{
"id": "62611056bac41ace51e7dcb8",
"name": "monthly",
"payPeriod": "monthly",
"workWeek": [
5,
1,
2,
3,
4
],
"payDay": "lastWorkingDayMonth",
"firstPayDay": "",
"secondPayDay": "",
"firstPayDate": "2022-04-30T23:59:59+08:00",
"workPeriod": {
"from": "01/04/2022",
"to": "30/04/2022"
},
"isForAllUsers": false,
"employees": [
"623c2dc0e3a652c5aee32876"
],
"location": 0,
"customFields": null
}
],
"filterResponse": {
"currentPage": 1,
"count": 2,
"limit": 20,
"totalPages": 1,
"totalCount": 2
}
}
Security​
Security SchemaScopes
ApiKeyAuth

Bulk delete payschedules​

DELETE​

Summary​

Bulk Delete Payschedules By Ids

Description​

Bulk Delete Payschedules By Ids for a Tenant

Parameters​
NameLocated inDescriptionRequiredSchema
idsbodyPayschedule IdsYes[ dto.BulkScheduleRequest ]
Responses​
CodeDescriptionSchema
200OKdto.Schedule
Security​
Security SchemaScopes
ApiKeyAuth

Models​

dto.BulkScheduleRequest​

NameTypeDescriptionRequired
scheduleIdstringNo

dto.CustomFieldsData​

NameTypeDescriptionRequired
fieldIdstringNo
fieldNamestringNo
fieldValue[ string ]No

dto.FilterResponse​

NameTypeDescriptionRequired
countintegerNo
currentPageintegerNo
limitintegerNo
totalCountintegerNo
totalPagesintegerNo

dto.Schedule​

NameTypeDescriptionRequired
customFields[ dto.CustomFieldsData ]No
employees[ string ]No
firstPayDatestringNo
firstPayDaystringNo
idstringNo
isForAllUsersbooleanNo
locationstringNo
namestringNo
payDaystringNo
payPeriodstringNo
secondPayDaystringNo
workPerioddto.WorkPeriodNo
workWeek[ integer ]No

dto.SchedulesResponse​

NameTypeDescriptionRequired
filterResponsedto.FilterResponseNo
schedules[ dto.Schedule ]No

dto.WorkPeriod​

NameTypeDescriptionRequired
fromstringNo
tostringNo