Skip to main content

When_i_work

When I Work is a workforce management platform for employee scheduling, time tracking, and team communication. Its REST API exposes users, schedules, shifts, time entries, payroll, and related account resources so businesses can automate staffing and labor-data workflows. Nexla connects to the When I Work API to ingest these resources into Nexsets and to write scheduling and time-tracking records back to your account.

When_i_work icon

Power end-to-end data operations for your When_i_work API with Nexla. Our bi-directional When_i_work connector is purpose-built for When_i_work, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to When_i_work or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your When_i_work workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

When I Work API access is granted to approved developers and partners. Before creating a credential in Nexla, you must obtain a W-Token API token from When I Work. Authentication uses a token model: you exchange a private developer key (the W-Key) together with a When I Work user's email and password for a token, which is then sent in the W-Token request header on all subsequent API calls.

To obtain a token, follow these steps:

  1. Request API access from When I Work if you do not already have it. See Getting Access to the When I Work API for how to request a developer key (W-Key) for your account.

  2. Once you have your developer key, authenticate by sending a POST request to the login endpoint (https://api.login.wheniwork.com/login) with your developer key in the W-Key header and the target user's email and password in the JSON request body.

  3. A successful login returns a person object that includes a token value. This token is your W-Token and is used to authenticate all subsequent requests to the When I Work API.

  4. Copy the token and store it securely, as you will need it to configure your Nexla credential.

Tokens expire seven days after they are issued, so plan to refresh the token before it lapses if you use it for a long-running integration. For full details on authentication, endpoints, and request and response formats, refer to the When I Work API documentation.

Authenticate

Credentials required

Authenticate to When_i_work using a W-Token API token.

FieldRequiredSecretDescription
API TokenYesNoWhen I Work API token sent in the W-Token request header.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Enter your When I Work API token in the API Token field. This is the token value returned from the When I Work login endpoint, which Nexla sends in the W-Token request header to authenticate API calls.

    When I Work tokens expire seven days after they are issued. If your integration stops authenticating, generate a fresh token and update this credential. If your token is compromised, revoke access and issue a new one.

    For detailed information about authentication and available endpoints, see the When I Work API documentation.

  4. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the When_i_work connector tile, then select the credential that will be used to connect to the When I Work account, and click Next; or, create a new When_i_work credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common When I Work endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

[Rest API] List Users

This endpoint template retrieves users from your When I Work account. Use it to ingest the employees and other people associated with the account for reporting, syncing, or downstream integration.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Account

This endpoint template retrieves account information from When I Work. Use it to ingest account-level details for reference or reporting.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Payrolls

This endpoint template retrieves payrolls from your When I Work account. Use it to ingest payroll records for labor-cost analysis, reporting, or integration with downstream systems.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Timezones

This endpoint template retrieves the timezones available in When I Work. Use it as a reference dataset for mapping and normalizing time-based data.

  • This endpoint returns the full set of timezone records in a single request.

[Rest API] List Payrolls Notices

This endpoint template retrieves payroll notices from When I Work. Use it to ingest payroll-related notices for review, auditing, or downstream processing.

  • This endpoint returns the available notice records in a single request.

[Rest API] List Times

This endpoint template retrieves time entries (clock-in and clock-out records) from When I Work. Use it to ingest worked-time data for payroll, labor tracking, and reporting.

  • This endpoint returns the available time records in a single request.

[Rest API] List Requests

This endpoint template retrieves time-off and other requests from When I Work. Use it to ingest employee requests for approval tracking, reporting, or integration.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Blocks

This endpoint template retrieves scheduling blocks from When I Work. Use it to ingest block records for schedule analysis and reporting.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Sites

This endpoint template retrieves sites from your When I Work account. Use it to ingest site records for location-based scheduling and reporting.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Locations

This endpoint template retrieves locations from your When I Work account. Use it to ingest location records for mapping shifts and staffing to physical places.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

[Rest API] List Positions

This endpoint template retrieves positions from When I Work. Use it to ingest position records for role-based scheduling and reporting.

  • This endpoint returns the available position records in a single request.

[Rest API] List Openshiftapprovalrequests

This endpoint template retrieves open-shift approval requests from When I Work. Use it to ingest pending approval records for open shifts for tracking and reporting.

  • This endpoint returns paginated results. Nexla automatically follows the pages to fetch the complete set of records.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

When_i_work data sources can also be manually configured to ingest data from any valid When I Work API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new When_i_work data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the When_i_work destination, and select the Send to Destination option from the menu. Select the When_i_work connector from the list of available destination connectors, then select the credential that will be used to connect to the When I Work account, and click Next; or, create a new When_i_work credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common When I Work endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

[Rest API] Create Shift

This endpoint template creates a new shift in your When I Work account using records from a Nexset. Use it to automatically add shifts to your schedule based on data from your Nexla flows.

  • Each record from your Nexset is sent as a separate request with the shift data in the JSON request body. The body must match the shift structure expected by the When I Work API.

[Rest API] Update Shift

This endpoint template updates an existing shift, identified by its Shift ID, using records from a Nexset. Use it to modify scheduled shifts based on data from your Nexla flows.

  • This endpoint requires a Shift ID — the unique identifier of the shift to update. Each record from your Nexset is sent as a separate request with the updated shift data in the JSON request body.

[Rest API] Delete Shift

This endpoint template deletes a shift, identified by its Shift ID, from your When I Work account. Use it to remove shifts based on data from your Nexla flows.

  • This endpoint requires a Shift ID — the unique identifier of the shift to delete. Each record from your Nexset triggers a separate delete request.

[Rest API] Create User

This endpoint template creates a new user (employee) in your When I Work account using records from a Nexset. Use it to automatically add employees based on data from your Nexla flows.

  • Each record from your Nexset is sent as a separate request with the user data in the JSON request body. The body must match the user structure expected by the When I Work API.

[Rest API] Create Time Entry

This endpoint template creates a new time entry (a clock-in and clock-out record) in your When I Work account using records from a Nexset. Use it to automatically record worked time based on data from your Nexla flows.

  • Each record from your Nexset is sent as a separate request with the time-entry data in the JSON request body. The body must match the time-entry structure expected by the When I Work API.

Manual configuration

When_i_work destinations can also be manually configured to send data to any valid When I Work API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

When I Work APIs expect JSON format for write operations. For update and delete operations, include the ID of the object to be modified in the endpoint URL.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured When I Work endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the When I Work endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.