updateBlockedNumbers

Request Method: PUT

Description: Update Blocked Number details

URL: https://api.iovox.com:444/Links?v=3&method=updateBlockedNumbers

The following parameters must be sent in the querystring:

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES

Payload

The following XML payload must be sent with an updateBlockedNumbers request. See createBlockedNumbers for further Rule/Time/Links examples

<?xml version="1.0" encoding="utf-8"?>
<request>
    <blocked_number>
        <number>447429651522</number> <!-- Update blocking rule number 447429651522 to 447429651521. If rules exist for 447429651521, overwrite them -->
        <new_number>447429651521</new_number>
        <in_or_out>IN</in_or_out>
        <operator>EQUALS</operator>
        <default>ALLOW</default>
        <if_exist>OVERWRITE</if_exist>
        <rules/>
    </blocked_number>
    <blocked_number>
        <number>447429651523</number> <!-- Update blocking rule number inbound calling to be outbound calling. If outbound rules exist for 447429651523, overwrite them with Block calls to Link ID 33 during the Weekend Time Template -->
        <in_or_out>IN</in_or_out>
        <new_in_or_out>OUT</new_in_or_out>
        <operator>EQUALS</operator>
        <new_operator>STARTSWITH</new_operator>
        <default>ALLOW</default>
        <if_exist>OVERWRITE</if_exist>
        <rules>
            <rule>
                <links>
                    <link_id>33</link_id>
                </links>
                <time_template>Weekends</time_template>
                <blocking_type>BLOCK</blocking_type>
            </rule>
        </rules>
    </blocked_number>
</request>

Payload Description:

Node NameDescriptionDefault ValueData TypeMandatory
numberThe Blocked Number that has to be changed
STRINGYES
new_numberThe new value for the Blocked Number, if updating
STRINGNO
operatorThe Operator that has to be changed
STRINGYES, is the identifier together with number and in_or_out
new_operatorThe new value for Operator, if updating
STRINGNO
in_or_outThe in_or_out that has to be changed
STRINGYES, is the identifier together with number and operator  
new_in_or_outThe new value for In Or Out, if updating
STRINGNO
defaultThe new default value for this Blocked Number
STRINGNO
if_existsIf the Blocked Number (new_...) already exists, what do we do? OVERWRITE will overwrite, empty will throw an error
STRINGNO
rules>rule>links>link_idThe new Links we want to block this Number for
STRINGNO
rules>rule>time_templateThe new Time Template we want to block this Number for
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 PUT. x attemptedSwitch request method x to PUT
400XML EmptyAdd xml to the request body
400XML parse error. x at line y, column zCorrect XML at point x on line y, column z
400Request EmptyAdd Blocked Numbers to the request
400Number x of y EmptyAdd number x (item) of y (total)
400In Or Out x of y EmptyAdd in_or_out x (item) of y (total)
400Operator x of y EmptyAdd operator x (item) of y (total)
400In Or Out x of y InvalidCorrect in_or_out x (item) of y (total)
400Operator x of y InvalidCorrect operator x (item) of y (total)
400Combination of Number, In Or Out and Operator in Blocked Number x of y does not exists.Correct number, in_or_out, operator combination x (item) of y (total)
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 204 No Content