Adds work breaks

Adds work breaks to the route.

Request

POST

https://courier.yandex.ru/api/v1/companies/{company_id}/routes/{route_id}/work_breaks

Path parameters

Name

Description

company_id*

Type: integer

Company ID used in requests to the Track & Trace API.

route_id*

Type: integer

Route ID used in requests to the Track & Trace API.

Body

application/json
[
    {
        "rest_duration_s": 0,
        "work_time_range_till_rest": "string"
    }
]

CreateWorkBreak[]

CreateWorkBreak

Name

Description

rest_duration_s*

Type: integer

Duration of rest, seconds.

Min value: 1

work_time_range_till_rest*

Type: string

Minimal and maximal duration of work before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]].

Responses

200 OK

Work breakes were added.

Body

application/json
[
    {
        "id": 0,
        "sequence_pos": 0
    }
]

WorkBreakInfo[]

WorkBreakInfo

Name

Description

id*

Type: integer

Work break ID used in requests to the Track & Trace API.

sequence_pos*

Type: integer

Position of work break.

401 Unauthorized

Authorization error. Make sure that the request header contains the correct OAuth token.

403 Forbidden

Error accessing the object. The user doesn't have the rights to access the object.

422 Unprocessable Entity

Incorrect input. The operation can't be performed.