Create a Time Range for a Time Frame

POST/?object=timerange&action=create

Request URL

POST
https://uc.hopdial.com/ns-api/?object=timerange&action=create

Send 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

NameTypeDescription
time_frame
optionalbody
string

Name of the Time Frame to apply the Time Range to

owner
optionalbody
string

User Ex. 204 or * if timeframe for the domain

owner_domain
optionalbody
string

Domain of the user

days
optionalbody
string

Integer starting with Sunday being 0, Monday being 1, Tuesday being 2, ...

tod_from
optionalbody
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_to
optionalbody
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_from
optionalbody
string

Date in year-m-day format. Example 2017-10-17

date_to
optionalbody
string

Date in year-m-day format. Example 2017-10-17

invert
optionalbody
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.

order
optionalbody
string

Order

Example request

shell
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

400 · application/json
{}

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.