Q3 Roadmap: Embedded Notifications, Embedded Commissions, Tips and more!
curl --location --request POST '/api/organizations//time-off-requests' \
--header 'Content-Type: application/json' \
--data-raw '{
"locationId": "123e4567-e89b-12d3-a456-426614174000",
"employee": {
"externalEmployeeId": "string",
"name": "string",
"payrollId": "string"
},
"policyId": "123e4567-e89b-12d3-a456-426614174000",
"startTime": "2021-01-01T00:00:00.000Z",
"endTime": "2021-01-01T00:00:00.000Z",
"note": "I need to take time off",
"hourConfiguration": [
{
"date": "2021-01-01",
"hours": 8
},
{
"date": "2021-01-02",
"hours": 4
}
],
"timezone": "America/New_York",
"utcOffset": 240,
"isAllDay": false
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"locationId": "123e4567-e89b-12d3-a456-426614174000",
"workerId": "123e4567-e89b-12d3-a456-426614174000",
"policyId": "123e4567-e89b-12d3-a456-426614174000",
"policy": {
"id": "string",
"name": "string",
"organizationId": "string",
"allowNegativeBalance": true,
"assignedStaffCount": 0,
"carryoverLimit": 0,
"defaultSettings": {
"assignedStaff": {
"type": "Role",
"value": "string"
}
},
"fullDayDuration": 0,
"limitSettings": {
"isFixedAmount": true,
"fixedAmount": {
"hours": 0,
"daysEarned": 0,
"accrualCycle": "AllAtOnce",
"accrualFrequency": "EveryOneWeek",
"accrualDay": "Sunday",
"accrualDate": "1st"
},
"perHourEarnings": {
"hoursEarned": 0,
"hoursWorked": 0,
"isLimitedMaximumBalance": true,
"maximumHoursBalance": 0
}
},
"paid": true,
"requiresApproval": true,
"status": "Draft",
"type": {
"id": "string",
"name": "string",
"type": "Sick"
},
"typeId": "string",
"units": "days",
"createdAt": "string",
"updatedAt": "string"
},
"startTime": "2021-01-01T00:00:00.000Z",
"endTime": "2021-01-01T00:00:00.000Z",
"status": "pending",
"note": "I need to take time off",
"hourConfiguration": [
{
"date": "2021-01-01",
"hours": 8
},
{
"date": "2021-01-02",
"hours": 4
}
],
"timezone": "America/New_York",
"utcOffset": 240,
"isAllDay": false,
"submittedAt": "2021-01-01T00:00:00.000Z",
"remainingBalance": 10,
"totalHours": 10,
"workerPolicy": {
"id": "string",
"name": "Policy 1",
"hoursBalance": 0,
"isIncluded": true,
"availableBalance": 0
}
}