# Get Work Schedule and Holidays

GET https://api.letsdeel.com/rest/v2/time_offs/dailies

Given a date range (start date, end date) gets the holidays, work schedule and time off dailies for a list of hrisProfileIds or countries.
 **Token scopes**: `time-off:read`

Reference: https://developer.deel.com/api/reference/endpoints/time-off/get-work-schedule-and-holidays

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /time_offs/dailies:
    get:
      operationId: get-work-schedule-and-holidays
      summary: Get Work Schedule and Holidays
      description: >-
        Given a date range (start date, end date) gets the holidays, work
        schedule and time off dailies for a list of hrisProfileIds or countries.
         **Token scopes**: `time-off:read`
      tags:
        - subpackage_timeOff
      parameters:
        - name: start_date
          in: query
          description: Start date of non working days date range
          required: false
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          description: End date of non working days date range
          required: false
          schema:
            type: string
            format: date
        - name: hris_profile_ids
          in: query
          description: HRIS profile ids
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: countries
          in: query
          description: List of countries to be fetched
          required: false
          schema:
            type: array
            items:
              type: string
        - 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 operation.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Time
                  Off_getWorkScheduleAndHolidays_Response_200
        '400':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetWorkScheduleAndHolidaysRequestBadRequestError
        '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:
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItemsType:
      type: string
      enum:
        - MANDATORY
        - OPTIONAL
        - HIDDEN
        - HOLIDAY
        - WORKING_DAY
      description: Type of the holiday
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItemsType
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItemsSource:
      type: string
      enum:
        - EXTERNAL
        - DEEL
        - ORGANIZATION_CUSTOM
        - ORGANIZATION_OVERRIDE
        - ORGANIZATION_CONVERT
      description: Source of creation of the holiday
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItemsSource
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItems:
      type: object
      properties:
        date:
          type: string
          format: date-time
          description: Date of the holiday
        name:
          type: string
          description: Name of the holiday
        type:
          $ref: >-
            #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItemsType
          description: Type of the holiday
        source:
          oneOf:
            - $ref: >-
                #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItemsSource
            - type: 'null'
          description: Source of creation of the holiday
        states:
          type: array
          items:
            type: string
          description: >-
            List of states where the holiday is celebrated, if empty it is a
            country holiday
        country:
          type: string
          description: The ISO 3166-1 alpha-2 country code.
        description:
          type:
            - string
            - 'null'
          description: Description of the holiday
        parsed_date:
          type: string
          format: date-time
          description: Parsed date time of the holiday
        is_mandatory:
          type: boolean
          description: Describes if the holiday is mandatory
        is_every_year:
          type: boolean
          description: Sets if the holiday is a recurring event
        formatted_date:
          type: string
          format: date
          description: Formated 'YYYY-MM-DD' date of the holiday
        name_variations:
          type: array
          items:
            type: string
          description: Alternative names or labels used to refer to this holiday
        created_by_profile_id:
          type:
            - number
            - 'null'
          format: double
          description: HRIS profile id of the creator of the holiday
      required:
        - date
        - name
        - type
        - source
        - description
        - is_mandatory
        - is_every_year
        - formatted_date
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItems
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsWorkScheduleWorkWeek:
      type: object
      properties:
        friday:
          type: number
          format: double
          description: Working hours on friday
        monday:
          type: number
          format: double
          description: Working hours on monday
        sunday:
          type: number
          format: double
          description: Working hours on sunday
        tuesday:
          type: number
          format: double
          description: Working hours on tuesday
        saturday:
          type: number
          format: double
          description: Working hours on saturday
        thursday:
          type: number
          format: double
          description: Working hours on thursday
        wednesday:
          type: number
          format: double
          description: Working hours on wednesday
      required:
        - friday
        - monday
        - sunday
        - tuesday
        - saturday
        - thursday
        - wednesday
      description: The work week schedule for the HRIS profile
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsWorkScheduleWorkWeek
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsWorkSchedule:
      type: object
      properties:
        work_week:
          $ref: >-
            #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsWorkScheduleWorkWeek
          description: The work week schedule for the HRIS profile
        hours_per_day:
          type: number
          format: double
          description: Working hours per day
        hris_profile_id:
          type: string
          format: uuid
          description: HRIS profile id
      description: Detail of working hours by week day for an HRIS profile
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsWorkSchedule
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsTimeOffDailiesItemsTimeOffDailyType:
      type: string
      enum:
        - HOLIDAY
        - WORKING_DAY
        - NON_WORKING_DAY
      description: Type of work status or holiday
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsTimeOffDailiesItemsTimeOffDailyType
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsTimeOffDailiesItems:
      type: object
      properties:
        date:
          type: string
          format: date
          description: Date of the daily
        time_off_daily_type:
          $ref: >-
            #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsTimeOffDailiesItemsTimeOffDailyType
          description: Type of work status or holiday
      required:
        - date
        - time_off_daily_type
      description: Date with holiday or work status by day
      title: >-
        TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsTimeOffDailiesItems
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        holidays:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsHolidaysItems
          description: 'List of holidays within the date range '
        work_schedule:
          $ref: >-
            #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsWorkSchedule
          description: Detail of working hours by week day for an HRIS profile
        time_off_dailies:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItemsTimeOffDailiesItems
          description: List of days with holiday or work status
      required:
        - holidays
        - work_schedule
        - time_off_dailies
      title: TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItems
    Time Off_getWorkScheduleAndHolidays_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaDataItems
          description: >-
            List of holiday and work schedule information grouped by HRIS
            profile, including holidays within the date range, work schedule
            details, and daily work status
      title: Time Off_getWorkScheduleAndHolidays_Response_200
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        path:
          type: string
          description: The JSON path where input validation failed
        message:
          type: string
          description: A description of the returned error
      title: TimeOffsDailiesGetResponsesContentApplicationJsonSchemaErrorsItems
    TimeOffsDailiesGetResponsesContentApplicationJsonSchemaRequest:
      type: object
      properties:
        url:
          type: string
          description: The relative URL of the failed request
        code:
          type: number
          format: double
          description: The code of the source handler which produced the returned error
        docs:
          type: string
          description: >-
            A link to the official documentation for the requested endpoint
            resource
        method:
          type: string
          description: The HTTP method of the failed request
        source:
          type: string
          description: The source handler which produced the returned error
        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
      title: TimeOffsDailiesGetResponsesContentApplicationJsonSchemaRequest
    GetWorkScheduleAndHolidaysRequestBadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaErrorsItems
        request:
          $ref: >-
            #/components/schemas/TimeOffsDailiesGetResponsesContentApplicationJsonSchemaRequest
      title: GetWorkScheduleAndHolidaysRequestBadRequestError
    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/dailies"

querystring = {"start_date":"2025-01-01","end_date":"2025-02-01","hris_profile_ids":"[\"d290f1ee-6c54-4b01-90e6-d701748f0851\"]","countries":"[\"US\"]"}

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/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D';
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/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D"

	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/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D")

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/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D")
  .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/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/time_offs/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D");
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/dailies?start_date=2025-01-01&end_date=2025-02-01&hris_profile_ids=%5B%22d290f1ee-6c54-4b01-90e6-d701748f0851%22%5D&countries=%5B%22US%22%5D")! 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()
```