Add a Holiday
Adds a holiday to a business hours profile.
Request URL
POST {base_url}/uc-cconfig/api/v1/business-hours-profiles/{profileId}/holidays
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code No String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Path parameters
-
Parameter Required Type Description profileId Yes String The ID of the business hours profile. You can obtain the ID using the Search Business Hours Profiles interface.
- Body parameters
-
Parameter Required Type Description name Yes String The name of the holiday. The value ranges from 1 to 255 characters. type Yes String The date type of the holiday.
Valid value:
FIXED_DATE: A fixed date.DATE_RANGE: A date range.RELATIVE_DATE: A relative date.
fixedDate No String The fixed date. This parameter is used when type is FIXED_DATE.rangeStartDate No String The start date of the range. This parameter is used when type is DATE_RANGE.rangeEndDate No String The end date of the range. This parameter is used when type is DATE_RANGE.relMonth No Integer The month of the relative date, ranging from 1 to 12. relOccurrence No String The occurrence of the relative date.
Valid value:
FIRSTSECONDTHIRDFOURTHLAST
relWeekday No String The day of the week of the relative date.
Valid value:
SUNMONTUEWEDTHUFRISAT
startTime Yes String The start time of the holiday in HH:mmformat.endTime Yes String The end time of the holiday in HH:mmformat.repeatAnnually No Boolean Whether the holiday repeats every year.
Valid value:
true: Repeats annually.false: Does not repeat.
endsType No String How the annual repeat ends.
Valid value:
NEVER: The repeat never ends.ON_DATE: The repeat ends on endDate.
endDate No String The end date of the annual repeat. promptId No String The ID of the prompt that is played on the holiday. An empty string indicates no prompt. fullDay No Boolean Whether the holiday is a full day.
Valid value:
true: Full day, from 00:00 to 23:59.false: Only the specified time range.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Holiday> | The added holiday. |
- Holiday
-
Parameter Type Description id String The ID of the holiday. name String The name of the holiday. type String The date type of the holiday:
FIXED_DATE: A fixed date.DATE_RANGE: A date range.RELATIVE_DATE: A relative date.
fixedDate String The fixed date. This parameter is used when type is FIXED_DATE.rangeStartDate String The start date of the range. This parameter is used when type is DATE_RANGE.rangeEndDate String The end date of the range. This parameter is used when type is DATE_RANGE.relMonth Integer The month of the relative date, ranging from 1 to 12. relOccurrence String The occurrence of the relative date:
FIRSTSECONDTHIRDFOURTHLAST
relWeekday String The day of the week of the relative date:
SUNMONTUEWEDTHUFRISAT
startTime String The start time of the holiday in HH:mmformat.endTime String The end time of the holiday in HH:mmformat.repeatAnnually Boolean Whether the holiday repeats every year.
true: Repeats annually.false: Does not repeat.
endsType String How the annual repeat ends:
NEVER: The repeat never ends.ON_DATE: The repeat ends on endDate.
endDate String The end date of the annual repeat. promptId String The ID of the prompt that is played on the holiday. An empty string indicates no prompt. promptName String The name of the prompt. createdAt String The time when the holiday was created, in Unix timestamp format (milliseconds). updatedAt String The time when the holiday was last updated, in Unix timestamp format (milliseconds). fullDay Boolean Whether the holiday is a full day.
true: Full day.false: Only the specified time range.
Example
Request example
POST /uc-cconfig/api/v1/business-hours-profiles/375532373873614848/holidays HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzYyMjY0NCwiaWF0IjoxNzkzNjAxMDQ0LCJqdGkiOiIyMzU2N2JhMC02MDFmLTQxNDMtYTFjNy1iOWM2MzUwZjgyMmIiLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6ImM4Mjg2MjNhLTVkZGYtNGExYS1iOWQ4LWJmNzY5YmMzYmQyZiIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.yjIo4A2kQM7UM_y8eHTgjqDmSnJwwPnRZskKLRBM9WXO8e35wlCgiEl92qdKEVF-T5iHDAi9wgoEAfZgvTT8sAb4VmdMjV3e-V--VxGpKpzTzcrxrA_GMQaHq-VjCskLINTP-DTVOHdMB3o46Sk3Rg8S2qv2zEI1W58WWHJaTuJu27msNcJEiixhXvvq6eqE2nw_ZZzWsCMlRItTu053nLTLrFfPOPKvS7CUXGNi9bkfqC5autEZQz1jG81wli4CKS7AbMS0f5gumsh6Lbat2RZgu6wj3fywkONhvfk-lRD4V21Jqi_VGbEXxMbanRG1TrmrEok7woZ037Lyf4MBNQ
x-tenant-code: colortest2
Content-Type: application/json
{
"name": "doc-test-holiday",
"type": "FIXED_DATE",
"fixedDate": "2026-12-25",
"startTime": "00:00",
"endTime": "23:59",
"fullDay": true,
"repeatAnnually": true,
"endsType": "NEVER"
}
Response example
HTTP/1.1 200 OK { "requestId": "a96d48d960d257108b55281147b79c16", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "0", "name": "doc-holiday-2", "type": "FIXED_DATE", "fixedDate": "2026-12-25", "rangeStartDate": "", "rangeEndDate": "", "relMonth": 0, "relOccurrence": "OCCURRENCE_UNSPECIFIED", "relWeekday": "SUN", "startTime": "00:00", "endTime": "23:59", "repeatAnnually": true, "endsType": "NEVER", "endDate": "", "promptId": "", "promptName": "", "createdAt": "1793601095125", "updatedAt": "1793601095125", "fullDay": true } }