createSubAccount

Request Method: POST

Description: Create a IOVOX Enterprise account for an End User

URL: https://api.iovox.com:444/Users?v=3&method=createSubAccount

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 createSubAccount request:

<request>
       <account_name>54a96aa6-187c-4bc0-9d59-148c432b8739</account_name>
       <parent_account_name>54a96aa6-187c-4bc0-9d59-148c432b8739</parent_account_name>
       <company_name>Bob's Plumbing</company_name>
       <country>UNITED KINGDOM</country>
       <time_zone>Europe/London</time_zone>
       <business_type>Plumber</business_type>
       <type>RESELLER</type>
       <contact>
              <first_name>Bob</first_name>
              <last_name>Smith</last_name>
              <email>bob@example.com</email>
              <work_address_1>123 Example Street</work_address_1>
              <work_address_2></work_address_2>
              <work_city>LONDON</work_city>
              <work_postcode>N1 123</work_postcode>
              <work_country_name>England</work_country_name>
              <business_phone>442031231234</business_phone>
              <mobile_phone>442031231234</mobile_phone>
              <time_zone>Europe/London</time_zone>
       </contact>
       <configuration>
        <change_subscription_url>http://example.com/subscribe</change_subscription_url>
        <reauth_url>http://example.com/reauth</reauth_url>
        <login_url>http://example.com/login</login_url>
        <privacy_url>http://example.com/privacy</privacy_url>
        <notifications>
               <send_creation_email>true</send_creation_email>
               <send_low_credit_email>true</send_low_credit_email>
               <send_no_credit_email>true</send_no_credit_email>
               <send_upgraded_email>true</send_upgraded_email>
               <send_downgraded_email>false</send_downgraded_email>
               <send_cancelled_email>false</send_cancelled_email>
               <send_boosted_email>false</send_boosted_email>
         </notifications>
       </configuration>
</request>

Payload Description

Field Default Value Data Type Mandatory Description
account_name N/A STRING YES The name for the account. This is a unique reference that will be used in all API calls when referencing this account
parent_account_name The account_name of
the calling account
STRING NO The account_name of the account to which this should be a child account. If not provided then the account will be created as a child of the main account making the API call
company_name N/A STRING YES The name of the company to which this account refers
country N/A STRING YES The country of the company to which this account refers
time_zone N/A STRING YES The timezone of the company to which this account refers
business_type N/A STRING YES The business type of the company to which this account refers. This is free text
type N/A STRING
["RESELLER","SMB"]
YES Type to determine whether the account pertains to a RESELLER or an SMB. The real distinction here relates to whether the account will have sub accounts. If yes then they are a RESELLER. If no, then they are an SMB type account
contact N/A MIXED YES Contact details of the primary contact for the account. Possible fields detailed in createContacts
configuration N/A MIXED NO Element containing any behaviour configuration details that should be specified for the account. For any of the configuration details if they are not specified we’ll traverse the ancestor accounts to find the value to use, starting at the immediate parent account
configuration > change_subscription_url N/A STRING NO A URL to be used by iovox to redirect an End User to when they wish to upgrade,downgrade,cancel, or apply a boost to their subscription
configuration > reauth_url N/A STRING NO A URL to be used by IOVOX to redirect an End User to when the current SSO token has expired or was invalid in the iovox CP
configuration > login_url N/A STRING NO A URL to be used by IOVOX to redirect an End User to when they should login to the Service Provider's portal
configuration > privacy_url N/A STRING NO A URL to be used by IOVOX to redirect an End User to when they want to access the Service Provider’s privacy policy
configuration > notifications N/A MIXED NO Element containing any behaviour configuration details relating to notifications that can be sent by iovox to the End User
notifications > send_creation_email N/A STRING
["TRUE", "FALSE"]
NO Flag denoting whether the End User should receive an email on account creation
notifications > send_low_credit_email N/A STRING
["TRUE", "FALSE"]
NO Flag denoting whether the End User should receive emails on 10/20% credit thresholds being reached
notifications > send_no_credit_email N/A STRING
["TRUE", "FALSE"]
NO Flag denoting whether the End User should receive an email on depleting all call credit
notifications > send_upgraded_email N/A STRING
["TRUE", "FALSE"]
NO Flag denoting whether the End User should receive an email on upgrading their current Service Subscription
notifications > send_downgraded_email N/A STRING
["TRUE", "FALSE"]
NO Flag denoting whether the End User should receive an email on downgrading their current Service Subscription
notifications > send_boosted_email N/A STRING
["TRUE", "FALSE"]
NO Flag denoting whether the End User should receive an email on applying a Credit Boost to their current Service Subscription

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 POST. x attemptedSwitch request method x to POST
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
400ATTRIBUTE emptyA mandatory attribute is not set or empty
400time_zone invalid

Invalid TimeZone, use "Europe/London" format

400country invalidThe given country was not found
400account_name already in useThe given account name already exists, use an other
400ATTRIBUTE should be an integerAn integer type attribute is not an integer
400The provided parent_account_name is not validThe main API user does not have this partner account as a subaccount
500Internal Server ErrorRetry later

Success Result

HTTP/1.1 201 No Content