Table of contents

    Overview

    Leave applications track leave that staff members have applied for and the approval state of these applications. To call the leave application endpoint, refer to the following table:’

    URL GET PUT POST DELETE
    https://api.mypcorp.com/LeaveApplication
    https://api.mypcorp.com/LeaveApplication/{StaffGuid}

    Get

    The following table illustrates which fields can be included when receiving a GET response.

    Field Description
    LeaveGuid
    Guid
    Unique identifier for the leave application.
    LeaveType
    string
    Name of the leave type, per 94six settings.
    LeaveCode
    string
    LeaveCode for the leave type, per 94six settings.
    StaffGuid
    Guid
    Identifier for staff member the leave application is for
    StartDate
    date
    Starting date for period applied for. (does not include any applicable starting time)
    EndDate
    date
    Ending date for period applied for. (does not include any applicable ending time)
    TotalRequestedHours
    decimal
    Total requested hours to be deducted from entitlements. Not necessarily a direct product of the period of leave requested.
    StaffNotes
    string
    Notes and/or reason left by the staff member when applying.
    ApprovalStatus
    string
    Current approval status of the leave request; refer to following potential values:
    PRE_SUBMISSION
    SUBMITTED
    VERIFIED
    APPROVED
    PENDING
    DISAPPROVED
    AWAITING_EXEC_DECISION
    APPROVED_BY_EXEC
    PENDING_BY_EXEC
    DISAPPROVED_BY_EXEC
    ApprovalDate
    datetime
    Date that the application was approved if applicable.
    CreationDate
    datetime
    Date the application was first submitted.
    ArchiveDate
    datetime
    Date the application was archived, if applicable.
    {
        "@odata.context": "https://api.mypcorp.com/$metadata#LeaveApplication",
        "value": [
            {
                "LeaveGuid": "2600fafc-201f-418d-9082-b9934b9f1e24",
                "LeaveType": "Annual Leave",
                "LeaveCode": "AL",
                "StaffGuid": "980f5487-7fd3-4c48-9398-307439b731cf",
                "StartDate": "2022-10-27",
                "EndDate": "2022-10-27",
                "TotalRequestedHours": 8.00,
                "StaffNotes": "Taking a day off",
                "ApprovalStatus": "APPROVED",
                "ApprovalDate": "2022-11-24T00:00:00+10:00",
                "CreationDate": "2022-10-27T12:03:05.693+10:00",
                "ArchiveDate": null
            }
        ]
    }

    Previous article Next article