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
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES |
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 Name | Description | Default Value | Data Type | Mandatory |
recurring_credit | The recurring amount of credit contained in the subscription. | INTEGER | YES | |
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. | EMPTY | STRING | 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 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 PUT. x attempted | Switch request method x to PUT |
400 | XML Empty | Add xml to the request body |
400 | XML parse error. x at line y, column z | Correct XML at point x on line y, column z |
400 | Request Empty | Add at least one contact to the request |
400 | Billing Length must be an integer | Use integer for the billing_length parameter |
400 | Billing Length Unit should be one of the following: D/W/M | Set "D" (Day), "W" (Week) or "M" (Month) as the unit of billing length |
400 | Recurring Credit must be an integer | The recurring_credit parameter should be an integer |
400 | VoxNumber Quantity must be an integer | The voxnumber_quantity parameter should be an integer |
400 | Subscriber Country invalid | The subscriber_country parameter should be one of the followings: "UNITED KINGDOM", "UNITED STATES", "NETHERLANDS", "FRANCE", "IRELAND" |
400 | Subscriber State empty | Subscriber State is mandatory if the Country is "UNITED STATES" |
400 | No Subscription found | The account does not have a subscription yet. First create a subscription. |
400 | Cannot change location after VoxNumbers purchase | After the account purchased a VoxNumber for the current location, you can not change the location of the account anymore |
400 | Cannot decrease voxnumber_quantity | Voxnumber quantity can not be decreased if the account has more active voxnumber |
400 | Cannot decrease recurring_credit | Recurring credit can not be decreased to less than the active credit |
400 | The quantity of VoxNumbers marked for removal is less than the required amount | The provided number of voxnumbers_to_remove must be the difference between the current used voxnumbers and the new voxnumber_quantity value |
400 | The quantity of VoxNumbers marked for removal is greater than the required amount | The 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 |
500 | Internal Server Error | Retry later |