createAccount

Synopsis:

This API is used to create a new account. In order to use this API, the account must have this API enabled. Please contact your account manager for more information.

There are two types of accounts that can be created: master and sub-account. For creating sub-accounts, the master account ID and name are required in the request. The sub-accounts will inherit all the properties and brand information from the API key account (unless specified in the request) upon creation. The subaccounts’ transactions will be billed on the master account. For creating master accounts, the master account ID and name are ignored.

The account name passed within the request will be the name of the newly created account. The login email and password passed within the request will be used to log into the account. If the login email does not already exist within our system, then the login email will be created with the password. If the login email does exist, then the password passed in the request is simply ignored and the user’s current password will be used to log in. The account will be under a plan based on the plan ID which can be requested from your account manager.

The API contains several brand information requests for the account, such as the brand name/nicknames, logo, website, address, city, state, zip, and country. The brand type identifies the type of organization (university, business, etc.) which can be requested from your account manager. The country is set by passing the country ID which can be found here.

Request: XML

<request>
    <action>createAccount</action>
    <api_key>API key</api_key>
    <account-category>'master' or 'subaccount'</account-category>
    <master-account-id>master account ID</master-account-id>
    <master-account-name>master account name</master-account-name>
    <account-name>account name</account-name>
    <login-email>login email address</login-email>
    <login-password>login password</login-password>
    <plan-id>plan ID</plan-id>
    <brand-name>brand name</brand-name>
    <brand-type>brand type</brand-type>
    <brand-logo>brand logo URL</brand-logo>
    <brand-website>brand website</brand-website>
    <brand-nicknames>brand nicknames</brand-nicknames>
    <brand-address>brand address</brand-address>
    <brand-city>brand city</brand-city>
    <brand-state>brand state</brand-state>
    <brand-zip>brand zip code</brand-zip>
    <country-id>country ID</country-id>
</request>

Request: GET

API_URL?action=createaccount
&api_key=API key
&account-category='master' or 'subaccount'
&master-account-id=master account ID
&master-account-name=master account name
&account-name=account name
&login-email=login email address
&login-password=login password
&plan-id=plan ID
&brand-name=brand name
&brand-type=brand type
&brand-logo=brand logo URL
&brand-website=brand website
&brand-nicknames=brand nicknames
&brand-address=brand address
&brand-city=brand city
&brand-state=brand state
&brand-zip=brand zip code
&country-id=country ID

Request Parameters:

Sub-account
Mandatory: action, api_key, master-account-id, master-account-name, account-name, login-email, login-password, plan-id
Optional: account-category, brand-name, brand-type, brand-logo, brand-website, brand-nicknames, brand-address, brand-city, brand-state, brand-zip, country-id

Master Account
Mandatory: action, api_key, account-name, login-email, login-password, plan-id, country-id, brand-type
Optional: account-category, brand-name, brand-type, brand-logo, brand-website, brand-nicknames, brand-address, brand-city, brand-state, brand-zip, country-id

Response Parameters:

status, username, password, api_key, userid, errorCode, errorInfo

Request Example: XML

Sub-account
<request>
    <action>createAccount</action>
    <api_key>qtfkyko9jtfahcoqj0v2wf5cg1t8iwlz</api_key>
    <account-category>subaccount</account-category>
    <master-account-id>31126</master-account-id>
    <master-account-name>bob</master-account-name>
    <account-name>bob491823102</account-name>
    <login-email>bob@skycore.com</login-email>
    <login-password>bob42713</login-password>
    <plan-id>1</plan-id>
</request>

Master Account
<request>
    <action>createAccount</action>
    <api_key>qtfkyko9jtfahcoqj0v2wf5cg1t8iwlz</api_key>
    <account-category>master</account-category>
    <account-name>bob32094324</account-name>
    <login-email>bob@skycore.com</login-email>
    <login-password>bob42713</login-password>
    <plan-id>1</plan-id>
    <brand-name>Skycore LLC</brand-name>
    <brand-type>2</brand-type>
    <brand-logo>https://www.skycore.com/skycore-logo</brand-logo>
    <brand-website>https://www.skycore.com</brand-website>
    <brand-nicknames>Skycore</brand-nicknames>
    <brand-address>397 Moody St.</brand-address>
    <brand-city>Waltham</brand-city>
    <brand-state>MA</brand-state>
    <brand-zip>02453</brand-zip>
    <country-id>7</country-id>
</request>

Request Example: GET

Sub-account
https://secure.skycore.com/API/wxml/1.3/index.php?action=createaccount
&api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ
&account-category=subaccount
&master-account-id=31126
&master-account-name=bob
&account-name=bob491823102
&login-email=bob@skycore.com
&login-password=bob42713
&plan-id=1

Master Account
https://secure.skycore.com/API/wxml/1.3/index.php?action=createaccount
&api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ
&account-category=master
&account-name=bob32094324
&login-email=bob@skycore.com
&login-password=bob42713
&plan-id=1
&brand-name=Skycore LLC
&brand-type=2
&brand-logo=https://www.skycore.com/skycore-logo
&brand-website=https://www.skycore.com
&brand-nicknames=Skycore
&brand-address=397 Moody St.
&brand-city=Waltham
&brand-state=MA
&brand-zip=02453
&country-id=7

Response Example: Success

<response>
    <status>Success</status>
    <username>bob491823102</username>
    <password>42363deef6129efa1dc0a54b26cf1426</password>
    <api_key>umfkkslcdki9yj5b7fdbk5i8eqaoq88l</api_key>
    <userid>150265</userid>
</response>

Response Example: Failure

<response>
    <status>Failure</status>
    <errorcode>E149</errorcode>
    <errorinfo>The master account is a sub-account and cannot create new accounts.</errorinfo>
</response>

General Error Codes:

Code Description
E100 Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104 User Authentication Failed.
E105 This account has no API rights.
E106 You can call API every X seconds.
E107 This account has no rights to use this action.
E108 XML Parse error: $error.
E109 API not activated.
E112 IP was not whitelisted. API call rejected.
E113 Set throughput exceeded for this API action. API call rejected.
E114 Phone number is blacklisted. API call rejected.
E120 Account has reached the API request limit.
E503 Internal error.


Code Description
E141 The API key account and master account are not related.
E142 The account-name value is required.
E143 The account-name value is already taken.
E144 The login-password value is required.
E145 The login-email value is invalid.
E146 The login-email value is required.
E148 The master account is invalid.
E149 The master account is a sub-account and cannot create new accounts.
E154 The account-category value is invalid.
E155 The plan-id value is invalid.
E156 The brand-city value is invalid.
E157 The brand-state value is invalid.
E158 The brand-zip value is invalid.
E159 The country-id value is invalid.
E160 The brand-type value is invalid.
E161 The brand-website value is invalid.
E162 The brand-logo value is invalid.
E163 The plan-id value is required.
E407 The master-account-id value is required.
E408 The master-account-name value is required.


Key Term Definitions:

Term Description
action This is the name of the function you want to execute with the API.
api_key Random key that is assigned to an account that can be used for authorization instead of USER/PASS. You can find and regenerate this key on the ‘API Settings’ page.
account-category This request is used to define whether the account is a master account or sub-account.
master-account-id The ID of the master account for the sub-account to be created.
master-account-name The name of the master account for the sub-account to be created.
account-name The name of the account to be created.
login-email The login email address used to log into the account.
login-password The login password for the login email used to log into the account.
plan-id The unique ID of the plan which the account will be under. Please ask your account manager for more details.
brand-name The brand name for the account.
brand-type The unique ID of the brand type for the account. Please ask your account manager for more details.
brand-logo The brand logo for the account.
brand-website The URL of the brand website for the account.
brand-nicknames The brand nicknames for the account.
brand-address The brand address for the account.
brand-city The brand city for the account.
brand-state The brand state for the account.
brand-zip The brand zip for the account.
country-id The unique ID of the country for the account.


Country:

Country Country ID Country Code
United States 7 +1
Afghanistan 314 +93
Albania 20 +355
Algeria 21 +213
Andorra 22 +376
Angola 213 +244
Anguilla 214 +1
Antigua and Barbuda 215 +1
Argentina 212 +54
Armenia 23 +374
Aruba 24 +297
Australia 25 +61
Austria 149 +43
Azerbaijan 26 +994
Bahamas 216 +1
Bahrain 27 +973
Bangladesh 28 +880
Barbados 217 +1
Belarus 29 +375
Belgium 30 +32
Belize 218 +501
Benin 219 +229
Bermuda 31 +1
Bhutan 306 +975
Bolivia 32 +591
Bosnia and Herzegovina 33 +387
Botswana 34 +267
Brazil 157 +55
Brunei 308 +673
Bulgaria 36 +359
Burkina Faso 37 +226
Burundi 38 +257
Cambodia 39 +855
Cameroon 150 +237
Canada 40 +1
Cape Verde 41 +238
Cayman Islands 311 +1
Central African Republic 315 +236
Chad 151 +235
Chile 152 +56
China 188 +86
Colombia 220 +57
Comoros Island 221 +269
Cook Islands 222 +682
Costa Rica 223 +506
Croatia 43 +385
Cuba 224 +53
Cyprus 45 +357
Czech Republic 46 +420
Democratic Republic of the Congo 42 +243
Denmark 47 +45
Djibouti 226 +253
Dominica Islands 227 +1
Dominican Republic 48 +1
East Timor 316 +670
Ecuador 228 +593
Egypt 49 +20
El Salvador 50 +503
Equatorial Guinea 229 +240
Eritrea 230 +291
Estonia 51 +372
Ethiopia 231 +251
Faeroe Islands 232 +298
Falkland Islands 233 +500
Fiji 53 +679
Finland 54 +358
France 19 +33
French Guiana 234 +594
French Polynesia 235 +689
Gabon 236 +241
Gambia 56 +220
Georgia 57 +995
Germany 58 +49
Ghana 59 +233
Gibraltar 60 +350
Greece 61 +30
Greenland 62 +299
Grenada 237 +1
Guadeloupe 238 +590
Guatemala 240 +502
Guinea Bissau 241 +245
Guinea Republic 242 +224
Guyana 243 +592
Haiti 244 +509
Honduras 245 +504
Hong Kong 65 +852
Hungary 66 +36
Iceland 67 +354
India 5 +91
Indonesia 68 +62
Iran 246 +98
Iraq 247 +964
Ireland 69 +353
Israel 71 +972
Italy 72 +39
Ivory Coast 248 +225
Jamaica 73 +1
Japan 249 +81
Jersey 317 +44
Jordan 75 +962
Kazakstan 76 +7
Kenya 77 +254
Kiribati 250 +686
Kuwait 78 +965
Kyrgyzstan 253 +996
Laos 254 +856
Latvia 80 +371
Lebanon 81 +961
Lesotho 255 +266
Liberia 256 +231
Libya 257 +218
Liechtenstein 82 +423
Lithuania 83 +370
Luxembourg 258 +352
Macau 259 +853
Macedonia 86 +389
Madagascar 87 +261
Malawi 88 +265
Malaysia 89 +60
Maldives 90 +960
Mali 260 +223
Malta 91 +356
Martinique 261 +596
Mauritania 93 +222
Mauritius 94 +230
Mayotte Islands 262 +262
Mexico 155 +52
Micronesia 263 +691
Moldova 264 +373
Monaco 96 +377
Mongolia 97 +976
Montenegro 318 +382
Montserrat 265 +1
Morocco 98 +212
Mozambique 99 +258
Myanmar 266 +95
Namibia 267 +264
Nauru 268 +674
Nepal 100 +977
Netherlands 101 +31
Netherlands Antilles 269 +599
New Caledonia 270 +687
New Zealand 102 +64
Nicaragua 271 +505
Niger 106 +227
Nigeria 103 +234
Niue Island 272 +683
Norfolk Island 273 +672
North Korea 251 +850
Northern Mariana Islands 313 +1
Norway 104 +47
Oman 105 +968
Pakistan 156 +92
Palau 274 +680
Palestinian Territory 305 +970
Panama 275 +507
Papua New Guinea 276 +675
Paraguay 108 +595
Peru 109 +51
Philippines 110 +63
Poland 16 +48
Portugal 111 +351
Puerto Rico 277 +1
Qatar 112 +974
Republic of the Congo 225 +242
Reunion 113 +262
Romania 114 +40
Russia 115 +7
Rwanda 116 +250
Saint Kitts and Nevis 289 +1
Saint Lucia 290 +1
Saint Pierre and Miquelon 319 +508
Saint Vincent and Grenadines 312 +1
Samoa (American) 278 +1
Samoa (Western) 279 +685
San Marino 280 +378
Sao Tome & Principe 281 +239
Saudi Arabia 117 +966
Senegal 282 +221
Serbia 283 +381
Seychelles 119 +248
Sierra Leone 284 +232
Singapore 121 +65
Slovakia 285 +421
Slovenia 123 +386
Solomon Islands 286 +677
Somalia 287 +252
South Africa 124 +27
South Korea 252 +82
South Sudan 320 +211
Spain 125 +34
Sri Lanka 126 +94
St Helena 288 +290
Sudan 291 +249
Suriname 127 +597
Swaziland 128 +268
Sweden 129 +46
Switzerland 130 +41
Syria 292 +963
Taiwan 293 +886
Tajikistan 294 +992
Tanzania 295 +255
Thailand 134 +66
Togo 296 +228
Tonga 297 +676
Trinidad and Tobago 298 +1
Tunisia 135 +216
Turkey 136 +90
Turkmenistan 137 +993
Turks and Caicos Islands 299 +1
Tuvalu 300 +688
Uganda 139 +256
Ukraine 140 +380
United Arab Emirates 301 +971
United Kingdom 141 +44
Uruguay 302 +598
Uzbekistan 143 +998
Vanuatu 303 +678
Venezuela 144 +58
Vietnam 145 +84
Virgin Islands (British) 310 +1
Wallis and Futuna Islands 304 +681
Yemen 146 +967
Zambia 147 +260
Zimbabwe 148 +263