schedules

Org Schedules Transition

POST
Publishes or archives an organization schedule.

Request

This endpoint expects an object.
id
stringRequired
Organization schedule ID.
status
enumRequired
Status determines how an item can be used. In 'draft' status an item can be edited but can't be used. When 'published' the item can longer be edited but can be used. 'Archived' is read-only.
Allowed values: archiveddraftpublished

Response

This endpoint returns an object
org_schedule
object
POST
1curl -X POST https://api.devrev.ai/org-schedules.transition \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "id": "id",
6 "status": "archived"
7}'
200Successful
1{
2 "org_schedule": {
3 "id": "id",
4 "status": "archived",
5 "created_date": "2023-01-01T12:00:00Z",
6 "default_weekly_org_schedule": {
7 "default_weekly_org_schedule": {
8 "key": "value"
9 }
10 },
11 "display_id": "display_id",
12 "min_valid_days": 1,
13 "modified_date": "2023-01-01T12:00:00Z",
14 "name": "name",
15 "org_schedule_fragments": [
16 {}
17 ],
18 "timezone": "timezone",
19 "valid_until": "2023-01-01T12:00:00Z",
20 "weekly_org_schedules": [
21 {}
22 ]
23 }
24}