Workday Payroll API

Core API for managing payroll processes including payroll calculations, employee pay data, deductions, earnings, and payroll runs.

Documentation

Specifications

Examples

📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-calculation-status-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-create-pay-run-request-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-deduction-code-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-deduction-code-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-deduction-code-ref-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-deduction-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-deduction-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-earning-code-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-earning-code-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-earning-code-ref-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-earning-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-earning-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-pay-group-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-pay-group-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-pay-group-ref-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-pay-period-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-pay-run-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-pay-run-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-update-pay-run-request-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-worker-collection-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-worker-payroll-details-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/payroll-worker-ref-example.json
📝
Example
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/examples/workday-payroll-list-pay-runs-example.json

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-calculation-status-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-create-pay-run-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-deduction-code-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-deduction-code-ref-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-deduction-code-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-deduction-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-deduction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-earning-code-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-earning-code-ref-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-earning-code-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-earning-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-earning-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-pay-group-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-pay-group-ref-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-pay-group-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-pay-period-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-pay-run-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-pay-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-update-pay-run-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-worker-collection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-worker-payroll-details-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-schema/payroll-worker-ref-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-calculation-status-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-create-pay-run-request-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-deduction-code-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-deduction-code-ref-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-deduction-code-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-deduction-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-deduction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-earning-code-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-earning-code-ref-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-earning-code-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-earning-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-earning-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-pay-group-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-pay-group-ref-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-pay-group-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-pay-period-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-pay-run-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-pay-run-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-update-pay-run-request-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-worker-collection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-worker-payroll-details-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/json-structure/payroll-worker-ref-structure.json

Other Resources

OpenAPI Specification

workday-payroll-payroll-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Workday Payroll API
  description: >-
    Core API for managing payroll processes within the Workday platform,
    including payroll calculations, employee pay data, deductions, earnings,
    payroll runs, and pay group configurations.
  version: v1
  contact:
    name: Workday Support
    url: https://www.workday.com/en-us/company/customer-support.html
    email: [email protected]
  termsOfService: https://www.workday.com/en-us/legal.html
externalDocs:
  description: Workday Payroll API Documentation
  url: https://community.workday.com/sites/default/files/file-hosting/productionapi/index.html
servers:
- url: https://api.workday.com/payroll/v1
  description: Workday Payroll Production
- url: https://{tenant}.workday.com/api/payroll/v1
  description: Workday Payroll Tenant-Specific
  variables:
    tenant:
      description: Workday tenant identifier
      default: your-tenant
tags:
- name: Deductions
  description: Manage deduction codes and worker deductions
- name: Earnings
  description: Manage earning codes and worker earnings
- name: Pay Groups
  description: Configure and manage pay groups for organizing payroll
- name: Pay Runs
  description: Manage payroll processing runs and their lifecycle
- name: Payroll Calculations
  description: Trigger and monitor payroll calculation processes
- name: Workers
  description: Access worker payroll data and compensation details
security:
- bearerAuth: []
paths:
  /payRuns:
    get:
      operationId: listPayRuns
      summary: Workday Payroll List Pay Runs
      description: >-
        Retrieve a collection of payroll runs, optionally filtered by status,
        pay group, or date range.
      tags:
      - Pay Runs
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: payGroupId
        in: query
        description: Filter by pay group identifier
        schema:
          type: string
        example: pg_weekly_usd
      - name: status
        in: query
        description: Filter by pay run status
        schema:
          type: string
          enum:
          - Draft
          - InProgress
          - Completed
          - Cancelled
        example: Draft
      - name: fromDate
        in: query
        description: Filter pay runs starting from this date
        schema:
          type: string
          format: date
        example: '2026-04-30'
      - name: toDate
        in: query
        description: Filter pay runs up to this date
        schema:
          type: string
          format: date
        example: '2026-04-30'
      responses:
        '200':
          description: Collection of pay runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayRunCollection'
              examples:
                ListPayRuns200Example:
                  summary: Default listPayRuns 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: pr_20260430_weekly_001
                      descriptor: Weekly USD Pay Group
                      payGroup:
                        id: pg_weekly_usd
                        descriptor: Weekly USD Pay Group
                      payPeriod:
                        startDate: '2026-04-30'
                        endDate: '2026-04-30'
                      status: Draft
                      runCategory: Regular
                      paymentDate: '2026-04-30'
                      totalGrossPay: 245830.5
                      totalNetPay: 178452.3
                      totalDeductions: 38210.8
                      totalTaxes: 29167.4
                      workerCount: 87
                      currency: USD
                      createdOn: '2026-04-30T16:45:00Z'
                      completedOn: '2026-04-30T16:45:00Z'
                    total: 52
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createPayRun
      summary: Workday Payroll Create a Pay Run
      description: >-
        Initiate a new payroll run for a specified pay group and pay period.
      tags:
      - Pay Runs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayRunRequest'
            examples:
              CreatePayRunRequestExample:
                summary: Default createPayRun request
                x-microcks-default: true
                value:
                  payGroupId: pg_weekly_usd
                  payPeriod:
                    startDate: '2026-04-30'
                    endDate: '2026-04-30'
                  runCategory: Regular
                  paymentDate: '2026-04-30'
      responses:
        '201':
          description: Pay run created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayRun'
              examples:
                CreatePayRun201Example:
                  summary: Default createPayRun 201 response
                  x-microcks-default: true
                  value:
                    id: pr_20260430_weekly_001
                    descriptor: Weekly USD Pay Group
                    payGroup:
                      id: pg_weekly_usd
                      descriptor: Weekly USD Pay Group
                    payPeriod:
                      startDate: '2026-04-30'
                      endDate: '2026-04-30'
                    status: Draft
                    runCategory: Regular
                    paymentDate: '2026-04-30'
                    totalGrossPay: 245830.5
                    totalNetPay: 178452.3
                    totalDeductions: 38210.8
                    totalTaxes: 29167.4
                    workerCount: 87
                    currency: USD
                    createdOn: '2026-04-30T16:45:00Z'
                    completedOn: '2026-04-30T16:45:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /payRuns/{payRunId}:
    get:
      operationId: getPayRun
      summary: Workday Payroll Get a Pay Run
      description: >-
        Retrieve details of a specific payroll run by its identifier.
      tags:
      - Pay Runs
      parameters:
      - $ref: '#/components/parameters/payRunId'
      responses:
        '200':
          description: Pay run details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayRun'
              examples:
                GetPayRun200Example:
                  summary: Default getPayRun 200 response
                  x-microcks-default: true
                  value:
                    id: pr_20260430_weekly_001
                    descriptor: Weekly USD Pay Group
                    payGroup:
                      id: pg_weekly_usd
                      descriptor: Weekly USD Pay Group
                    payPeriod:
                      startDate: '2026-04-30'
                      endDate: '2026-04-30'
                    status: Draft
                    runCategory: Regular
                    paymentDate: '2026-04-30'
                    totalGrossPay: 245830.5
                    totalNetPay: 178452.3
                    totalDeductions: 38210.8
                    totalTaxes: 29167.4
                    workerCount: 87
                    currency: USD
                    createdOn: '2026-04-30T16:45:00Z'
                    completedOn: '2026-04-30T16:45:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      operationId: updatePayRun
      summary: Workday Payroll Update a Pay Run
      description: >-
        Update the status or properties of an existing pay run.
      tags:
      - Pay Runs
      parameters:
      - $ref: '#/components/parameters/payRunId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayRunRequest'
            examples:
              UpdatePayRunRequestExample:
                summary: Default updatePayRun request
                x-microcks-default: true
                value:
                  status: Draft
                  paymentDate: '2026-04-30'
      responses:
        '200':
          description: Pay run updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayRun'
              examples:
                UpdatePayRun200Example:
                  summary: Default updatePayRun 200 response
                  x-microcks-default: true
                  value:
                    id: pr_20260430_weekly_001
                    descriptor: Weekly USD Pay Group
                    payGroup:
                      id: pg_weekly_usd
                      descriptor: Weekly USD Pay Group
                    payPeriod:
                      startDate: '2026-04-30'
                      endDate: '2026-04-30'
                    status: Draft
                    runCategory: Regular
                    paymentDate: '2026-04-30'
                    totalGrossPay: 245830.5
                    totalNetPay: 178452.3
                    totalDeductions: 38210.8
                    totalTaxes: 29167.4
                    workerCount: 87
                    currency: USD
                    createdOn: '2026-04-30T16:45:00Z'
                    completedOn: '2026-04-30T16:45:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /payRuns/{payRunId}/calculate:
    post:
      operationId: calculatePayRun
      summary: Workday Payroll Calculate a Pay Run
      description: >-
        Trigger payroll calculations for a specific pay run, processing all
        earnings, deductions, and taxes for included workers.
      tags:
      - Payroll Calculations
      parameters:
      - $ref: '#/components/parameters/payRunId'
      responses:
        '202':
          description: Calculation initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculationStatus'
              examples:
                CalculatePayRun202Example:
                  summary: Default calculatePayRun 202 response
                  x-microcks-default: true
                  value:
                    id: calc_20260430_00012
                    payRunId: pr_20260430_weekly_001
                    status: Queued
                    startedAt: '2026-04-30T16:45:00Z'
                    completedAt: '2026-04-30T16:45:00Z'
                    errors:
                    - error: INVALID_REQUEST
                      message: Validation failed for the provided fields.
                      details:
                      - field: amount
                        message: Validation failed for the provided fields.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /payRuns/{payRunId}/complete:
    post:
      operationId: completePayRun
      summary: Workday Payroll Complete a Pay Run
      description: >-
        Mark a pay run as completed, finalizing all payroll calculations
        and preparing payments for distribution.
      tags:
      - Pay Runs
      parameters:
      - $ref: '#/components/parameters/payRunId'
      responses:
        '200':
          description: Pay run completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayRun'
              examples:
                CompletePayRun200Example:
                  summary: Default completePayRun 200 response
                  x-microcks-default: true
                  value:
                    id: pr_20260430_weekly_001
                    descriptor: Weekly USD Pay Group
                    payGroup:
                      id: pg_weekly_usd
                      descriptor: Weekly USD Pay Group
                    payPeriod:
                      startDate: '2026-04-30'
                      endDate: '2026-04-30'
                    status: Draft
                    runCategory: Regular
                    paymentDate: '2026-04-30'
                    totalGrossPay: 245830.5
                    totalNetPay: 178452.3
                    totalDeductions: 38210.8
                    totalTaxes: 29167.4
                    workerCount: 87
                    currency: USD
                    createdOn: '2026-04-30T16:45:00Z'
                    completedOn: '2026-04-30T16:45:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /payGroups:
    get:
      operationId: listPayGroups
      summary: Workday Payroll List Pay Groups
      description: >-
        Retrieve all configured pay groups, which organize workers for
        payroll processing by frequency, currency, or other criteria.
      tags:
      - Pay Groups
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Collection of pay groups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayGroupCollection'
              examples:
                ListPayGroups200Example:
                  summary: Default listPayGroups 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: pg_weekly_usd
                      descriptor: Weekly USD Pay Group
                      payFrequency: Weekly
                      currency: USD
                      country: US
                      runCategory: example
                      workerCount: 87
                      inactive: false
                    total: 52
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /payGroups/{payGroupId}:
    get:
      operationId: getPayGroup
      summary: Workday Payroll Get a Pay Group
      description: >-
        Retrieve details of a specific pay group by its identifier.
      tags:
      - Pay Groups
      parameters:
      - $ref: '#/components/parameters/payGroupId'
      responses:
        '200':
          description: Pay group details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayGroup'
              examples:
                GetPayGroup200Example:
                  summary: Default getPayGroup 200 response
                  x-microcks-default: true
                  value:
                    id: pg_weekly_usd
                    descriptor: Weekly USD Pay Group
                    payFrequency: Weekly
                    currency: USD
                    country: US
                    runCategory: example
                    workerCount: 87
                    inactive: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /payGroups/{payGroupId}/workers:
    get:
      operationId: listPayGroupWorkers
      summary: Workday Payroll List Workers in a Pay Group
      description: >-
        Retrieve all workers assigned to a specific pay group.
      tags:
      - Pay Groups
      parameters:
      - $ref: '#/components/parameters/payGroupId'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Collection of workers in the pay group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkerCollection'
              examples:
                ListPayGroupWorkers200Example:
                  summary: Default listPayGroupWorkers 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: w_100542
                      descriptor: Weekly USD Pay Group
                    total: 52
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /workers/{workerId}/payrollDetails:
    get:
      operationId: getWorkerPayrollDetails
      summary: Workday Payroll Get Worker Payroll Details
      description: >-
        Retrieve payroll-specific details for a worker, including pay group
        assignment, payment method, and compensation summary.
      tags:
      - Workers
      parameters:
      - $ref: '#/components/parameters/workerId'
      responses:
        '200':
          description: Worker payroll details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkerPayrollDetails'
              examples:
                GetWorkerPayrollDetails200Example:
                  summary: Default getWorkerPayrollDetails 200 response
                  x-microcks-default: true
                  value:
                    workerId: w_100542
                    workerDescriptor: example
                    payGroup:
                      id: pg_weekly_usd
                      descriptor: Weekly USD Pay Group
                    paymentMethod: DirectDeposit
                    annualSalary: 95000.0
                    hourlyRate: 32.5
                    compensationFrequency: Annual
                    currency: USD
                    taxJurisdiction: US-Federal
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /workers/{workerId}/earnings:
    get:
      operationId: listWorkerEarnings
      summary: Workday Payroll List Worker Earnings
      description: >-
        Retrieve all earnings records for a specific worker, including
        regular pay, overtime, bonuses, and other earning types.
      tags:
      - Earnings
      parameters:
      - $ref: '#/components/parameters/workerId'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Collection of worker earnings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarningCollection'
              examples:
                ListWorkerEarnings200Example:
                  summary: Default listWorkerEarnings 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: ern_20260430_00301
                      earningCode:
                        id: REGULAR
                        descriptor: Weekly USD Pay Group
                      amount: 2500.0
                      hours: 40.0
                      rate: 32.5
                      effectiveDate: '2026-04-30'
                      payPeriod:
                        startDate: '2026-04-30'
                        endDate: '2026-04-30'
                    total: 52
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /workers/{workerId}/deductions:
    get:
      operationId: listWorkerDeductions
      summary: Workday Payroll List Worker Deductions
      description: >-
        Retrieve all deductions for a specific worker, including benefits,
        retirement contributions, garnishments, and voluntary deductions.
      tags:
      - Deductions
      parameters:
      - $ref: '#/components/parameters/workerId'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Collection of worker deductions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeductionCollection'
              examples:
                ListWorkerDeductions200Example:
                  summary: Default listWorkerDeductions 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: ded_20260430_00211
                      deductionCode:
                        id: MEDICAL_PRETAX
                        descriptor: Weekly USD Pay Group
                      amount: 2500.0
                      frequency: PerPayPeriod
                      preTax: true
                      effectiveDate: '2026-04-30'
                      endDate: '2026-04-30'
                    total: 52
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /earningCodes:
    get:
      operationId: listEarningCodes
      summary: Workday Payroll List Earning Codes
      description: >-
        Retrieve all configured earning codes that define types of
        compensation such as regular pay, overtime, and bonuses.
      tags:
      - Earnings
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Collection of earning codes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarningCodeCollection'
              examples:
                ListEarningCodes200Example:
                  summary: Default listEarningCodes 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: REGULAR
                      descriptor: Weekly USD Pay Group
                      type: Regular
                      taxable: true
                      active: true
                    total: 52
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /deductionCodes:
    get:
      operationId: listDeductionCodes
      summary: Workday Payroll List Deduction Codes
      description: >-
        Retrieve all configured deduction codes that define types of payroll
        deductions such as taxes, benefits, and garnishments.
      tags:
      - Deductions
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Collection of deduction codes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeductionCodeCollection'
              examples:
                ListDeductionCodes200Example:
                  summary: Default listDeductionCodes 200 response
                  x-microcks-default: true
                  value:
                    data:
                    - id: MEDICAL_PRETAX
                      descriptor: Weekly USD Pay Group
                      type: Benefit
                      preTax: true
                      active: true
                    total: 52
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        OAuth 2.0 bearer token obtained through Workday authentication.
        Requires payroll-related security scopes.
  parameters:
    payRunId:
      name: payRunId
      in: path
      required: true
      description: Unique identifier for the pay run
      schema:
        type: string
      example: pr_20260430_weekly_001
    payGroupId:
      name: payGroupId
      in: path
      required: true
      description: Unique identifier for the pay group
      schema:
        type: string
      example: pg_weekly_usd
    workerId:
      name: workerId
      in: path
      required: true
      description: Unique identifier for the worker (Workday ID)
      schema:
        type: string
      example: w_100542
    limit:
      name: limit
      in: query
      description: Maximum number of results to return
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      example: 20
    offset:
      name: offset
      in: query
      description: Number of results to skip for pagination
      schema:
        type: integer
        minimum: 0
        default: 0
      example: 0
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            BadRequestExample:
              summary: Default BadRequest response
              x-microcks-default: true
              value:
                error: INVALID_REQUEST
                message: Validation failed for the provided fields.
                details:
                - field: amount
                  message: Validation failed for the provided fields.
    Unauthorized:
      description: Authentication required or token expired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            UnauthorizedExample:
              summary: Default Unauthorized response
              x-microcks-default: true
              value:
                error: INVALID_REQUEST
                message: Validation failed for the provided fields.
                details:
                - field: amount
                  message: Validation failed for the provided fields.
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            NotFoundExample:
              summary: Default NotFound response
              x-microcks-default: true
              value:
                error: INVALID_REQUEST
                message: Validation failed for the provided fields.
                details:
                - field: amount
                  message: Validation failed for the provided fields.
  schemas:
    PayRun:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the pay run
          example: pr_20260430_weekly_001
        descriptor:
          type: string
          description: Human-readable name of the pay run
          example: Weekly USD Pay Group
        payGroup:
          $ref: '#/components/schemas/PayGroupRef'
        payPeriod:
          $ref: '#/components/schemas/PayPeriod'
        status:
          type: string
          enum:
          - Draft
          - InProgress
          - Completed
          - Cancelled
          description: Current status of the pay run
          example: Draft
        runCategory:
          type: string
          enum:
          - Regular
          - OffCycle
          - OnDemand
          description: Category of the pay run
          example: Regular
        paymentDate:
          type: string
          format: date
          description: Date payments will be distributed
          example: '2026-04-30'
        totalGrossPay:
          type: number
          format: double
          description: Total gross pay for the pay run
          example: 245830.5
        totalNetPay:
          type: number
          format: double
          description: Total net pay for the pay run
          example: 178452.3
        totalDeductions:
          type: number
          format: double
          description: Total deductions for the pay run
          example: 38210.8
        totalTaxes:
          type: number
          format: double
          description: Total tax withholdings for the pay run
          example: 29167.4
        workerCount:
          type: integer
          description: Number of workers included in the pay run
          example: 87
        currency:
          type: string
          description: ISO 4217 currency code
          example: USD
        createdOn:
          type: string
          format: date-time
          description: When the pay run was created
          example: '2026-04-30T16:45:00Z'
        completedOn:
          type: string
          format: date-time
          description: When the pay run was completed
          example: '2026-04-30T16:45:00Z'
    PayRunCollection:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PayRun'
        total:
          type: integer
          description: Total number of pay runs matching the query
          example: 52
    CreatePayRunRequest:
      type: object
      required:
      - payGroupId
      - payPeriod
      properties:
        payGroupId:
          type: string
          description: Identifier of the pay group for this run
          example: pg_weekly_usd
        payPeriod:
          $ref: '#/components/schemas/PayPeriod'
        runCategory:
          type: string
          enum:
          - Regular
          - OffCycle
          - OnDemand
          default: Regular
          description: Category of the pay run
          example: Regular
        paymentDate:
          type: string
          format: date
          description: Desired payment date
          example: '2026-04-30'
    UpdatePayRunRequest:
      type: object
      properties:
        status:
          type: string
          enum:
          - Draft
          - Cancelled
          description: Updated status for the pay run
          example: Draft
        paymentDate:
          type: string
          format: date
          description: Updated payment date
          example: '2026-04-30'
    CalculationStatus:
      type: object
      properties:
        id:
          type: string
          description: Calculation job identifier
          example: calc_20260430_00012
        payRunId:
          type: string
          description: Associated pay run identifier
          example: pr_20260430_weekly_001
        status:
          type: string
          enum:
          - Queued
          - Processing
          - Completed
          - Failed
          description: Current status of the calculation
          example: Queued
        startedAt:
          type: string
          format: date-time
          description: When the calculation started
          example: '2026-04-30T16:45:00Z'
        completedAt:
          type: string
          format: date-time
          description: When the calculation completed
          example: '2026-04-30T16:45:00Z'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          description: Any errors encountered during calculation
    PayGroup:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the pay group
          example: pg_weekly_usd
        descriptor:
          type: string
          description: Human-readable name of the pay group
          example: Weekly USD Pay Group
        payFrequency:
          type: string
          enum:
          - Weekly
          - BiWeekly
          - SemiMonthly
          - Monthly
          de

# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/workday-payroll/refs/heads/main/openapi/workday-payroll-payroll-openapi.yml