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 Payrolls API

Payrolls allows you to select a pay period date range and hours worked within that range. Default range if not supplied is today + 3 days.> Please note that payrolls cannot be created or deleted via the APIFor more info about managing Payroll, visit the [Help Center](https://help.wheniwork.com/articles/close-and-export-payroll/).

When I Work Payrolls 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 Payrolls. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, rate-limit docs, and 8 JSON Schemas.

This API exposes 5 operations across 4 paths, and defines 11 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.

5 operations 4 paths 11 schemas 4 GET1 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 Payrolls 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 5

Across 4 paths, the API surfaces 5 operations — 4 GET, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Payrolls 5

Payrolls allows you to select a pay period date range and hours worked within that range. Default range if not supplied is today + 3 days. Please note that payrolls cannot be crea…

GET
/2/payrolls
List Payrolls
2 params → 200
GET
/2/payrolls/{id}
Get Payroll
1 param → 200
PUT
/2/payrolls/{id}
Update Payroll
body → 200
GET
/2/payrolls/{id}/stats
Get Payroll Statistics for current hours
2 params → 200
GET
/2/payrolls/notices
List Notices
2 params → 200403

Schemas 11

The contract defines 11 schemas that model the data the API accepts and returns. The most detailed are Shift (30 properties), Time (27 properties), Absence (16 properties), Punch (16 properties). Each schema is shown below with its type and property counts.

ShiftScheduledBreak
Notice
object
8 properties
Absence
object
16 properties 6 required
Time
object
27 properties
BaseScheduledBreak
object
9 properties 2 required
Payroll
object
Payroll is a pay period (start and end) and a collection paid hours (worked or paid time off) within that pay period.
14 properties
Punch
object
16 properties
Shift
object
30 properties 3 required
PayrollHours
object
The paid time for users within a given payroll (broken out by type, split as needed when crossing pay periods)
9 properties
AbsenceActions
object
6 properties 3 required
V2Error
object
2 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

when-i-work-payrolls-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 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
When I Work Shift Breaks API