getVariableRulesOfTemplate

Request Method: GET

Description: Retrieves the variables rules of a template. If the parameter link id is set then we will retrieve the rules variables with the current values applied to the link.

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

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
template_nameReturns the specified rule variables for the specific template name.
STRINGYES
link_idReturns the rule variables for the specified Link ID
STRINGNO
outputSpecifying XML or JSON returns data in XML or JSON formatXMLSTRINGNO

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
400Template Name does not existCorrect the Template Name parameter
400Link ID Doesn't existCorrect Link ID parameter
400Output Type InvalidCorrect output parameter
500Internal Server ErrorRetry later

Success Result

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <rules>
        <rule>
            <rule_id>1</rule_id>
            <rule_type>play</rule_type>
            <rule_label>Welcome</rule_label>
            <sound_files>
                <!-- Each sound file being sound group|sound label -->
                <sound_file>?|?</sound_file>
            </sound_files>
        </rule>
        <rule>
            <rule_id>2</rule_id>
            <rule_type>messageKeypress</rule_type>
            <rule_label>Options</rule_label>
            <play>
                <sound_files>
                    <sound_file>?|?</sound_file>
                    <sound_file>?|?</sound_file>
                </sound_files>
            </play>
        </rule>
        <rule>
            <rule_id>3</rule_id>
            <rule_type>play</rule_type>
            <rule_label>Play Option 1</rule_label>
            <sound_files>
                <sound_file>?|?</sound_file>
            </sound_files>
        </rule>
        <rule>
            <rule_id>4</rule_id>
            <rule_type>call</rule_type>
            <rule_label>Call</rule_label>
            <record_call>FALSE</record_call>
            <send_call_alert>NONE</send_call_alert>
            <contact>
                <contact_id>?</contact_id>
                <phone_number>?</phone_number>
            </contact>
            <caller_message>
                <sound_files>
                    <sound_file>?|?</sound_file>
                </sound_files>
            </caller_message>
            <called_message>
                <sound_files>
                    <sound_file>?|?</sound_file>
                    <sound_file>?|?</sound_file>
                </sound_files>
            </called_message>
        </rule>
        <rule>
            <rule_id>5</rule_id>
            <rule_type>failure</rule_type>
            <rule_label>Call Failed</rule_label>
            <failure_message>
                <sound_files>
                    <sound_file>?|?</sound_file>
                    <sound_file>?|?</sound_file>
                </sound_files>
            </failure_message>
        </rule>
        <rule>
            <rule_id>6</rule_id>
            <rule_type>failure</rule_type>
            <rule_label>Failure</rule_label>
            <nokey_messages>
                <sound_files>
                    <sound_file>?|?</sound_file>
                </sound_files>
            </nokey_messages>
            <unmatched_messages>
                <sound_files>
                    <sound_file>?|?</sound_file>
                </sound_files>
            </unmatched_messages>
        </rule>
        <rule>
            <rule_id>7</rule_id>
            <rule_type>play</rule_type>
            <rule_label>Play Failure</rule_label>
            <sound_files>
                <sound_file>?|?</sound_file>
            </sound_files>
        </rule>
    </rules>
</response>