Create a Time Range for a Time Frame
/?object=timerange&action=createRequest URL
https://uc.hopdial.com/ns-api/?object=timerange&action=createSend your access token in the Authorization: Bearer header. Body parameters are sent as application/x-www-form-urlencoded. New to the API? Start with authentication and rate limits.
Time Ranges
To create a time frame for Business hours Monday through Friday it would take 5 time range records with specific days for reach day of the week. So there would be 5 with the first starting Days => 1 for Monday through Days => 5 for Friday. Also, make sure the order 1 gets set on the Monday timerange record and order 5 gets set on the Friday timerange record.
Parameters
| Name | Type | Description |
|---|---|---|
time_frameoptionalbody | string | Name of the Time Frame to apply the Time Range to |
owneroptionalbody | string | User Ex. 204 or * if timeframe for the domain |
owner_domainoptionalbody | string | Domain of the user |
daysoptionalbody | string | Integer starting with Sunday being 0, Monday being 1, Tuesday being 2, ... |
tod_fromoptionalbody | string | Time of the day to start 00:00 format. Ex. 9 am would be 09:00. Can also use special format: now, never |
tod_tooptionalbody | string | Time of the day to start 00:00 format. Ex. 9 am would be 09:00. Can also use special format: now, never |
date_fromoptionalbody | string | Date in year-m-day format. Example 2017-10-17 |
date_tooptionalbody | string | Date in year-m-day format. Example 2017-10-17 |
invertoptionalbody | string | Not quite sure what this does, but maybe applies the opposite of the timeframe so if between 9 am and 5 pm. It will apply before 5am and after 5pm. |
orderoptionalbody | string | Order |
Example request
curl https://uc.hopdial.com/ns-api/ \
-H 'Authorization: Bearer 7bet078rqljh451l31uh34lsd0f80dsf' \
-d object='timerange' \
-d action='create' \
-d owner= '*' \
-d owner_domain= 'abc-company.11111.service' \
-d time_frame = 'Business Hours'
-d days = '1' \
-d tod_from = '09:00' \
-d tod_to = '17:00' \
-d date_from = 'now' \
-d date_to = 'never' \
-d invert = 'no' \
-d order = '1'
Responses
{}More Time Frames endpoints
Create the business-hours schedules that answering rules use.
Need a Client ID and Client Secret or help with this endpoint? Contact HopDial support or call (866) 305-0407.