getTimeTemplates

Request Method: GET

Description: Retrieves a list of all TimeTemplates

URL: https://api.iovox.com:444/Rules?v=3&method=getTimeTemplates

The following parameters can be sent in the querystring:

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES
pageThe page number to return. Use together with limit to achieve paginated results1INTEGERNO
limitDetermines how many results to return. Use together with page to achieve paginated results. Maximum here is 50005000INTEGERNO
orderDetermines which field to order the output result by. Use a field name from the req_fields list and suffix with ASC or DESC for ascending or descending respectively. For example, "lDESC" will return results ordered by labellDESCSTRINGNO
req_fieldsComma separated list of abbreviated fields to return in response. l=label, n=notes, tf=time_frames, c=createdl,n,tf,cSTRINGNO
time_template_labelReturns the TimeTemplates which have this label
STRINGNO

Result

Error Result

HTTP CodeError StringResolution
400API Version EmptyAdd a value for the v parameter in the query string
400API Version InvalidCorrect v parameter
400Request Method must be GET. x attemptedSwitch request method x to GET
400Page Number not an integerRemove non-numerics from page
400Limit not an integerRemove non-numerics from limit
400Limit must be between 1 and 5000Correct the limit parameter
400Output Type InvalidCorrect output parameter
500Internal Server ErrorRetry later

Success Result

<?xml version="1.0" encoding="UTF-8"?><response>
     <current_page>1</current_page>
     <total_pages>1</total_pages>
     <total_results>1</total_results>
     <results>
         <result>
             <label>Working hours in 2012</label>
             <time_frames>
                 <time_frame>
                     <date_from>2012-01-01</date_from>
                     <date_to>2012-12-31</date_to>
                     <recurrence>NONE</recurrence>
                     <time_from>09:00</time_from>
                     <time_to>18:00</time_to>
                     <days>
                         <day>MON</day>
                         <day>TUE</day>
                         <day>WED</day>
                         <day>THU</day>
                     </days>
                 </time_frame>                           
                 <time_frame>
                     <date_from>2012-01-01</date_from>
                     <date_to>2012-12-31</date_to>
                     <recurrence>NONE</recurrence>
                     <time_from>09:00</time_from>
                     <time_to>18:00</time_to>
                     <days>
                         <day>FRI</day>
                     </days>
                 </time_frame>
             </time_frames>
         </result>
     </results>
 </response>