Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

When I Work Shifts API

Shifts provide the basis for scheduling. Many other objects, including Schedules (aka Locations), Positions, Sites, Users, Tasks, and Tags all link through Shifts.For more information about how to use Shifts, visit the [Help Center](https://help.wheniwork.com/article-categories/scheduling-your-team/).

When I Work Shifts API is one of 22 APIs that When I Work publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 8 JSON Schema definitions.

Tagged areas include Shifts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, rate-limit docs, and 8 JSON Schemas.

This API exposes 17 operations across 13 paths, and defines 13 schemas. It is described by OpenAPI 3.0.3, at version 1.0.0.

Requests are made against a single base URL, https://api.wheniwork.com.

17 operations 13 paths 13 schemas 2 DELETE6 GET7 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.0.0
Base URL
https://api.wheniwork.com/2
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

When I Work Shifts API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (JSON Web Token) (W-Token). By default, every request must be authenticated.

  • W-Token — Authentication with When I Work is based on a token model using [JSON Web Tokens](https://jwt.io/). First, you authenticate using a private developer key and t…

Paths & Operations 17

Across 13 paths, the API surfaces 17 operations — 2 DELETE, 6 GET, 7 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Shifts 17

Shifts provide the basis for scheduling. Many other objects, including Schedules (aka Locations), Positions, Sites, Users, Tasks, and Tags all link through Shifts. For more inform…

GET
/2/shifts
List Shifts
16 params → 200
POST
/2/shifts
Create Shift
1 param body → 200
DELETE
/2/shifts
Bulk Delete Shifts
2 params body → 200400403404500
GET
/2/shifts/{id}
Get Shift
2 params → 200
PUT
/2/shifts/{id}
Update Shift
2 params body → 200
DELETE
/2/shifts/{id}
Delete Shift
3 params → 200403404500
POST
/2/shifts/unassign
Unassign/Release Shifts
body → 200
POST
/2/shifts/{id}/assign
Assign multiple users to an OpenShift
1 param body → 200
GET
/2/shifts/eligible
List eligible users for OpenShift
8 params → 200
GET
/2/shifts/{id}/history
Fetch shift history
2 params → 200
POST
/2/shifts/publish
Publish Shifts
body → 200
POST
/2/shifts/unpublish
Unpublish Shifts
body → 200
POST
/2/shifts/notify
Notify shifts
body → 200
POST
/2/shifts/notify/{id}
Notify single shift
1 param body → 200
PUT
/2/shifts/bulk
Bulk Update Shifts
1 param body → 200400
GET
/2/shifts/{id}/swapusers
List swap users
4 params → 200
GET
/v3/auto-assign
List Auto Scheduled shifts
12 params → 200400401

Schemas 13

The contract defines 13 schemas that model the data the API accepts and returns. The most detailed are Shift (30 properties), User (23 properties), schemas-Shift (18 properties), ShiftBulk (16 properties). Each schema is shown below with its type and property counts.

Chain
object
4 properties
ShiftChain
object
7 properties
V2Error
object
2 properties 1 required
ShiftBulk
object
16 properties 4 required
Error
object
1 property 1 required
BaseScheduledBreak
object
9 properties 2 required
Shift
object
30 properties 3 required
User
object
23 properties
OpenShiftApprovalRequest
object
12 properties
ShiftScheduledBreak
ShiftHistory
object
2 properties 3 required
OpenShiftApprovalRequestUser
object
4 properties
schemas-Shift
object
18 properties 3 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

when-i-work-shifts-api-openapi.yml Raw ↑

Other APIs When I Work publishes across the network.

When I Work Accounts API
When I Work Annotations API
When I Work Availabilities API
When I Work Import API
When I Work OpenShift Requests API
When I Work Payrolls API
When I Work Positions API
When I Work Punch API
When I Work Request Type API
When I Work Schedule Templates API
When I Work Schedules (Locations) API
When I Work Shift Break - Paid Rest API