---
updatedAt: 2025-05-21T20:29:50.000Z
agentTools:
  projectIndex: https://developers.keka.com/llms.txt
---

# Get all Leave Requests

Get all the leaves in the organization between `from` and `to` date.If both `from` and `to` are not specified, last 30 days records are returned.`from` date should be before `to` date.The difference between `from` and `to` date cannot be more than **90** days.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Leave",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://{company}.{environment}.com/api/v1",
      "description": "Production server (uses live data)",
      "variables": {
        "environment": {
          "default": "keka",
          "enum": [
            "keka",
            "kekademo"
          ]
        }
      }
    }
  ],
  "paths": {
    "/time/leaverequests": {
      "get": {
        "tags": [
          "LeaveRequests"
        ],
        "summary": "Get all Leave Requests",
        "description": "Get all the leaves in the organization between `from` and `to` date.If both `from` and `to` are not specified, last 30 days records are returned.`from` date should be before `to` date.The difference between `from` and `to` date cannot be more than **90** days.",
        "parameters": [
          {
            "name": "employeeIds",
            "in": "query",
            "description": "Comma separated list of one or more Employee ids you'd like to filter on.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "From date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "To date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Represents how many results you'd like to retrieve per request (page). Default is 100. Max is 200",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaveRequestPagedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaveRequestPagedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LeaveRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "employeeIdentifier": {
            "type": "string",
            "nullable": true
          },
          "employeeNumber": {
            "type": "string",
            "nullable": true
          },
          "fromDate": {
            "type": "string",
            "format": "date-time"
          },
          "toDate": {
            "type": "string",
            "format": "date-time"
          },
          "fromSession": {
            "$ref": "#/components/schemas/SessionType"
          },
          "toSession": {
            "$ref": "#/components/schemas/SessionType"
          },
          "requestedOn": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "cancelRejectReason": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/LeaveRequestStatus"
          },
          "selection": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaveTypeSelection"
            },
            "nullable": true
          },
          "lastActionTakenOn": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "LeaveRequestPagedResponse": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this Keka.API.Web.Core.Response`1 is succeeded."
          },
          "message": {
            "type": "string",
            "description": "Gets or sets the message.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets the errors.",
            "nullable": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaveRequest"
            },
            "description": "Gets or sets the data.",
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "description": "Gets or sets the page number.",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "Gets or sets the size of the page.",
            "format": "int32"
          },
          "firstPage": {
            "type": "string",
            "description": "Gets or sets the first page.",
            "format": "uri",
            "nullable": true
          },
          "lastPage": {
            "type": "string",
            "description": "Gets or sets the last page.",
            "format": "uri",
            "nullable": true
          },
          "totalPages": {
            "type": "integer",
            "description": "Gets or sets the total pages.",
            "format": "int32"
          },
          "totalRecords": {
            "type": "integer",
            "description": "Gets or sets the total records.",
            "format": "int32"
          },
          "nextPage": {
            "type": "string",
            "description": "Gets or sets the next page.",
            "format": "uri",
            "nullable": true
          },
          "previousPage": {
            "type": "string",
            "description": "Gets or sets the previous page.",
            "format": "uri",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "class represents paged response."
      },
      "LeaveRequestStatus": {
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "format": "int32"
      },
      "LeaveTypeSelection": {
        "type": "object",
        "properties": {
          "leaveTypeIdentifier": {
            "type": "string",
            "nullable": true
          },
          "leaveTypeName": {
            "type": "string",
            "nullable": true
          },
          "count": {
            "type": "number",
            "format": "float"
          },
          "duration": {
            "$ref": "#/components/schemas/TimePeriod"
          }
        },
        "additionalProperties": false
      },
      "SessionType": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "format": "int32"
      },
      "TimeDuration": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "type": "integer",
        "format": "int32"
      },
      "TimePeriod": {
        "type": "object",
        "properties": {
          "unit": {
            "$ref": "#/components/schemas/TimeDuration"
          },
          "duration": {
            "type": "number",
            "format": "double"
          },
          "durationString": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.kekad.com/connect/authorize",
            "scopes": {
              "kekaapi": "Keka API"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```