getBlockedNumbers¶
Request Method: GET
Description: Retrieves a list of Blocked Numbers and their Details.
URL: https://api.iovox.com:444/Rules?v=3&method=getBlockedNumbers
The following parameters can be sent in the querystring:
| Parameter | Description | Default Value | Data Type | Mandatory | 
| v | API version to use | INTEGER | YES | |
| number | Returns all Blocked Numbers with this Number | STRING | NO | |
| operator | Returns all Blocked Numbers with this Operator | STRING | NO | |
| in_or_out | Returns all Blocked Numbers with respectively in or out | STRING | NO | |
| req_fields | Comma separated list of abbreviated fields to return in response. no = Number, op = Operator, ioo = Inbound Or Outbound, nn = Number Notes, rules = Special time based rules | no,op,ioo,nn | STRING | 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, "no_DESC" will return results ordered by Number on descending alfabetical order. | no_ASC | STRING | NO | 
| output | Specifying XML or JSON returns data in XML or JSON format | XML | 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 | Output Type Invalid | Correct output parameter | 
| 400 | Order Direction Invalid | Correct the direction in the order. | 
| 400 | Required Fields Invalid: fieldone,fieldtwo | Correct or remove fieldone and fieldtwo | 
| 400 | Order Field Invalid | Check the allowed abbreviation fields in the documentation | 
| 400 | Number does not exist | Correct number parameter | 
| 400 | In Or Out Invalid | Correct in_or_out parameter | 
| 400 | Operator Invalid | Correct operator 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>4</total_results>
    <results>
        <result>
            <number>447429651520</number>
            <in_or_out>in</in_or_out>
            <operator>equals</operator>
            <notes></notes>
            <default>BLOCK</default>
            <rules/>
        </result>
        <result>
            <number>447429651521</number>
            <in_or_out>in</in_or_out>
            <operator>equals</operator>
            <notes></notes>
            <default>ALLOW</default>
            <rules/>
        </result>
        <result>
            <number>447429651522</number>
            <in_or_out>in</in_or_out>
            <operator>equals</operator>
            <notes></notes>
            <default>BLOCK</default>
            <rules>
                <rule>
                    <links>
                        <link_id>01</link_id>
                    </links>
                    <time_template>Christmas</time_template>
                    <blocking_type>ALLOW</blocking_type>
                </rule>
                <rule>
                    <links>
                        <link_id>02</link_id>
                    </links>
                    <time_template>Christmas</time_template>
                    <blocking_type>ALLOW</blocking_type>
                </rule>
                <rule>
                    <links/>
                    <time_template>Christmas</time_template>
                    <blocking_type>ALLOW</blocking_type>
                </rule>
                <rule>
                    <links>
                        <link_id>03</link_id>
                    </links>
                    <time_template/>
                    <blocking_type>ALLOW</blocking_type>
                </rule>
                <rule>
                    <links>
                        <link_id>04</link_id>
                    </links>
                    <time_template/>
                    <blocking_type>ALLOW</blocking_type>
                </rule>
            </rules>
        </result>
        <result>
            <number>447429651523</number>
            <in_or_out>in</in_or_out>
            <operator>equals</operator>
            <notes></notes>
            <default>ALLOW</default>
            <rules>
                <rule>
                    <links>
                        <link_id>01</link_id>
                    </links>
                    <time_template>Christmas</time_template>
                    <blocking_type>BLOCK</blocking_type>
                </rule>
                <rule>
                    <links>
                        <link_id>02</link_id>
                    </links>
                    <time_template>Christmas</time_template>
                    <blocking_type>BLOCK</blocking_type>
                </rule>
                <rule>
                    <links/>
                    <time_template>Christmas</time_template>
                    <blocking_type>BLOCK</blocking_type>
                </rule>
                <rule>
                    <links>
                        <link_id>03</link_id>
                    </links>
                    <time_template/>
                    <blocking_type>BLOCK</blocking_type>
                </rule>
                <rule>
                    <links>
                        <link_id>04</link_id>
                    </links>
                    <time_template/>
                    <blocking_type>BLOCK</blocking_type>
                </rule>
            </rules>
        </result>
    </results>
</response>