Skip to main content

Reading Schedules via the API

How to read Scheduling data via our open API

Written by Kent
Updated over 10 months ago

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.

  1. {

  2. "Items": [

  3. {

  4. "Id": "string", // The id of the scheduled record

  5. "Name": "string", // The name of the scheduled record

  6. "UserId": "string", // The id of the user the record is assigned to

  7. "CreatedOn": "2025-05-09T13:55:27.234Z", // When the record was created

  8. "Start": "2025-05-09T13:55:27.234Z", // When the record starts

  9. "End": "2025-05-09T13:55:27.234Z", // When the record ends

  10. "LocationId": "string", // The location the record is scheduled at

  11. "PayrollCode": "string", // The payroll code assigned to the record

  12. "RecordType": "Shift", // The type of record "Shift" | "Leave"

  13. "BreakDuration": 0, // The total duration in minutes of the breaks on the record

  14. "PaidBreakDuration": 0, // The duration in minutes of the paid break on the record

  15. "UnpaidBreakDuration": 0, // The duration in minutes of the unpaid break on the record

  16. "LeaveRequestId": "string", // The leave request id of the record, if it is a leave record

  17. "LeaveTypeId": "string", // The leave type id of the record, if it is a leave record

  18. "JournalSource": "Scheduler", // The source that created the record

  19. "AmendedAfterAutoschedule": true, // Whether or not the record has been modifed after it was created by autoscheduling (if it was)

  20. "Tasks": [ // A collection of the Tasks that make up the record

  21. {

  22. "Name": "string", // The task name

  23. "Start": "2025-05-09T13:55:27.234Z", // The task start time

  24. "End": "2025-05-09T13:55:27.234Z", // The task end time

  25. "LocationId": "string", // Where the task is scheduled for

  26. "Room": "string" // The room the task is scheduled for

  27. }

  28. ],

  29. "LastModifiedAt": "2025-05-09T13:55:27.234Z" // When the record was last modified

  30. }

  31. ],

  32. "Pagination": {

  33. "PageNumber": 0,

  34. "PageSizeRequested": 0,

  35. "ItemsCount": 0,

  36. "HasMore": true // If true, there are more records to fetch at the next page

  37. }

  38. }


Did this answer your question?