schedules

Org Schedule Fragments Create

POST
Creates an organization schedule fragment.

Request

This endpoint expects an object.
from
datetimeRequired
Date (inclusive) on which the organization schedule fragment begins.
intervals
list of objectsRequired
The intervals that comprise the schedule fragment.
name
stringRequired
Name of the organization schedule fragment.
to
datetimeRequired
Date (exclusive) on which the organization schedule fragment's validity ends.
region_codes
list of stringsOptional
CLDR region code of the countries/regions it is meant to be valid for. Does not drive logic, serves only for easier filtering and organization.

Response

This endpoint returns an object
org_schedule_fragment
object
POST
1curl -X POST https://api.devrev.ai/org-schedule-fragments.create \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "from": "2023-01-01T12:00:00Z",
6 "intervals": [
7 {
8 "from": "2023-01-01T12:00:00Z",
9 "name": "name"
10 }
11 ],
12 "name": "name",
13 "to": "2023-01-01T12:00:00Z"
14}'
200Successful
1{
2 "org_schedule_fragment": {
3 "id": "id",
4 "status": "archived",
5 "created_date": "2023-01-01T12:00:00Z",
6 "display_id": "display_id",
7 "from": "2023-01-01T12:00:00Z",
8 "intervals": [
9 {}
10 ],
11 "modified_date": "2023-01-01T12:00:00Z",
12 "name": "name",
13 "region_codes": [
14 "region_codes"
15 ],
16 "to": "2023-01-01T12:00:00Z"
17 }
18}