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:
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES | |
page | The page number to return. Use together with limit to achieve paginated results | 1 | INTEGER | NO |
limit | Determines how many results to return. Use together with page to achieve paginated results. Maximum here is 5000 | 5000 | INTEGER | NO |
order | Determines 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 label | lDESC | STRING | NO |
req_fields | Comma separated list of abbreviated fields to return in response. l=label, n=notes, tf=time_frames, c=created | l,n,tf,c | STRING | NO |
time_template_label | Returns the TimeTemplates which have this label | STRING | NO |
Result¶
Error Result¶
HTTP Code | Error String | Resolution |
400 | API Version Empty | Add a value for the v parameter in the query string |
400 | API Version Invalid | Correct v parameter |
400 | Request Method must be GET. x attempted | Switch request method x to GET |
400 | Page Number not an integer | Remove non-numerics from page |
400 | Limit not an integer | Remove non-numerics from limit |
400 | Limit must be between 1 and 5000 | Correct the limit parameter |
400 | Output Type Invalid | Correct output parameter |
500 | Internal Server Error | Retry 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>