Перейти к содержимому
R-Service R-Service
Руководство разработчика RR Tech Service Management

Holidays API

Эта документация пока недоступна на вашем языке, поэтому показана английская версия.

List all holidays for an account:

GET /holidays
Status: 200 OK
[
{
"picture_uri": null,
"name": "2016 Company BBQ",
"created_at": "2016-03-14T03:09:42-06:00",
"sourceID": null,
"updated_at": "2016-03-14T03:09:42-06:00",
"end_at": "2016-06-18T00:00:00",
"start_at": "2016-06-17T16:00:00",
"id": 4,
"source": null
},
{
"picture_uri": null,
"name": "Christmas 2010",
"created_at": "2016-03-14T03:09:42-06:00",
"sourceID": null,
"updated_at": "2016-03-14T03:09:42-06:00",
"end_at": "2010-12-26T00:00:00",
"start_at": "2010-12-25T00:00:00",
"id": 2,
"source": null
},
"..."
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of holidays.

By default the following fields will appear in collections of holidays:

id source sourceID name picture_uri start_at end_at created_at updated_at

Obtain a different set of fields using the ?fields= parameter .

Filtering is available for the following fields :

id sourceID name start_at end_at created_at updated_at

The filters on sourceID , and name are not case sensitive.

By default a collection of holidays is sorted ascending by name .

The following fields are accepted by the ?sort= parameter :

id sourceID name created_at updated_at

GET /holidays/:id
Status: 200 OK
{
"picture_uri": null,
"name": "2016 Company BBQ",
"created_at": "2016-03-14T03:09:42-06:00",
"sourceID": null,
"updated_at": "2016-03-14T03:09:42-06:00",
"end_at": "2016-06-18T00:00:00",
"start_at": "2016-06-17T16:00:00",
"id": 4,
"source": null
}

The response contains these fields .

POST /holidays

When creating a new holiday these fields are available.

Status: 201 Created
{
"created_at": "...",
"...": "..."
}

The response contains all fields of the created holiday and is similar to the response in Get a single holiday

PATCH /holidays/:id

When updating a holiday these fields are available.

Status: 200 OK
{
"created_at": "...",
"...": "..."
}

The response contains all fields of the updated holiday and is similar to the response in Get a single holiday

created_at

Readonly datetime — The date and time at which the holiday was created.

end_at

Required datetime

id

Readonly integer — The unique ID of the holiday.

name

Required string (max 80) — The Name field is used to enter the name of the holiday.

picture_uri

Optional string — The hyperlink to the image file for the holiday.

source

Optional string (max 30) - See source

sourceID

Optional string (max 128) - See source

start_at

Required datetime

updated_at

Readonly datetime — The date and time of the last update of the holiday. If the holiday has no updates it contains the created_at value.