updateSubscriptionDetails

Request Method: PUT

Description: Update the subscription details for the account.

URL: https://api.iovox.com:444/Subscriptions?v=3&method=updateSubscriptionDetails

The following parameters can be sent in the querystring

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use INTEGERYES

Payload

The following XML payload must be sent with an updateSubscriptionDetails request:

<?xml version="1.0" encoding="utf-8"?>
<request>
    <recurring_credit>500</recurring_credit>
    <voxnumber_quantity>5</voxnumber_quantity>
 
    <voxnumbers_to_remove>
        <voxnumber>123123123</voxnumber>
        <voxnumber>321321321</voxnumber>
    </voxnumbers_to_remove>

    <subscriber_location>
        <subscriber_country>UNITED KINGDOM</subscriber_country>
        <subscriber_city>LONDON</subscriber_city>
        <subscriber_state></subscriber_state>
    </subscriber_location>
    <billing_length>28</billing_length>
    <billing_length_unit>D</billing_length_unit>
</request>

Payload Description

Node NameDescriptionDefault ValueData TypeMandatory

recurring_credit

The recurring amount of credit contained in the subscription.  INTEGERYES
voxnumber_quantity
Number of available VoxNumbers in the subscription INTEGER YES 
voxnumbers_to_remove>voxnumber
List of voxnumbers to remove on downgrade. The number of voxnumbers must be zero if the new voxnumber_quantity value is grater or equal than the current number of voxnumbers. If you would like to downgrade the voxnumber_quantity to less than the current used voxnumbers count you have to provide (current_used_voxnumbers - new_voxnumber_quantity) voxnumbers to remove.EMPTYSTRING NO 
subscriber_location>subscriber_country
Country of the subscriber STRING YES 
subscriber_location>subscriber_city
City of the subscriber  STRING YES 
subscriber_location>subscriber_state
State of the subscriber '' STRING NO 
billing_length
Length of the billing period. Used in combination with the billing_length_unit INTEGER YES 
billing_length_unit
Unit of the billing period. Used in combination with the billing_length. [D|W|M] YES 

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 at least one contact to the request
400Billing Length must be an integerUse integer for the billing_length parameter
400Billing Length Unit should be one of the following: D/W/MSet "D" (Day), "W" (Week) or "M" (Month) as the unit of billing length
400Recurring Credit must be an integerThe recurring_credit parameter should be an integer
400VoxNumber Quantity must be an integerThe voxnumber_quantity parameter should be an integer
400Subscriber Country invalidThe subscriber_country parameter should be one of the followings: "UNITED KINGDOM", "UNITED STATES", "NETHERLANDS", "FRANCE", "IRELAND"
400Subscriber State emptySubscriber State is mandatory if the Country is "UNITED STATES"
400No Subscription foundThe account does not have a subscription yet. First create a subscription.
400Cannot change location after VoxNumbers purchaseAfter the account purchased a VoxNumber for the current location, you can not change the location of the account anymore
400Cannot decrease voxnumber_quantityVoxnumber quantity can not be decreased if the account has more active voxnumber
400Cannot decrease recurring_creditRecurring credit can not be decreased to less than the active credit
400The quantity of VoxNumbers marked for removal is less than the required amountThe provided number of voxnumbers_to_remove must be the difference between the current used voxnumbers and the new voxnumber_quantity value
400The quantity of VoxNumbers marked for removal is greater than the required amountThe provided number of voxnumbers_to_remove must be the difference between the current used voxnumbers and the new voxnumber_quantity value
400
VoxNumber x of y to remove does not exist
The account does not have the provided voxnumber to remove
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 204 No Content