Skip to main content
GET
/
company
/
leaves-types
Get Leave Types
curl --request GET \
  --url https://api.projectcor.com/v1/company/leaves-types \
  --header 'Authorization: Bearer <token>'
{
  "total": 2,
  "perPage": 20,
  "page": 1,
  "lastPage": 1,
  "data": [
    {
      "id": 111,
      "name": "Custom leave",
      "type_code": "CODE",
      "company_id": 111,
      "created_at": "2024-12-06T13:02:53.000Z",
      "updated_at": "2024-12-06T13:02:53.000Z",
      "deleted_at": null,
      "icon_name": "icon name"
    },
    {
      "id": 12,
      "name": "flexday",
      "type_code": "UL12",
      "company_id": null,
      "created_at": "2022-09-14T12:09:10.000Z",
      "updated_at": "2024-07-15T17:16:56.000Z",
      "deleted_at": null,
      "icon_name": "Loveseat"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
default:1

Page number (default: 1). Set to false to disable pagination.

perPage
integer
default:20

Number of items per page (default: 20).

Response

200 - application/json

Paginated list of leave types

Paginated response for leave types list

total

Total number of leave types

perPage
integer

Number of items per page

page
integer

Current page number

lastPage
integer

Last available page number

data
object[]

Array of leave types for the current page