---
updatedAt: 2026-05-14T14:32:15.000Z
agentTools:
  projectIndex: https://docs.oysterhr.com/v0.1/llms.txt
---

# Retrieve all requests (legacy)

Returns all Time Off Requests for a company. This path is deprecated; use GET /v0.1/time_off/requests instead. Deprecation and Sunset response headers indicate the removal timeline (RFC 8594).

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Endpoints",
    "version": "v0.1"
  },
  "components": {
    "securitySchemes": {
      "bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "meta": {
        "type": "object",
        "properties": {
          "items": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pages": {
            "type": "integer"
          },
          "firstUrl": {
            "type": "string"
          },
          "lastUrl": {
            "type": "string"
          },
          "pageUrl": {
            "type": "string"
          },
          "nextUrl": {
            "type": "string"
          },
          "prevUrl": {
            "type": "string"
          },
          "deprecation": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string"
              },
              "sunset": {
                "type": "string"
              },
              "link": {
                "type": "object",
                "properties": {
                  "rel": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "required": [
          "items",
          "count",
          "page",
          "pages",
          "firstUrl",
          "lastUrl",
          "pageUrl",
          "nextUrl",
          "prevUrl"
        ]
      },
      "timeOffEngagementDetails": {
        "type": "object",
        "properties": {
          "engagementId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "pattern": "^[a-z_]+$"
          },
          "countryCode": {
            "type": "string"
          }
        },
        "required": [
          "engagementId",
          "name",
          "type",
          "countryCode"
        ]
      },
      "timeOffRequest": {
        "type": "object",
        "properties": {
          "timeOffRequestId": {
            "type": "string"
          },
          "engagement": {
            "$ref": "#/components/schemas/timeOffEngagementDetails"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          },
          "state": {
            "type": "string",
            "pattern": "^[a-z_]+$"
          },
          "timeOffType": {
            "type": "string",
            "pattern": "^[a-z_]+$"
          },
          "requesterComments": {
            "type": "string",
            "nullable": true
          },
          "rejectionReason": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "pattern": "^[a-z_]+$"
          },
          "periodInHours": {
            "type": "number",
            "format": "float"
          }
        },
        "required": [
          "timeOffRequestId",
          "engagement",
          "startDate",
          "endDate",
          "state",
          "timeOffType",
          "requesterComments",
          "rejectionReason",
          "reason",
          "periodInHours"
        ]
      },
      "timeOffRequests": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/timeOffRequest"
        }
      }
    }
  },
  "paths": {
    "/v0.1/time_off/requests": {
      "get": {
        "summary": "Retrieve all requests",
        "tags": [
          "Time Off",
          "time_off",
          "@oysterhr/prepay"
        ],
        "description": "Returns all Time Off Requests for a company. Optionally filter by engagement.",
        "security": [
          {
            "bearer_auth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "engagement_ids[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "required": false,
            "description": "Return only the Time Off Requests for the engagements with these IDs."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful",
            "content": {
              "application/json": {
                "examples": {
                  "No requests": {
                    "value": {
                      "data": [],
                      "meta": {
                        "items": 100,
                        "count": 0,
                        "page": 1,
                        "pages": 1,
                        "firstUrl": "/v0.1/time_off/requests?perPage=100&page=1",
                        "lastUrl": "/v0.1/time_off/requests?perPage=100&page=1",
                        "pageUrl": "/v0.1/time_off/requests?perPage=100&page=1",
                        "nextUrl": "/v0.1/time_off/requests?perPage=100&page=",
                        "prevUrl": "/v0.1/time_off/requests?perPage=100&page="
                      }
                    }
                  },
                  "Successful": {
                    "value": {
                      "data": [
                        {
                          "timeOffRequestId": "Abce6d0f",
                          "engagement": {
                            "engagementId": "A5540727",
                            "name": "Elba Corwin",
                            "type": "employment",
                            "countryCode": "US"
                          },
                          "startDate": "2020-02-03",
                          "endDate": "2020-02-04",
                          "startDateTimePeriod": "full_day",
                          "endDateTimePeriod": "full_day",
                          "startDateHours": null,
                          "endDateHours": null,
                          "state": "submitted",
                          "timeOffType": "vacation",
                          "requesterComments": "Need a rest",
                          "rejectionReason": null,
                          "reason": "paid_time_off",
                          "periodInHours": 16
                        },
                        {
                          "timeOffRequestId": "B41a79c9",
                          "engagement": {
                            "engagementId": "B0b779a8",
                            "name": "Carly Jacobson",
                            "type": "employment",
                            "countryCode": "US"
                          },
                          "startDate": "2020-02-03",
                          "endDate": "2020-02-04",
                          "startDateTimePeriod": "full_day",
                          "endDateTimePeriod": "full_day",
                          "startDateHours": null,
                          "endDateHours": null,
                          "state": "approved",
                          "timeOffType": "vacation",
                          "requesterComments": "Need a rest",
                          "rejectionReason": null,
                          "reason": "paid_time_off",
                          "periodInHours": 16
                        },
                        {
                          "timeOffRequestId": "C1bd0c25",
                          "engagement": {
                            "engagementId": "C6c9d557",
                            "name": "Donya Upton",
                            "type": "employment",
                            "countryCode": "US"
                          },
                          "startDate": "2020-02-03",
                          "endDate": "2020-02-04",
                          "startDateTimePeriod": "full_day",
                          "endDateTimePeriod": "full_day",
                          "startDateHours": null,
                          "endDateHours": null,
                          "state": "rejected",
                          "timeOffType": "vacation",
                          "requesterComments": "Need a rest",
                          "rejectionReason": "reason",
                          "reason": "paid_time_off",
                          "periodInHours": 16
                        }
                      ],
                      "meta": {
                        "items": 100,
                        "count": 3,
                        "page": 1,
                        "pages": 1,
                        "firstUrl": "/v0.1/time_off/requests?perPage=100&page=1",
                        "lastUrl": "/v0.1/time_off/requests?perPage=100&page=1",
                        "pageUrl": "/v0.1/time_off/requests?perPage=100&page=1",
                        "nextUrl": "/v0.1/time_off/requests?perPage=100&page=",
                        "prevUrl": "/v0.1/time_off/requests?perPage=100&page="
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/timeOffRequests"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oysterhr.com",
      "description": "Production server"
    },
    {
      "url": "https://api-sandbox.oysterhr.com",
      "description": "Sandbox server"
    }
  ]
}
```