Deputy Swaps API

The Swaps API from Deputy — 6 operation(s) for swaps.

Business capability
Human Capital Management BC-300

Operations 6

POST /management/v2/shifts/swap/pending-approvals Get pending approval shift swaps #
POST /management/v2/shifts/swap:confirm Confirm shift swaps #
POST /management/v2/shifts/swap:decline Decline shift swaps #
POST /management/v2/shifts/swap:recommendation Get shift swap recommendations #
GET /management/v2/shifts/{shiftId}/swap/pending Get pending swap details #
GET /me/v2/shifts/swap:pending Get pending swap shifts #

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-addanemployee-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-createa-department-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-addleaveforaemployee-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-createamemo-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-add-new-workplace-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-setawardforemployee-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-custom-field-data-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-timesheet-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-employee-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-pay-rules-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-roster-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-employee-agreement-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-tenanttimesheetv2model-timesheet-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-pay-comparison-submit-report-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-v2model-leave-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-v2model-employment-contracts-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-copy-request-copy-request-data-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-v2model-area-profile-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-searchfor-employment-contract-leave-rules-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-searchforan-employee-agreement-history-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-searchforan-employee-availability-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-searchforacustomfielddataentry-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-searchforan-employment-condition-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-searchforan-employment-contract-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-hr-export-export-hr-bulk-data-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-user-info-get-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-hr-export-export-hr-data-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/deputy/refs/heads/main/json-schema/deputy-hr-export-export-hr-pay-details-data-response-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/deputy:deputy-swaps-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

deputy-swaps-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Deputy V2 Swaps API
  version: '1.0'
  description: Filtered to publicly-authenticated routes only (APIAuthenticator). Scoped-OAuth routes and internal JWT routes are excluded — see the separate "Deputy V2 Scoped API" spec for scoped endpoints.
servers:
- url: https://{subdomain}.{region}.deputy.com/api
  description: Deputy tenant
  variables:
    subdomain:
      default: your-subdomain
      description: Your Deputy tenant subdomain
    region:
      default: deputy
      enum:
      - au
      - eu
      - na
      - deputy
      description: 'Deputy region: au, eu, na, or deputy (AU default)'
security:
- ApiToken: []
tags:
- name: Swaps
paths:
  /management/v2/shifts/swap/pending-approvals:
    post:
      summary: Get pending approval shift swaps
      description: Retrieves shift swaps that are pending approval. Returns swap requests sorted by source shift start time and ID in ascending order. Supports filtering by location mode and pagination. Can return count-only results for performance. Includes metadata with location, area, and employee profile information.
      operationId: ShiftSwapV2Controller_getPendingApproval
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShiftSwapSwapPendingResponse'
      parameters:
      - name: countOnly
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Swaps
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShiftSwapSwapPendingApprovalRequestData'
  /management/v2/shifts/swap:confirm:
    post:
      summary: Confirm shift swaps
      description: Confirms and executes shift swaps between source and target shifts. Swaps the employees between the specified shifts. The trial parameter allows testing the swap without committing. The override parameter bypasses validation rules. Returns the updated shifts and any errors encountered. The swapCost field indicates the cost difference after the swap (negative if cost increased).
      operationId: ShiftSwapV2Controller_confirm
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShiftSwapSwapConfirmResponse'
      tags:
      - Swaps
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShiftSwapSwapConfirmRequestData'
  /management/v2/shifts/swap:decline:
    post:
      summary: Decline shift swaps
      description: Declines shift swap requests. Cancels pending swap requests between source and target shifts. The role parameter is to signify the API caller's intent, caller can behave as a manager or employee. Returns the updated shifts after the decline operation completes.
      operationId: ShiftSwapV2Controller_decline
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShiftSwapSwapDeclineResponse'
      tags:
      - Swaps
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShiftSwapSwapDeclineRequestData'
  /management/v2/shifts/swap:recommendation:
    post:
      summary: Get shift swap recommendations
      description: Retrieves recommended shift swaps for the specified shifts. Returns potential swap partners that would allow employees to exchange shifts. Supports filtering by employee IDs and pagination. Can include expanded metadata with location, area, and employee profile information.
      operationId: ShiftSwapV2Controller_recommend
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShiftSwapSwapRecommendationResponse'
      tags:
      - Swaps
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShiftSwapSwapRecommendationRequestData'
  /management/v2/shifts/{shiftId}/swap/pending:
    get:
      summary: Get pending swap details
      description: Retrieves detailed information about pending swap requests for a specific shift. Returns swap requests involving the specified shift, including source and target shift details, creator information, messages, and status.
      operationId: ShiftSwapV2Controller_getPendingDetails
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShiftSwapSwapPendingResponse'
      parameters:
      - name: shiftId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      tags:
      - Swaps
  /me/v2/shifts/swap:pending:
    get:
      operationId: MeV2Controller_getPendingSwapShifts
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2GetPendingSwapShiftsResponse'
      parameters:
      - name: start
        description: format YYYY-MM-DD.
        in: query
        required: false
        schema:
          type: string
      - name: end
        description: format YYYY-MM-DD.
        in: query
        required: false
        schema:
          type: string
      tags:
      - Swaps
      summary: Get pending swap shifts
      description: Get pending swap shifts.
components:
  schemas:
    ShiftSwapSwapPendingResponseMetadataArea:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        locationId:
          type: integer
          format: int32
    modelBreak:
      type: object
      properties:
        slotType:
          $ref: '#/components/schemas/modelSlotType'
          title: type of slot
        start:
          type: integer
          format: int32
          title: can start break after seconds passed after shift start
        end:
          type: integer
          format: int32
          title: can end break after seconds passed after shift start
        state:
          $ref: '#/components/schemas/modelBreakState'
          title: Break state
        canStartEarly:
          type: boolean
          title: '[Deprecated] can employee start break early, override shift template'
        canEndEarly:
          type: boolean
          title: '[Deprecated] can employee end break early, override shift template'
        isMandatory:
          type: boolean
          title: '[Deprecated] is it mandatory to take this break, override shift template'
        type:
          $ref: '#/components/schemas/tenantsharedv2modelBreakType'
          title: type of break
        typeLabel:
          type: string
          title: break type name in config
        startDateTime:
          type: string
          title: format ISO8601 eg 2024-06-25T13:45:00+01:00
        endDateTime:
          type: string
          title: format ISO8601 eg 2024-06-25T13:45:00+01:00
    modelBreakState:
      type: string
      enum:
      - NOT_START
      - IN_PROGRESS
      - FINISHED
      - DURATION_ONLY
      - DURATION_FINISHED
      default: NOT_START
      title: Break States
    ShiftSwapSwapConfirmResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/ShiftSwapSwapConfirmResponseData'
    modelMultiListField:
      type: object
      properties:
        value:
          type: array
          items:
            type: string
    modelConsent:
      type: object
      properties:
        id:
          type: string
        recordId:
          type: string
        recordType:
          $ref: '#/components/schemas/ConsentConsentRecordType'
        transactionId:
          type: string
        employeeId:
          type: integer
          format: int32
        status:
          $ref: '#/components/schemas/ConsentConsentStatus'
        description:
          type: string
        metadata:
          $ref: '#/components/schemas/modelShiftTypeConsentMetadata'
        creator:
          type: integer
          format: int32
        createdAt:
          type: string
          format: date-time
    modelShiftTypeConsentMetadata:
      type: object
      properties:
        comment:
          type: string
        extras:
          type: object
          additionalProperties:
            type: string
    ShiftSwapSwapRecommendationResponseMetadataLocation:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
    ShiftSwapSwapPendingApprovalRequestData:
      type: object
      properties:
        locationMode:
          $ref: '#/components/schemas/LocationMode'
        locationIds:
          type: array
          items:
            type: integer
            format: int32
          title: this is required when locationMode is SELECTED
        cursor:
          type: string
        limit:
          type: integer
          format: int32
          title: default to 10
    tenantsharedv2modelBreakType:
      type: string
      enum:
      - MEAL_BREAK
      - REST_BREAK
      default: MEAL_BREAK
      title: Break Type
    ShiftSwapSwapPendingResponseMetadataEmployeeProfile:
      type: object
      properties:
        id:
          type: integer
          format: int32
        displayName:
          type: string
        photoUrl:
          type: string
        userId:
          type: integer
          format: int32
    tenantschedulev2modelShift:
      type: object
      properties:
        id:
          type: integer
          format: int32
          title: Shift ID
        start:
          type: string
          title: Shift start time, format ISO8601 eg 2012-12-18T13:45:00+01:00
        end:
          type: string
          title: Shift end time, format ISO8601 eg 2012-12-18T13:45:00+01:00
        mealbreakDuration:
          type: number
          format: float
          title: Shift mealbreak stored in minutes
        mealbreakSlots:
          type: array
          items:
            $ref: '#/components/schemas/modelBreak'
          title: Shift break slots
        duration:
          type: number
          format: float
          title: Total hours of shift works excluding mealbreak
        cost:
          type: number
          format: float
          title: Shift total cost
        area:
          type: integer
          format: int32
          title: Area Id where shift is allocated
        employee:
          type: integer
          format: int32
          title: Employee ID the shift is assigned
        note:
          type: string
          title: Notes or comments regarding the shift
        warning:
          type: string
          title: Warning message
        warningOverrideComment:
          type: string
          title: Details once warning message is overridden
        isPublished:
          type: boolean
          title: If shift is published or not
        timesheet:
          type: integer
          format: int32
          title: Timesheet ID connected to the shift
        isOpen:
          type: boolean
          title: If shift is open or not
        approvalRequired:
          type: boolean
          title: If approval is required or not
        confirmationStatus:
          $ref: '#/components/schemas/modelConfirmationStatus'
          title: Shift confirmation status
        confirmationNote:
          type: string
          title: Message displayed on confirmation
        confirmedByWhom:
          type: integer
          format: int32
          title: Employee who confirmed the shift
        confirmedAt:
          type: string
          title: Shift confirmation time, format ISO8601 eg 2012-12-18T13:45:00+01:00
        swapStatus:
          $ref: '#/components/schemas/modelSwapStatus'
          title: Shift swap status once shift is opened for swap
        swapApprovedBy:
          type: integer
          format: int32
          title: Shift Swap Manager ID
        shiftTemplate:
          type: integer
          format: int32
          title: Shift Template ID
        children:
          type: array
          items:
            $ref: '#/components/schemas/v2modelChildShift'
          title: Child Shifts
        canEdit:
          type: boolean
          title: Can edit this shift
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/tenantsharedv2modelCustomField'
          title: Custom Fields
        customFieldData:
          type: integer
          format: int32
          title: Custom Field Data ID
        creator:
          type: integer
          format: int32
          title: Employee ID who created shift
        createdAt:
          type: string
          title: When the shift was created, format ISO8601 eg 2012-12-18T13:45:00+01:00
        modifiedAt:
          type: string
          title: When the shift was modified, format ISO8601 eg 2012-12-18T13:45:00+01:00
        consentChangesets:
          type: array
          items:
            $ref: '#/components/schemas/modelShiftConsentChangeset'
          title: Consent changeset data
        areaName:
          type: string
          title: Area name
        location:
          type: integer
          format: int32
          title: Location Id
        locationName:
          type: string
          title: Location name
      title: Shift
    ShiftConsentChangesetShiftConsentChangesetData:
      type: object
      properties:
        start:
          type: string
        end:
          type: string
        approvalRequired:
          type: boolean
        cost:
          type: number
          format: float
        date:
          type: string
        employee:
          type: integer
          format: int32
        mealbreakSlotsUnpaidMinutes:
          type: number
          format: float
        mealbreakSlots:
          type: array
          items:
            $ref: '#/components/schemas/modelBreak'
        isOpen:
          type: boolean
        area:
          type: integer
          format: int32
        duration:
          type: number
          format: float
        location:
          type: integer
          format: int32
    ShiftSwapSwapConfirmResponseData:
      type: object
      properties:
        shifts:
          type: array
          items:
            $ref: '#/components/schemas/tenantschedulev2modelShift'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SwapConfirmResponseErrors'
        swapCost:
          type: number
          format: float
          title: swap cost after swap is greater than before, swapCost is negative
    modelFileField:
      type: object
      properties:
        value:
          type: integer
          format: int32
    ShiftSwapSwapRecommendationResponseMetadataEmployeeProfile:
      type: object
      properties:
        id:
          type: integer
          format: int32
        displayName:
          type: string
        photoUrl:
          type: string
    ShiftSwapSwapRecommendationResponseData:
      type: object
      properties:
        shifts:
          type: array
          items:
            $ref: '#/components/schemas/tenantschedulev2modelShift'
    ShiftConsentChangesetShiftConsentStatus:
      type: string
      enum:
      - PENDING
      - ACTIONED
      - AUTO_ACTIONED
      default: PENDING
    tenantsharedv2modelCustomField:
      type: object
      properties:
        id:
          type: string
          format: int64
        booleanField:
          $ref: '#/components/schemas/modelBooleanField'
        stringField:
          $ref: '#/components/schemas/modelStringField'
        listField:
          $ref: '#/components/schemas/modelListField'
        multiListField:
          $ref: '#/components/schemas/modelMultiListField'
        fileField:
          $ref: '#/components/schemas/modelFileField'
          title: file id
        employeeVisible:
          type: boolean
    ShiftSwapSwapRecommendationResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/ShiftSwapSwapRecommendationResponseData'
        metadata:
          $ref: '#/components/schemas/ShiftSwapSwapRecommendationResponseMetadata'
    ShiftSwapSwapConfirmRequestData:
      type: object
      properties:
        sourceShiftIds:
          type: array
          items:
            type: integer
            format: int32
        targetShiftIds:
          type: array
          items:
            type: integer
            format: int32
        role:
          $ref: '#/components/schemas/v2modelRole'
        trial:
          type: boolean
        override:
          type: boolean
    LocationMode:
      type: string
      enum:
      - ALL
      - SELECTED
      default: ALL
      description: "LocationMode specifies how location filtering should be applied.\n\n - ALL: Include all locations accessible by the current user (no filtering)\n - SELECTED: Filter to only selected locations (requires locationIds to be provided)"
    modelViolatedRulesWarning:
      type: object
      properties:
        message:
          type: string
    ShiftSwapSwapDeclineRequestData:
      type: object
      properties:
        sourceShiftIds:
          type: array
          items:
            type: integer
            format: int32
        targetShiftIds:
          type: array
          items:
            type: integer
            format: int32
        message:
          type: string
        role:
          $ref: '#/components/schemas/v2modelRole'
    ShiftSwapSwapRecommendationRequestData:
      type: object
      properties:
        shiftIds:
          type: array
          items:
            type: integer
            format: int32
        employeeIds:
          type: array
          items:
            type: integer
            format: int32
        limit:
          type: integer
          format: int32
        cursor:
          type: string
        expandMetadata:
          type: boolean
          title: whether to expand metadata in response to include locations, areas, and employee profiles
    v2modelChildShift:
      type: object
      properties:
        id:
          type: integer
          format: int32
          title: Shift ID
        start:
          type: string
          title: Shift start time, format ISO8601 eg 2012-12-18T13:45:00+01:00
        end:
          type: string
          title: Shift end time, format ISO8601 eg 2012-12-18T13:45:00+01:00
        cost:
          type: number
          format: float
          title: Shift total cost
        area:
          type: integer
          format: int32
          title: Area Id where shift is allocated
        canEdit:
          type: boolean
          title: Can edit this shift
        parentId:
          type: integer
          format: int32
          title: Shift parent id
        isOpen:
          type: boolean
          title: If shift is open or not
        approvalRequired:
          type: boolean
          title: If approval is required or not
        isPublished:
          type: boolean
          title: If shift is published or not
        confirmationStatus:
          $ref: '#/components/schemas/modelConfirmationStatus'
          title: Child shift confirmation status
        confirmedByWhom:
          type: integer
          format: int32
          title: Employee who confirmed the child shift
        confirmedAt:
          type: string
          title: Shift confirmation time, format ISO8601 eg 2012-12-18T13:45:00+01:00
        creator:
          type: integer
          format: int32
          title: Employee ID who created shift
        createdAt:
          type: string
          title: When the shift was created, format ISO8601 eg 2012-12-18T13:45:00+01:00
        modifiedAt:
          type: string
          title: When the shift was modified, format ISO8601 eg 2012-12-18T13:45:00+01:00
        warning:
          type: string
        warningOverrideComment:
          type: string
        areaName:
          type: string
          title: Area name
        location:
          type: integer
          format: int32
          title: Location Id
        locationName:
          type: string
          title: Location name
      title: Child Shift
    ShiftSwapSwapPendingResponseData:
      type: object
      properties:
        id:
          type: integer
          format: int32
        sourceShift:
          $ref: '#/components/schemas/tenantschedulev2modelShift'
        targetShift:
          $ref: '#/components/schemas/tenantschedulev2modelShift'
        creatorId:
          type: integer
          format: int32
        targetEmployeeId:
          type: integer
          format: int32
        requestMessage:
          type: string
        responseMessage:
          type: string
        status:
          type: string
        createdAt:
          type: string
        modifiedAt:
          type: string
      title: data will be sorted by source shift start time and ID in ascending order
    ShiftConsentChangesetShiftConsentAction:
      type: string
      enum:
      - CREATE
      - MODIFY
      - DELETE
      default: CREATE
    v2GetPendingSwapShiftsResponse:
      type: object
      properties:
        shifts:
          type: array
          items:
            $ref: '#/components/schemas/tenantschedulev2modelShift'
    modelConfirmationStatus:
      type: string
      enum:
      - ROSTER_CONFIRMATION_NOT_REQUIRED
      - ROSTER_CONFIRMATION_REQUIRED
      - ROSTER_CONFIRMATION_DONE
      - ROSTER_CONFIRMATION_DECLINED
      default: ROSTER_CONFIRMATION_NOT_REQUIRED
    modelStringField:
      type: object
      properties:
        value:
          type: string
    modelBooleanField:
      type: object
      properties:
        value:
          type: boolean
          default: 'false'
    ShiftSwapSwapPendingResponseMetadataLocation:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
    modelShiftConsentChangeset:
      type: object
      properties:
        id:
          type: integer
          format: int32
        shiftId:
          type: integer
          format: int32
        consentTransactionId:
          type: string
        action:
          $ref: '#/components/schemas/ShiftConsentChangesetShiftConsentAction'
        status:
          $ref: '#/components/schemas/ShiftConsentChangesetShiftConsentStatus'
        newData:
          $ref: '#/components/schemas/ShiftConsentChangesetShiftConsentChangesetData'
        oldData:
          $ref: '#/components/schemas/ShiftConsentChangesetShiftConsentChangesetData'
        violatedRules:
          type: array
          items:
            $ref: '#/components/schemas/modelViolatedRules'
        creator:
          type: integer
          format: int32
        createdAt:
          type: string
        modifiedAt:
          type: string
        consents:
          type: array
          items:
            $ref: '#/components/schemas/modelConsent'
    ShiftSwapSwapDeclineResponseData:
      type: object
      properties:
        shifts:
          type: array
          items:
            $ref: '#/components/schemas/tenantschedulev2modelShift'
    modelSlotType:
      type: string
      enum:
      - BREAK
      - WORK
      - CUSTOM
      default: BREAK
      title: Type of Slot
    modelViolatedRulesRuleConfig:
      type: object
      properties:
        field:
          type: string
          title: What field of roster is triggering the consent
        operation:
          $ref: '#/components/schemas/modelViolatedRulesOperation'
          title: What operation is used for the consent checking
        value:
          type: string
          title: The value of what is compared
        gap:
          type: integer
          format: int32
          title: How many days different between the shifts
        space:
          type: integer
          format: int32
          title: The duration from the next or previous shift to the current shift in seconds
    SwapConfirmResponseErrors:
      type: object
      properties:
        shiftId:
          type: integer
          format: int32
        messages:
          type: array
          items:
            type: string
        canOverride:
          type: boolean
    modelSwapStatus:
      type: string
      enum:
      - SWAP_STATUS_NOT_REQUIRED
      - SWAP_STATUS_PENDING_OUT
      - SWAP_STATUS_PENDING_IN
      - SWAP_STATUS_PENDING_IN_OUT
      - SWAP_STATUS_PENDING_APPROVAL
      - SWAP_STATUS_APPROVED
      - SWAP_STATUS_CANCELLED
      - SWAP_STATUS_DECLINED
      default: SWAP_STATUS_NOT_REQUIRED
    ShiftSwapSwapPendingResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapPendingResponseData'
        metadata:
          $ref: '#/components/schemas/ShiftSwapSwapPendingResponseMetadata'
    ShiftSwapSwapDeclineResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/ShiftSwapSwapDeclineResponseData'
    modelViolatedRules:
      type: object
      properties:
        ruleCode:
          type: string
        warning:
          $ref: '#/components/schemas/modelViolatedRulesWarning'
        ruleConfigs:
          type: array
          items:
            $ref: '#/components/schemas/modelViolatedRulesRuleConfig'
    ConsentConsentStatus:
      type: string
      enum:
      - PENDING
      - ACCEPTED
      - DECLINED
      - CANCELLED
      - OVERRIDDEN_ACCEPTED
      default: PENDING
    ShiftSwapSwapPendingResponseMetadata:
      type: object
      properties:
        nextCursor:
          type: string
        locations:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapPendingResponseMetadataLocation'
        areas:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapPendingResponseMetadataArea'
        employeeProfiles:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapPendingResponseMetadataEmployeeProfile'
        totalCount:
          type: string
    v2modelRole:
      type: string
      enum:
      - EMPLOYEE
      - MANAGER
      default: EMPLOYEE
    modelListField:
      type: object
      properties:
        value:
          type: string
    modelViolatedRulesOperation:
      type: string
      enum:
      - NOT_SPECIFIED
      - GREATER_THAN
      - LESS_THAN
      - GREATER_THAN_OR_EQUAL
      - LESS_THAN_OR_EQUAL
      - EQUAL
      - NOT_EQUAL
      default: NOT_SPECIFIED
    ShiftSwapSwapRecommendationResponseMetadataArea:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        locationId:
          type: integer
          format: int32
    ConsentConsentRecordType:
      type: string
      enum:
      - SHIFT
      - TIMESHEET
      - REGULAR_SCHEDULE
      default: SHIFT
    ShiftSwapSwapRecommendationResponseMetadata:
      type: object
      properties:
        nextCursor:
          type: string
        locations:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapRecommendationResponseMetadataLocation'
        areas:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapRecommendationResponseMetadataArea'
        employeeProfiles:
          type: array
          items:
            $ref: '#/components/schemas/ShiftSwapSwapRecommendationResponseMetadataEmployeeProfile'
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: OAuth
x-provenance:
  method: searched
  source: https://developer.deputy.com/reference
  harvested: '2026-10-14'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://developer.deputy.com/reference/accessmanagementv2controller_createrole.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_deleterole.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_getemployeerole.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_getprivilegehierarchy.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_listemployeebyrole.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_listemployeerolehistory.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_listrole.md
  - https://developer.deputy.com/reference/accessmanagementv2controller_updaterole.md
  - https://developer.deputy.com/reference/accountstatsv2controller_getpaycalendarcoverage.md
  - https://developer.deputy.com/reference/accountstatsv2controller_getpayratecoverage.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_archiveagreedhourversionwithreason.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_auditagreedhours.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_batchupdateagreedhour.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_consentemployeeagreedhours.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_createagreedhour.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_deleteemployeeagreedhours.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_diffemployeeagreedhours.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getagreedhour.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getagreedhoursbystatus.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getagreedhoursemployeeapprovalconfiguration.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getagreedhoursgeneralconfiguration.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getagreedhourversion.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getareasbyemployees.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getconsentrecords.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_getcurrentagreedhour.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_migrateagreedhourssteptwo.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_notifyemployeeagreedhours.md
  - https://developer.deputy.com/reference/agreedhourservicev2controller_searchagreedhours.md
  - https://developer.deputy.com/reference/aiassistantv2controller_getsettings.md
  - https://developer.deputy.com/reference/areamanagementv2controller_listbyemployeeid.md
  - https://developer.deputy.com/reference/areaprofilev2controller_create.md
  - https://developer.deputy.com/reference/areaprofilev2controller_delete.md
  - https://developer.deputy.com/reference/areaprofilev2controller_get.md
  - https://developer.deputy.com/reference/areaprofilev2controller_list.md
  - https://developer.deputy.com/reference/areaprofilev2controller_listareainuse.md
  - https://developer.deputy.com/reference/areaprofilev2controller_listemployeetrained.md
  - https://developer.deputy.com/reference/areaprofilev2controller_update.md
  - https://developer.deputy.com/reference/arearatev2controller_batchsave.md
  - https://developer.deputy.com/reference/arearatev2controller_get.md
  - https://developer.deputy.com/reference/auditpayrecalculationv2controller_create.md
  - https://developer.deputy.com/reference/autobuildv2controller_autobuild.md
  - https://developer.deputy.com/reference/availabilityv2controller_delete.md


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