Get Time Off Requests

Sample Response

<requests>
    <request id="1">
        <employee id="1">Jon Doe</employee>
        <status lastChanged="2011-08-14" lastChangedByUserId="1">approved</status>
        <start>2001-01-01</start>
        <end>2001-01-06</end>
        <created>2011-08-13</created>
        <type id="1">Vacation</type>
        <amount unit="days">5</amount>
        <notes>
            <note from="employee">Relaxing in the country for a few days.</note>
            <note from="manager">Have fun!</note>
        </notes>
        <dates> <!-- This element may not be available for all requests -->
            <date ymd="2001-01-01" amount="1"/>
            <date ymd="2001-01-02" amount="1"/>
            <date ymd="2001-01-03" amount="1"/>
            <!-- dates with a 0 amount may not be included in the results. Included here for clarity -->
            <date ymd="2001-01-04" amount="0"/>
            <date ymd="2001-01-05" amount="1"/>
            <date ymd="2001-01-06" amount="1"/>
        </dates>
    </request>
</requests>

Parameters

  • id (optional) - A particular request ID to limit the response to.
  • action (optional, defaults to "view") - Limit to requests that the user has a particular level of access to. Legal values are: "view" or "approve".
  • employeeId (optional) - A particular employee ID to limit the response to.
  • start* (required) - Only show time off that occurs on/after the specified start date.
  • end* (required) - Only show time off that occurs on/before the specified end date.
  • type (optional) - A comma separated list of time off types IDs to include limit the response to. If omitted, requests of all types are included.
  • status (optional) - A comma separated list of request status values to include. If omitted, requests of all status values are included. Legal values are "approved", "denied", "superseded", "requested", "canceled".

Notes

The response will be limited to those employees and time off types that the owner of the API key used to make the request has view access to.

The start and end date parameters will show time off if any day in the time off request falls within the dates specified, even if part of the time off falls outside of the time specified.

Clients should be ready for any number of "note" elements.

If there are zero notes for a request then the "notes" tag will be still included as an empty array.

Newer time off requests may also include details for each day of the request in a element.

Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!