openapi: 3.1.0 info: title: Workday Integration Workday Time Tracking API description: >- API for time entry, attendance, absence management, and scheduling. Supports clock events, time block management, time review events, and validation of worker time records. version: v1 contact: name: Workday API Support email: api-support@workday.com url: https://community.workday.com license: name: Proprietary url: https://www.workday.com/en-us/legal/site-terms.html servers: - url: https://{baseUrl}/ccx/api/timeTracking/v1/{tenant} description: Workday Time Tracking REST API server variables: baseUrl: default: wd2-impl-services1.workday.com description: The Workday data center hostname tenant: default: tenant description: The Workday tenant name security: - OAuth2: - r:timeTracking - w:timeTracking paths: /timeClockEvents: post: operationId: createTimeClockEvent summary: Workday Integration Create a time clock event description: >- Records a time clock event such as a clock-in or clock-out for a worker. tags: - Clock Events requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TimeClockEventRequest' responses: '201': description: Time clock event created successfully content: application/json: schema: $ref: '#/components/schemas/TimeClockEvent' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /timeValidations: get: operationId: getTimeValidations summary: Workday Integration Retrieve time validation results description: >- Returns time validation results for worker time entries, identifying errors and warnings that need to be resolved. tags: - Validations parameters: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' responses: '200': description: Successful response with time validations content: application/json: schema: $ref: '#/components/schemas/TimeValidationsResponse' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /workerTimeBlocks: get: operationId: getWorkerTimeBlocks summary: Workday Integration Retrieve worker time blocks description: >- Returns a collection of time blocks representing worked hours for workers. tags: - Time Blocks parameters: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' responses: '200': description: Successful response with worker time blocks content: application/json: schema: $ref: '#/components/schemas/TimeBlocksResponse' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /workerTimeBlocks/{ID}: get: operationId: getWorkerTimeBlockById summary: Workday Integration Retrieve a specific worker time block description: >- Returns the specified worker time block with start and end times. tags: - Time Blocks parameters: - $ref: '#/components/parameters/ID' responses: '200': description: Successful response with the time block content: application/json: schema: $ref: '#/components/schemas/TimeBlock' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /workers/{ID}/timeReviewEvents: post: operationId: createTimeReviewEvent summary: Workday Integration Create a time review event for a worker description: >- Initiates a time review event for the specified worker to approve or adjust time entries. tags: - Time Reviews parameters: - $ref: '#/components/parameters/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TimeReviewEventRequest' responses: '201': description: Time review event created successfully content: application/json: schema: $ref: '#/components/schemas/TimeReviewEvent' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' components: securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://{baseUrl}/authorize tokenUrl: https://{baseUrl}/oauth2/{tenant}/token refreshUrl: https://{baseUrl}/oauth2/{tenant}/token scopes: r:timeTracking: Read time tracking data w:timeTracking: Write time tracking data parameters: ID: name: ID in: path required: true description: The Workday ID of the resource schema: type: string limit: name: limit in: query description: The maximum number of objects in a single response (default 20, maximum 100) schema: type: integer default: 20 maximum: 100 offset: name: offset in: query description: The zero-based index of the first object in a response collection schema: type: integer default: 0 responses: BadRequest: description: Invalid request parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Forbidden: description: Insufficient permissions content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' schemas: ErrorResponse: type: object properties: error: type: string errors: type: array items: type: object properties: error: type: string field: type: string message: type: string ResourceReference: type: object properties: id: type: string descriptor: type: string href: type: string format: uri TimeClockEvent: type: object properties: id: type: string descriptor: type: string worker: $ref: '#/components/schemas/ResourceReference' eventType: type: string enum: - Clock_In - Clock_Out eventDateTime: type: string format: date-time timeZone: type: string TimeClockEventRequest: type: object required: - worker - eventType - eventDateTime properties: worker: $ref: '#/components/schemas/ResourceReference' eventType: type: string enum: - Clock_In - Clock_Out eventDateTime: type: string format: date-time timeZone: type: string TimeBlock: type: object properties: id: type: string descriptor: type: string worker: $ref: '#/components/schemas/ResourceReference' date: type: string format: date startTime: type: string format: date-time endTime: type: string format: date-time totalHours: type: number timeCode: $ref: '#/components/schemas/ResourceReference' TimeBlocksResponse: type: object properties: total: type: integer data: type: array items: $ref: '#/components/schemas/TimeBlock' TimeValidationsResponse: type: object properties: total: type: integer data: type: array items: type: object properties: id: type: string descriptor: type: string worker: $ref: '#/components/schemas/ResourceReference' severity: type: string enum: - Error - Warning message: type: string date: type: string format: date TimeReviewEvent: type: object properties: id: type: string descriptor: type: string worker: $ref: '#/components/schemas/ResourceReference' reviewPeriodStartDate: type: string format: date reviewPeriodEndDate: type: string format: date status: type: string TimeReviewEventRequest: type: object required: - reviewPeriodStartDate - reviewPeriodEndDate properties: reviewPeriodStartDate: type: string format: date reviewPeriodEndDate: type: string format: date tags: - name: Clock Events - name: Time Blocks - name: Time Reviews - name: Validations