Deputy Leave API

V1 /my/leave/* endpoints

GitHub OpenAPI
Business capability
HR Operations Management BC-300.70

Operations 23

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /my/leave Create or update leave as the logged-in user · Create or update Leave #
Ask an LLM
“Can I create or update leave through the my/leave endpoint?”
“What happens if I post leave I already submitted?”
Tell an agent
Create or update leave for the logged-in user.
Submit a leave change as the employee.
PUT /my/leave Submit leave as the logged-in user · Create Leave #
Ask an LLM
“How does the employee submit their own leave request?”
“Can I create leave through the my/leave endpoint?”
Tell an agent
Create leave for the logged-in user.
Submit my own leave request.
GET /my/leave/{strSetup} Get leave for the logged-in user · GET Leave / (:strSetup)? #
Ask an LLM
“What leave have I already submitted?”
“Can I read my own leave record?”
Tell an agent
Get my leave record using setup {strSetup}.
Show the leave I submitted with setup {strSetup}.
GET /resource/Leave List leave records · List Leave records #
Ask an LLM
“Which leave records can I see?”
“Can I list leave for a single employee?”
Tell an agent
List my leave records.
Show all leave records I am allowed to see.
POST /resource/Leave Add a leave record · Create a Leave #
Ask an LLM
“How do I record a vacation or sick leave for an employee?”
“Can I set a leave as approved when I create it?”
Tell an agent
Create leave {id} for {employee} from {start} to {end} with status {status}.
Record {days} days of leave for {employee} at {company} starting {date_start} ending {date_end}.
PUT /resource/Leave Create a leave record · Create a Leave #
Ask an LLM
“How do I create a leave record for an employee?”
“Can I set the leave rule and status when creating leave?”
Tell an agent
Create leave for employee {Employee} at company {Company} from {Start} to {End} with status {Status}.
Add leave with rule {LeaveRule} and comment {Comment}.
POST /resource/Leave/BULK Create or update leave records in bulk · Bulk create/update Leave #
Ask an LLM
“Can I create many leave records at once?”
“How do I upsert leave for a batch of employees?”
Tell an agent
Bulk create or update leave records.
Upsert a batch of leave records.
GET /resource/Leave/INFO Get leave field metadata · Get field metadata for Leave #
Ask an LLM
“Which leave fields can I query or sort on?”
“What field types does the leave resource use?”
Tell an agent
Get the field metadata for leave.
Show which leave fields are queryable.
POST /resource/Leave/PREDICT Predict a matching leave record · Predict-match a Leave record #
Ask an LLM
“Can I find an existing leave record before creating one?”
“Which leave record matches a partial leave payload?”
Tell an agent
Predict the matching leave record for employee {Employee} from {Start} to {End}.
Find the existing leave record for {Employee} with rule {LeaveRule}.
POST /resource/Leave/QUERY Search leave records · Search Leave #
Ask an LLM
“Can I search leave by employee or date?”
“How do I sort and page through leave records?”
Tell an agent
Search leave for employee {Employee}.
Find leave records sorted by {sort}.
GET /resource/Leave/{id} Get a leave record · Get a Leave by id #
Ask an LLM
“How do I read one leave record by id?”
“What status is a specific leave record in?”
Tell an agent
Get leave record {id}.
Show the status of leave {id}.
POST /resource/Leave/{id} Update a leave record · Update a Leave #
Ask an LLM
“Can I change the dates or status of an existing leave record?”
“How do I edit leave I already recorded?”
Tell an agent
Change leave {id} for {employee} to status {status}.
Update the comment on leave {id} to {comment}.
PUT /resource/Leave/{id} Update a leave record · Update a Leave #
Ask an LLM
“How do I update an existing leave record?”
“Can I change the status of a leave record?”
Tell an agent
Update leave record {id} to status {Status}.
Replace leave {id} with start {Start} and end {End}.
DELETE /resource/Leave/{id} Delete a leave record · Delete a Leave #
Ask an LLM
“How do I delete a leave record?”
“Can I remove a leave record by id?”
Tell an agent destructive · confirm first
Delete leave record {id}.
Remove the leave record {id}.
GET /resource/Leave/{id}/COMMENTS List comments on a leave record · List comments on a Leave #
Ask an LLM
“What comments have been left on a leave record?”
“Can I read the comment history of a leave?”
Tell an agent
List comments on leave record {id}.
Show the comment history of leave {id}.
POST /resource/Leave/{id}/COMMENTS Add a comment to a leave record · Add a comment to a Leave #
Ask an LLM
“How do I comment on a leave record?”
“Can I leave a comment on a leave record?”
Tell an agent
Add comment {Comment} to leave record {id}.
Comment on leave {id} saying {Comment}.
DELETE /resource/Leave/{id}/COMMENTS/{commentId} Remove a comment from leave · Delete a comment on a Leave #
Ask an LLM
“How do I delete a comment from an employee's leave record?”
“Can I remove an approval comment on leave?”
Tell an agent destructive · confirm first
Delete comment {comment} from leave {id}.
Remove the comment {comment} on leave record {id}.
GET /resource/Leave/{id}/HISTORY Get change history for a leave record · Get change history for a Leave #
Ask an LLM
“Who changed a leave record and when?”
“Can I see the change history of a leave?”
Tell an agent
Get the change history of leave record {id}.
Show who edited leave {id} and when.
GET /resource/Leave/{id}/HISTORY/travel/{timestamp} Get a leave record as it was at a past time · Get a Leave as it existed at a prior time #
Ask an LLM
“What did a leave record look like at a past timestamp?”
“Can I travel back to a previous version of a leave?”
Tell an agent
Get leave record {id} as it was at {timestamp}.
Show leave {id} as it existed on {timestamp}.
POST /supervise/leave Create or update leave as a supervisor · Create or update Leave #
Ask an LLM
“Can a supervisor create or update leave for an employee?”
“What happens if I post leave as a supervisor?”
Tell an agent
Create or update leave as a supervisor.
Submit leave on behalf of an employee.
POST /supervise/leave/leaveManagement Manage leave for a team · POST Leave / leaveManagement #
Ask an LLM
“How do I record leave for a team member through the supervisor portal?”
“Can I submit leave requests for my team?”
Tell an agent
Submit leave management for my team.
Record leave requests for the team.
GET /supervise/leave/{intEmployeeId} View one employee's leave · GET Leave / (:intEmployeeId)? #
Ask an LLM
“What leave has a team member taken?”
“Can I see one employee's leave balance?”
Tell an agent
Show leave for employee {intEmployeeId}.
Get leave history for {intEmployeeId}.
GET /supervise/leave/{intEmployeeId}/{strSetup} View a leave setup for an employee · GET Leave / :strSetup #
Ask an LLM
“What leave setup is an employee on?”
“Can I see one employee's leave setup?”
Tell an agent
Show leave setup {strSetup} for employee {intEmployeeId}.
Get the leave setup {strSetup} of {intEmployeeId}.

Specifications

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-leave-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

deputy-leave-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Deputy Leave API
  version: 1.0.0
  description: 'Operations tagged Leave across 2 of this provider''s published API definitions: deputy-openapi.json, deputy-leave-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{subdomain}.{region}.deputy.com/api/v1
  description: Deputy tenant
  variables:
    subdomain:
      default: your-subdomain
    region:
      default: deputy
      enum:
      - au
      - eu
      - na
      - deputy
tags:
- name: Leave
  description: V1 /my/leave/* endpoints
paths:
  /my/leave:
    post:
      tags:
      - Leave
      summary: Create or update Leave
      operationId: my_leave__post
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - BearerAuth: []
    put:
      tags:
      - Leave
      summary: Create Leave
      operationId: my_leave__put
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - BearerAuth: []
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
  /my/leave/{strSetup}:
    get:
      tags:
      - Leave
      summary: GET Leave / (:strSetup)?
      operationId: my_leave__strsetup__get
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      parameters:
      - name: strSetup
        in: path
        required: true
        schema:
          type: string
          pattern: ^setup$
      security:
      - BearerAuth: []
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
  /resource/Leave:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: List Leave records
      description: Returns Leave records the authenticated caller is permitted to see. For large tables prefer POST /QUERY with pagination.
      operationId: listLeave
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
    post:
      tags:
      - Leave
      summary: Create a Leave
      operationId: createLeave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Leave'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
    put:
      tags:
      - Leave
      summary: Create a Leave
      operationId: createOrReplaceLeave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Leave'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/BULK:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    post:
      tags:
      - Leave
      summary: Bulk create/update Leave
      description: Accepts an array of records. Each record is processed independently.
      operationId: bulkLeave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Leave'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/INFO:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: Get field metadata for Leave
      description: Returns the field list, types, and associations for this resource. Useful when building integrations that need to know which fields are queryable.
      operationId: infoLeave
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/PREDICT:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    post:
      tags:
      - Leave
      summary: Predict-match a Leave record
      description: Returns the closest matching existing record for a partial payload. Used by upsert-style integrations to find an existing row before creating.
      operationId: predictLeave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Leave'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/QUERY:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    post:
      tags:
      - Leave
      summary: Search Leave
      description: 'Flexible search endpoint. Body supports `search`, `sort`, `start`, `max`, and `join` clauses. Example: `{"search": {"s1": {"field": "Id", "data": 1, "type": "eq"}}}`.'
      operationId: searchLeave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/{id}:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: Get a Leave by id
      operationId: getLeaveById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
    post:
      tags:
      - Leave
      summary: Update a Leave
      operationId: updateLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Leave'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
    put:
      tags:
      - Leave
      summary: Update a Leave
      operationId: replaceLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Leave'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
    delete:
      tags:
      - Leave
      summary: Delete a Leave
      operationId: deleteLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/{id}/COMMENTS:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: List comments on a Leave
      operationId: getCommentsLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    Id:
                      type: integer
                    Comment:
                      type: string
                    Creator:
                      type: integer
                    Created:
                      type: string
                      format: date-time
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
    post:
      tags:
      - Leave
      summary: Add a comment to a Leave
      operationId: addCommentLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Comment:
                  type: string
              required:
              - Comment
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/{id}/COMMENTS/{commentId}:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    delete:
      tags:
      - Leave
      summary: Delete a comment on a Leave
      operationId: deleteCommentLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      - name: commentId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/{id}/HISTORY:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: Get change history for a Leave
      operationId: historyLeave
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /resource/Leave/{id}/HISTORY/travel/{timestamp}:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: Get a Leave as it existed at a prior time
      operationId: historyLeaveTravel
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        description: Numeric id of the resource
      - name: timestamp
        in: path
        required: true
        schema:
          type: integer
          format: int64
        description: Unix epoch seconds
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Leave'
        '400':
          description: Bad request
        '401':
          description: Authentication required or invalid token
        '403':
          description: Forbidden — token lacks access to this resource
        '404':
          description: Resource not found
      security:
      - BearerAuth: []
      - OAuth2: []
  /supervise/leave:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    post:
      tags:
      - Leave
      summary: Create or update Leave
      operationId: supervise_leave__post
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - BearerAuth: []
  /supervise/leave/leaveManagement:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    post:
      tags:
      - Leave
      summary: POST Leave / leaveManagement
      operationId: supervise_leave__leavemanagement_post
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - BearerAuth: []
  /supervise/leave/{intEmployeeId}:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: GET Leave / (:intEmployeeId)?
      operationId: supervise_leave__intemployeeid__get
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      parameters:
      - name: intEmployeeId
        in: path
        required: true
        schema:
          type: integer
          pattern: \d+
      security:
      - BearerAuth: []
  /supervise/leave/{intEmployeeId}/{strSetup}:
    servers:
    - url: https://{subdomain}.{region}.deputy.com/api/v1
      description: Deputy tenant
      variables:
        subdomain:
          default: your-subdomain
        region:
          default: deputy
          enum:
          - au
          - eu
          - na
          - deputy
    get:
      tags:
      - Leave
      summary: GET Leave / :strSetup
      operationId: supervise_leave__intemployeeid_strsetup_get
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
        '401':
          description: Not authenticated
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
      parameters:
      - name: intEmployeeId
        in: path
        required: true
        schema:
          type: integer
          pattern: \d+
      - name: strSetup
        in: path
        required: true
        schema:
          type: string
          pattern: setup
      security:
      - BearerAuth: []
components:
  schemas:
    QueryRequest:
      type: object
      description: V1 Resource search payload. All fields optional; an empty body returns the first page of results.
      properties:
        search:
          type: object
          description: Map of search clauses keyed by an arbitrary id (e.g. `s1`, `s2`). Each clause filters one field.
          additionalProperties:
            type: object
            required:
            - field
            - data
            - type
            properties:
              field:
                type: string
                description: Field name to filter on (e.g. `Id`, `Employee`).
              data:
                description: Comparison value. Type depends on the field.
              type:
                type: string
                description: Comparison operator.
                enum:
                - eq
                - ne
                - gt
                - lt
                - ge
                - le
                - is
                - is not
                - in
                - not in
                - starts
                - contains
        sort:
          type: object
          description: Map of field name → `asc` or `desc`.
          additionalProperties:
            type: string
            enum:
            - asc
            - desc
        start:
          type: integer
          minimum: 0
          default: 0
          description: Pagination offset (0-indexed).
        max:
          type: integer
          minimum: 1
          maximum: 500
          default: 100
          description: Max records per page (server caps at 500).
        join:
          type: array
          items:
            type: string
          description: Related ORMs to expand inline (e.g. `["EmployeeObject"]`).
      example:
        search:
          s1:
            field: Id
            data: 1
            type: ge
        max: 100
    Leave:
      type: object
      properties:
        Id:
          type: integer
        Employee:
          type: integer
        EmployeeHistory:
          type: integer
        Company:
          type: integer
        LeaveRule:
          type: integer
        Start:
          type: integer
        DateStart:
          type: string
          format: date-time
        End:
          type: integer
        DateEnd:
          type: string
          format: date-time
        Days:
          type: number
          format: double
        ApproverTime:
          type: integer
        ApproverPay:
          type: integer
        Comment:
          type: string
        Status:
          type: integer
        ApprovalComment:
          type: string
        TotalHours:
          type: number
          format: double
        ExternalId:
          type: string
          maxLength: 64
        AllDay:
          type: boolean
        Creator:
          type: integer
        Created:
          type: string
          format: date-time
        Modified:
          type: string
        EmployeeObject:
          type: object
        EmployeeHistoryObject:
          type: object
        CompanyObject:
          type: object
        LeaveRuleObject:
          type: object
      required:
      - Id
      - Employee
      - EmployeeHistory
      - Company
      - Start
      - End
      - Status
      - AllDay
      - Modified
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 access token or Deputy Permanent Token.
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://once.deputy.com/my/oauth/login
          tokenUrl: https://once.deputy.com/my/oauth/access_token
          scopes:
            longlife_refresh_token: Extended session
x-refined-from:
- deputy-openapi.json
- deputy-leave-api-openapi.yml