---
metadata:
  - name: generator
    content: Diplodoc Platform v5.19.6
alternate:
  - https://docs.routeq.com/doc/en/delivery/functions/courier-breaks.md
title: RouteQ — functions — courier breaks
---
> **Documentation Index:** Fetch the complete configuration index at https://docs.routeq.com/doc/en/llms.txt


# Courier breaks

You can set courier breaks during route [planning](https://docs.routeq.com/doc/en/vrp/properties-of-vehicles-rest-schedule.md#rest-schedule), after the route has been exported to Track & Trace, and even when the courier is already en route. Breaks aren't displayed on the [map](https://docs.routeq.com/doc/en/delivery/interface/map.md), but are considered when [ETA is calculated](https://docs.routeq.com/doc/en/delivery/functions/eta.md).

## Add a break {#add-break}

To add breaks to the courier's route, send a POST request to the [work_breaks](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsWorkBreaks) resource.

In the request, specify `company_id` and `route_id`.

In the request body, specify:
* `rest_duration_s`: Break duration in seconds (the minimum value is 1).
* `work_time_range_till_rest`: Working hours before break, in the following format: `[D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]]`.

#### Request {#add-request}

cURL
  
  ```html
  curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X POST -d @<Path_to_file_in_UTF-8_encoding> https://courier.yandex.ru/api/v1/companies/<your-company-id>/routes/<route-id>/work_breaks
  ```

File

  ```json
  [
   {
     "work_time_range_till_rest": "01:00:00-01:30:00",
     "rest_duration_s": 3600
    },
    {
     "work_time_range_till_rest": "02:30:00-03:00:00",
     "rest_duration_s": 1800
    }
  ]
  ```

#### Result {#add-result}

```json
[
 {
  "break_id": 1,
  "sequence_pos": 0,
  "work_time_range_till_rest": "01:00:00 - 01:30:00",
  "rest_duration_s": 1800
 },
{
  "break_id": 2,
  "sequence_pos": 1,
  "work_time_range_till_rest": "02:30:00 - 03:00:00",
  "rest_duration_s": 1800
 },
]
```

## Get break information {#get-break}

To get information about courier breaks on the route, send a GET request to the resource [work_breaks](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsWorkBreaks).

#### Request {#get-request}

cURL

```html
curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X GET -d https://courier.yandex.ru/api/v1/companies/<your-company-id>/routes/<route-id>/work_breaks
```

#### Result {#get-result}

```json
[
    {
        "id": 1,
        "sequence_pos": 0,
        "work_time_range_till_rest": "01:00:00 - 01:30:00",
        "rest_duration_s": 3600
    },
    {
        "id": 2,
        "sequence_pos": 1,
        "work_time_range_till_rest": "02:30:00 - 03:00:00",
        "rest_duration_s": 1800
    }
]
```

## Delete a break {#delete-break}

To delete a break, send a DELETE request to the resource [work_breaks](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/deletesWorkBreak).

#### Request {#delete-request}

cURL
  
```html
curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X DELETE -d https://courier.yandex.ru/api/v1/companies/<your-company-id>/routes/<route-id>/work_breaks/<break-id>
```

#### Result {#delete-result}

```json
{
    "id": 1,
    "sequence_pos": 0
}
```

{% include [warehouse-feedback](../_includes/feedback-7b71896f9bc3.md) %}
