# Get Profile Entitlements

GET https://api.letsdeel.com/rest/v2/time_offs/profile/{hris_profile_id}/entitlements

List time-off entitlements.
 **Token scopes**: `time-off:read`

Reference: https://developer.deel.com/api/endpoints/time-off/get-time-off-entitlements

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /time_offs/profile/{hris_profile_id}/entitlements:
    get:
      operationId: get-time-off-entitlements
      summary: Get Profile Entitlements
      description: |-
        List time-off entitlements.
         **Token scopes**: `time-off:read`
      tags:
        - subpackage_timeOff
      parameters:
        - name: hris_profile_id
          in: path
          description: HRIS profile ID
          required: true
          schema:
            type: string
            format: uuid
        - name: policy_type_name
          in: query
          required: false
          schema:
            $ref: >-
              #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetParametersPolicyTypeName
        - name: tracking_period_date
          in: query
          description: Tracking period date
          required: false
          schema:
            type: string
            format: date
        - name: Authorization
          in: header
          description: >
            ## Authentication

            The Deel API uses bearer tokens to authenticate requests. All API
            calls must be made over HTTPS — calls over plain HTTP or without
            authentication will fail.


            ```curl

            curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
              -H 'Authorization: Bearer YOUR-TOKEN-HERE'
            ```


            [Learn more about authentication](/api/authentication)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/time-off_getTimeOffEntitlements_Response_200
        '400':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '401':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '403':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '404':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '500':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
servers:
  - url: https://api.letsdeel.com/rest/v2
  - url: https://api-staging.letsdeel.com/rest/v2
components:
  schemas:
    TimeOffsProfileHrisProfileIdEntitlementsGetParametersPolicyTypeName:
      type: string
      enum:
        - Moving leave
        - Adoption leave
        - Personal leave
        - Parental leave
        - Military leave
        - Childbirth leave
        - Study leave
        - Sick leave
        - Bereavement leave
        - Family & domestic violence leave
        - Marriage/wedding leave
        - Blood donation leave
        - Volunteer leave
        - Vacation
        - Doctor's appointment leave
        - Maternity leave
        - Hajj leave
        - Paternity leave
        - Civic/public duty leave
        - Childcare leave
        - Unpaid leave
        - Paid leave
        - Other leave
        - Disability leave
        - Pregnancy leave
        - RTT
        - Regional holiday
        - Breastfeeding leave
        - Advanced vacation
      description: Policy type name
      title: TimeOffsProfileHrisProfileIdEntitlementsGetParametersPolicyTypeName
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsEventsItemsType:
      type: string
      enum:
        - ACCRUAL
        - ACCRUAL_DEDUCTION
        - ACCRUAL_PRORATE
        - ACCRUAL_TERMINATION
        - MANUAL_ADJUSTMENT
        - NO_ROLLOVER
        - ROLLOVER_ADJUSTMENT
        - ROLLOVER_CARRY_OVER
        - ROLLOVER_EXPIRATION
        - ROLLOVER_PAYOUT
        - ROLLOVER_PROJECTED
        - TIME_OFF
      description: Event type
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsEventsItemsType
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsEventsItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Event ID
        type:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsEventsItemsType
          description: Event type
        amount:
          type: number
          format: double
          description: Event amount
        policy_id:
          type: string
          format: uuid
          description: Policy ID
        created_at:
          type: string
          format: date-time
          description: Event creation date
        event_date:
          type: string
          format: date-time
          description: Event date
        profile_id:
          type: string
          format: uuid
          description: Profile ID
        updated_at:
          type: string
          format: date-time
          description: Event update date
        description:
          type: string
          description: Event description
        time_off_id:
          type: string
          format: uuid
          description: Time off ID
        accrual_date:
          type: string
          format: date-time
          description: Accrual date
        expiration_date:
          type: string
          format: date-time
          description: Expiration date
        tracking_period:
          type: string
          format: date-time
          description: Tracking period
        rollover_tracking_period:
          type: string
          format: date-time
          description: Rollover tracking period
      required:
        - id
        - type
        - amount
        - policy_id
        - created_at
        - profile_id
        - updated_at
        - tracking_period
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsEventsItems
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyLeaveType:
      type: string
      enum:
        - SHORT_TERM_LEAVE
        - LONG_TERM_LEAVE
      description: Leave type
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyLeaveType
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyPolicyType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Policy type ID
        name:
          type: string
          description: Policy type name
      required:
        - id
        - name
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyPolicyType
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTrackingUnit:
      type: string
      enum:
        - HOUR
        - BUSINESS_DAY
        - CALENDAR_DAY
        - WEEK
        - MONTH
        - YEAR
      description: Tracking unit
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTrackingUnit
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTimeOffTypesItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Time off type ID
        name:
          type: string
          description: Time off type name
      required:
        - id
        - name
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTimeOffTypesItems
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTrackingCadence:
      type: string
      enum:
        - FIXED_DAY
        - ANNIVERSARY
      description: Tracking cadence
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTrackingCadence
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicy:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Policy ID
        name:
          type: string
          description: Policy name
        created_at:
          type: string
          format: date-time
          description: Policy creation date
        leave_type:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyLeaveType
          description: Leave type
        updated_at:
          type: string
          format: date-time
          description: Policy update date
        description:
          type: string
          description: Policy description
        policy_type:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyPolicyType
        tracking_unit:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTrackingUnit
          description: Tracking unit
        policy_type_id:
          type: string
          format: uuid
          description: Policy type ID
        time_off_types:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTimeOffTypesItems
        tracking_cadence:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicyTrackingCadence
          description: Tracking cadence
        tracking_start_date:
          type: string
          format: date
          description: Tracking start date
        tracking_unit_amount:
          type: number
          format: double
          description: Tracking unit amount
      required:
        - id
        - name
        - created_at
        - updated_at
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicy
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsRolloversItemsAmount:
      oneOf:
        - type: number
          format: double
        - type: string
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsRolloversItemsAmount
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsRolloversItems:
      type: object
      properties:
        amount:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsRolloversItemsAmount
        expiration_date:
          type: string
          format: date-time
          description: Rollover expiration date
        rollover_tracking_period:
          type: string
          format: date-time
          description: Rollover tracking period
      required:
        - amount
        - rollover_tracking_period
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsRolloversItems
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsAccrualUnit:
      type: string
      enum:
        - HOUR
        - BUSINESS_DAY
        - CALENDAR_DAY
        - WEEK
        - MONTH
        - YEAR
      description: Accrual unit
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsAccrualUnit
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsFutureEventsItemsType:
      type: string
      enum:
        - ACCRUAL
        - ACCRUAL_DEDUCTION
        - ACCRUAL_PRORATE
        - ACCRUAL_TERMINATION
        - MANUAL_ADJUSTMENT
        - NO_ROLLOVER
        - ROLLOVER_ADJUSTMENT
        - ROLLOVER_CARRY_OVER
        - ROLLOVER_EXPIRATION
        - ROLLOVER_PAYOUT
        - ROLLOVER_PROJECTED
        - TIME_OFF
      description: Event type
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsFutureEventsItemsType
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsFutureEventsItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Event ID
        type:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsFutureEventsItemsType
          description: Event type
        amount:
          type: number
          format: double
          description: Event amount
        policy_id:
          type: string
          format: uuid
          description: Policy ID
        created_at:
          type: string
          format: date-time
          description: Event creation date
        event_date:
          type: string
          format: date-time
          description: Event date
        profile_id:
          type: string
          format: uuid
          description: Profile ID
        updated_at:
          type: string
          format: date-time
          description: Event update date
        description:
          type: string
          description: Event description
        time_off_id:
          type: string
          format: uuid
          description: Time off ID
        accrual_date:
          type: string
          format: date-time
          description: Accrual date
        expiration_date:
          type: string
          format: date-time
          description: Expiration date
        tracking_period:
          type: string
          format: date-time
          description: Tracking period
        rollover_tracking_period:
          type: string
          format: date-time
          description: Rollover tracking period
      required:
        - id
        - type
        - amount
        - policy_id
        - created_at
        - profile_id
        - updated_at
        - tracking_period
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsFutureEventsItems
    TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItems:
      type: object
      properties:
        id:
          type: string
          description: Entitlement ID
        used:
          type: string
          description: Used time off
        events:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsEventsItems
        policy:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsPolicy
        accrued:
          type:
            - string
            - 'null'
          description: Accrued time off
        expired:
          type: string
          description: Expired time off
        approved:
          type: string
          description: Approved time off
        allowance:
          type:
            - string
            - 'null'
          description: Time off allowance
        available:
          type:
            - string
            - 'null'
          description: Available time off. Will be null if is_allowance_unlimited is true
        requested:
          type: string
          description: Requested time off
        rollovers:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsRolloversItems
        accrual_unit:
          $ref: >-
            #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsAccrualUnit
          description: Accrual unit
        future_events:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItemsFutureEventsItems
        accrual_amount:
          type: string
          description: Accrual amount
        tracking_period:
          type: string
          description: Tracking period
        balance_adjusted:
          type:
            - string
            - 'null'
          description: Balance adjusted
        time_off_event_id:
          type: string
          description: Time off event ID
        upcoming_accruals:
          type: string
          description: Upcoming accruals
        total_entitlements:
          type: string
          description: Total entitlements
        past_tracking_periods:
          type: array
          items:
            type: string
        is_allowance_unlimited:
          type: boolean
          description: True when the allowance is unlimited
        tracking_period_end_date:
          type: string
          description: Tracking period end date
      required:
        - available
        - tracking_period
        - total_entitlements
        - is_allowance_unlimited
        - tracking_period_end_date
      title: >-
        TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItems
    time-off_getTimeOffEntitlements_Response_200:
      type: object
      properties:
        entitlements:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsProfileHrisProfileIdEntitlementsGetResponsesContentApplicationJsonSchemaEntitlementsItems
        hris_profile_id:
          type: string
          description: HRIS profile ID
      required:
        - entitlements
        - hris_profile_id
      title: time-off_getTimeOffEntitlements_Response_200
    ApiErrorRequest:
      type: object
      properties:
        method:
          type: string
          description: The HTTP method of the failed request
        url:
          type: string
          description: The relative URL of the failed request
        status:
          type: number
          format: double
          description: The status code of the response
        api_req_id:
          type: string
          description: The request ID of the failed request
        docs:
          type: string
          description: >-
            A link to the official documentation for the requested endpoint
            resource
        source:
          type: string
          description: The source handler which produced the returned error
        code:
          type: number
          format: double
          description: The code of the source handler which produced the returned error
      title: ApiErrorRequest
    ApiError:
      type: object
      properties:
        message:
          type: string
          description: A description of the returned error
        path:
          type: string
          description: The JSON path where input validation failed
      title: ApiError
    ApiErrorContainer:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/ApiErrorRequest'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      title: ApiErrorContainer
  securitySchemes:
    deelToken:
      type: http
      scheme: bearer
      description: >
        ## Authentication

        The Deel API uses bearer tokens to authenticate requests. All API calls
        must be made over HTTPS — calls over plain HTTP or without
        authentication will fail.


        ```curl

        curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
          -H 'Authorization: Bearer YOUR-TOKEN-HERE'
        ```


        [Learn more about authentication](/api/authentication)
    oauth2:
      type: http
      scheme: bearer
      description: >-
        Standard OAuth2 security scheme based on
        https://swagger.io/docs/specification/authentication/

```

## SDK Code Examples

```python
import requests

url = "https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements"

querystring = {"tracking_period_date":"2022-01-01"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/time_offs/profile/d290f1ee-6c54-4b01-90e6-d701748f0851/entitlements?tracking_period_date=2022-01-01")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```