Query parameters
- 
    
  One or more types to filter leaves by. Values are paid,unpaid,sick, orabsence.
- 
    
  One or more statuses to filter leaves by. Values are draft,cancelled,pending_approval,approved, orrejected.
- 
    
  One or more codes to filter leaves by. 
- 
    
  One or more person IDs to filter the results by. This is the people[].person._idvalue.
- 
    
  Limit the results by an overlapping date range. This is the date range start value. The overlapsDateRangeTois required as well. Format isoverlapsDateRangeFrom=<date>, e.g.overlapsDateRangeFrom=2025-02-24T00:00:00.000Z. The date is in ISOString.
- 
    
  Limit the results by an overlapping date range. This is the date range end value. The overlapsDateRangeFromis required as well. Format isoverlapsDateRangeTo=<date>, e.g.overlapsDateRangeTo=2025-02-28T00:00:00.000Z. The date is in ISOString.
- 
    
  One or more properties to be included in the response, instead of the full payload. E.g. select=endDate,projectStatus. You can also exclude fields by prefixing with a minus sign, e.g.select=-endDate,-projectStatus, but you cannot mix both.
- 
    
  Optionally, the field to sort the results by. By default, results are sorted by created date. Only updatedAtis supported at this moment (Note:updatedAtequals tocreatedAtfor documents that have never been updated).Value is updatedAt.
- 
    
  Optionally, the direction to sort the documents by. For ascending (oldest first) use either 1orasc. By default sorting is descending (latest first),-1ordesc.Values are 1,asc,-1, ordesc.
- 
    
  Optionally, change the default document response limit of 40.Minimum value is 1, maximum value is100. Default value is40.
- 
    
  Includes a countproperty in the response, which holds the total number of results matching the query. The value does not change between pages and represents the accurate, total number of results to be expected.Note: The use of this parameter will have a performance impact on the first paginated request. Values are false,true,0, or1.
curl \
 --request GET 'https://open.api.missionx.ai/v2/leaves' \
 --header "Authorization: Bearer $ACCESS_TOKEN"{
  "value": [
    {
      "_id": "string",
      "createdBy": "string",
      "createdAt": "2025-05-04T09:42:00Z",
      "updatedAt": "2025-05-04T09:42:00Z",
      "person": "string",
      "type": "paid",
      "status": "draft",
      "code": "string",
      "reason": "string",
      "dates": [
        {
          "_id": "string",
          "date": "2025-05-04T09:42:00Z",
          "hours": 42.0
        }
      ],
      "reviews": [
        {
          "_id": "string",
          "person": "string",
          "action": "cancelled",
          "actionedAt": "2025-05-04T09:42:00Z"
        }
      ]
    }
  ],
  "nextLink": "string",
  "count": 42.0
}