Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Company Shift

Update a shift record

put

Updates an existing shift record by ID. Only provided fields will be updated.

Path parameters
shiftIdstringRequired

Shift ID

Body

Shift update data

startTimestringOptional

Start time of the shift

Example: 09:00
endTimestringOptional

End time of the shift

Example: 17:00
weekDaysinteger · int32[]Optional

Days of the week when the shift applies. Values: 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday

Example: [1,2,3,4,5]
Responses
200

Shift updated successfully

No content

put/api/v1/company/shift/{shiftId}
PUT /api/v1/company/shift/{shiftId} HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "startTime": "09:00",
  "endTime": "17:00",
  "weekDays": [
    1,
    2,
    3,
    4,
    5
  ]
}

No content

Create a new shift record

post

Creates a new shift record for an employee. A shift defines working hours and days of the week when the employee should work.

Path parameters
companyIdstringRequired

Company ID

employeeIdstringRequired

Employee ID

Body

Shift creation data

startTimestringRequired

Start time of the shift

Example: 09:00
endTimestringRequired

End time of the shift

Example: 17:00
weekDaysinteger · int32[]Required

Days of the week when the shift applies. Values: 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday

Example: [1,2,3,4,5]
Responses
200

Shift created successfully

application/json
idstringOptionalExample: 64f8a0e2d5b7c9a1e3f4a5b6
companyIdstringOptionalExample: 64f8a0e2d5b7c9a1e3f4a5b6
employeeIdstringOptionalExample: 64f8a0e2d5b7c9a1e3f4a5b6
startTimestringOptional
endTimestringOptional
weekDaysinteger · int32[]Optional
post/api/v1/company/shift/{companyId}/user/{employeeId}
POST /api/v1/company/shift/{companyId}/user/{employeeId} HTTP/1.1
Host: api.happyforce.com
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "startTime": "09:00",
  "endTime": "17:00",
  "weekDays": [
    1,
    2,
    3,
    4,
    5
  ]
}
{
  "id": "64f8a0e2d5b7c9a1e3f4a5b6",
  "companyId": "64f8a0e2d5b7c9a1e3f4a5b6",
  "employeeId": "64f8a0e2d5b7c9a1e3f4a5b6",
  "startTime": "text",
  "endTime": "text",
  "weekDays": [
    1
  ]
}

Get shifts for a company

get

Retrieves all shift records for a company. Supports pagination.

Path parameters
companyIdstringRequired

Company ID

Query parameters
fromintegerOptional

Starting index for pagination (default: 0)

Default: 0
tointegerOptional

Ending index for pagination (default: 10)

Default: 10
Responses
200

Successfully retrieved shifts

application/json
idstringOptionalExample: 64f8a0e2d5b7c9a1e3f4a5b6
companyIdstringOptionalExample: 64f8a0e2d5b7c9a1e3f4a5b6
employeeIdstringOptionalExample: 64f8a0e2d5b7c9a1e3f4a5b6
startTimestringOptional
endTimestringOptional
weekDaysinteger · int32[]Optional
get/api/v1/company/shift/{companyId}
GET /api/v1/company/shift/{companyId} HTTP/1.1
Host: api.happyforce.com
Accept: */*
200

Successfully retrieved shifts

{
  "id": "64f8a0e2d5b7c9a1e3f4a5b6",
  "companyId": "64f8a0e2d5b7c9a1e3f4a5b6",
  "employeeId": "64f8a0e2d5b7c9a1e3f4a5b6",
  "startTime": "text",
  "endTime": "text",
  "weekDays": [
    1
  ]
}

Last updated