Schedule data can be read from the API via the following endpoints:
GET /api/v1/schedule/users/{userId}
GET /api/v1/schedule/locations/{locationId}
Query Parameters:
from
Description: Start date from which records will be fetched.
Type:
date-time
e.g. β2025-01-01T09:00:00βLocation:
query
Default: No start date filtering
to
Description: End date until which records will be fetched.
Type:
date-time
e.g. β2025-01-01T17:00:00βLocation:
query
Default: No end date filtering
recordType
Description: Type of records (1: shift; 2: Leave) that should be fetched.
Type:
string
Location:
query
Default: All types
listingOptions.sort
Description: Sorting field for pages sorting.
Type:
string
Location:
query
Default: Scheduler record start time
listingOptions.pageSize
Description: Page size.
Type:
integer
Location:
query
listingOptions.page
Description: Zero-based page number.
Type:
integer
Location:
query
Default: 0
listingOptions.order
Description: Sorting order.
Type:
string
Location:
query
Default: Ascending
Data Returned:
Both return the same paginated schema, where the user focused one returns records belonging to the user, and the location focused one returns records belonging to the location.
{
"Items": [
{
"Id": "string", // The id of the scheduled record
"Name": "string", // The name of the scheduled record
"UserId": "string", // The id of the user the record is assigned to
"CreatedOn": "2025-05-09T13:55:27.234Z", // When the record was created
"Start": "2025-05-09T13:55:27.234Z", // When the record starts
"End": "2025-05-09T13:55:27.234Z", // When the record ends
"LocationId": "string", // The location the record is scheduled at
"PayrollCode": "string", // The payroll code assigned to the record
"RecordType": "Shift", // The type of record "Shift" | "Leave"
"BreakDuration": 0, // The total duration in minutes of the breaks on the record
"PaidBreakDuration": 0, // The duration in minutes of the paid break on the record
"UnpaidBreakDuration": 0, // The duration in minutes of the unpaid break on the record
"LeaveRequestId": "string", // The leave request id of the record, if it is a leave record
"LeaveTypeId": "string", // The leave type id of the record, if it is a leave record
"JournalSource": "Scheduler", // The source that created the record
"AmendedAfterAutoschedule": true, // Whether or not the record has been modifed after it was created by autoscheduling (if it was)
"Tasks": [ // A collection of the Tasks that make up the record
{
"Name": "string", // The task name
"Start": "2025-05-09T13:55:27.234Z", // The task start time
"End": "2025-05-09T13:55:27.234Z", // The task end time
"LocationId": "string", // Where the task is scheduled for
"Room": "string" // The room the task is scheduled for
}
],
"LastModifiedAt": "2025-05-09T13:55:27.234Z" // When the record was last modified
}
],
"Pagination": {
"PageNumber": 0,
"PageSizeRequested": 0,
"ItemsCount": 0,
"HasMore": true // If true, there are more records to fetch at the next page
}
}