Create Account API

Table of Contents

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:

CodeDescription
E100Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104User Authentication Failed.
E105This account has no API rights.
E106You can call API every X seconds.
E107This account has no rights to use this action.
E108XML Parse error: $error.
E109API not activated.
E112IP was not whitelisted. API call rejected.
E113Set throughput exceeded for this API action. API call rejected.
E114Phone number is blacklisted. API call rejected.
E120Account has reached the API request limit.
E503Internal error.
CodeDescription
E141The API key account and master account are not related.
E142The account-name value is required.
E143The account-name value is already taken.
E144The login-password value is required.
E145The login-email value is invalid.
E146The login-email value is required.
E148The master account is invalid.
E149The master account is a sub-account and cannot create new accounts.
E154The account-category value is invalid.
E155The plan-id value is invalid.
E156The brand-city value is invalid.
E157The brand-state value is invalid.
E158The brand-zip value is invalid.
E159The country-id value is invalid.
E160The brand-type value is invalid.
E161The brand-website value is invalid.
E162The brand-logo value is invalid.
E163The plan-id value is required.
E407The master-account-id value is required.
E408The master-account-name value is required.

Key Term Definitions:

TermDescription
actionThis is the name of the function you want to execute with the API.
api_keyRandom 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-categoryThis request is used to define whether the account is a master account or sub-account.
master-account-idThe ID of the master account for the sub-account to be created.
master-account-nameThe name of the master account for the sub-account to be created.
account-nameThe name of the account to be created.
login-emailThe login email address used to log into the account.
login-passwordThe login password for the login email used to log into the account.
plan-idThe unique ID of the plan which the account will be under. Please ask your account manager for more details.
brand-nameThe brand name for the account.
brand-typeThe unique ID of the brand type for the account. Please ask your account manager for more details.
brand-logoThe brand logo for the account.
brand-websiteThe URL of the brand website for the account.
brand-nicknamesThe brand nicknames for the account.
brand-addressThe brand address for the account.
brand-cityThe brand city for the account.
brand-stateThe brand state for the account.
brand-zipThe brand zip for the account.
country-idThe unique ID of the country for the account.

Country:

CountryCountry IDCountry Code
United States7+1
Afghanistan314+93
Albania20+355
Algeria21+213
Andorra22+376
Angola213+244
Anguilla214+1
Antigua and Barbuda215+1
Argentina212+54
Armenia23+374
Aruba24+297
Australia25+61
Austria149+43
Azerbaijan26+994
Bahamas216+1
Bahrain27+973
Bangladesh28+880
Barbados217+1
Belarus29+375
Belgium30+32
Belize218+501
Benin219+229
Bermuda31+1
Bhutan306+975
Bolivia32+591
Bosnia and Herzegovina33+387
Botswana34+267
Brazil157+55
Brunei308+673
Bulgaria36+359
Burkina Faso37+226
Burundi38+257
Cambodia39+855
Cameroon150+237
Canada40+1
Cape Verde41+238
Cayman Islands311+1
Central African Republic315+236
Chad151+235
Chile152+56
China188+86
Colombia220+57
Comoros Island221+269
Cook Islands222+682
Costa Rica223+506
Croatia43+385
Cuba224+53
Cyprus45+357
Czech Republic46+420
Democratic Republic of the Congo42+243
Denmark47+45
Djibouti226+253
Dominica Islands227+1
Dominican Republic48+1
East Timor316+670
Ecuador228+593
Egypt49+20
El Salvador50+503
Equatorial Guinea229+240
Eritrea230+291
Estonia51+372
Ethiopia231+251
Faeroe Islands232+298
Falkland Islands233+500
Fiji53+679
Finland54+358
France19+33
French Guiana234+594
French Polynesia235+689
Gabon236+241
Gambia56+220
Georgia57+995
Germany58+49
Ghana59+233
Gibraltar60+350
Greece61+30
Greenland62+299
Grenada237+1
Guadeloupe238+590
Guatemala240+502
Guinea Bissau241+245
Guinea Republic242+224
Guyana243+592
Haiti244+509
Honduras245+504
Hong Kong65+852
Hungary66+36
Iceland67+354
India5+91
Indonesia68+62
Iran246+98
Iraq247+964
Ireland69+353
Israel71+972
Italy72+39
Ivory Coast248+225
Jamaica73+1
Japan249+81
Jersey317+44
Jordan75+962
Kazakstan76+7
Kenya77+254
Kiribati250+686
Kuwait78+965
Kyrgyzstan253+996
Laos254+856
Latvia80+371
Lebanon81+961
Lesotho255+266
Liberia256+231
Libya257+218
Liechtenstein82+423
Lithuania83+370
Luxembourg258+352
Macau259+853
Macedonia86+389
Madagascar87+261
Malawi88+265
Malaysia89+60
Maldives90+960
Mali260+223
Malta91+356
Martinique261+596
Mauritania93+222
Mauritius94+230
Mayotte Islands262+262
Mexico155+52
Micronesia263+691
Moldova264+373
Monaco96+377
Mongolia97+976
Montenegro318+382
Montserrat265+1
Morocco98+212
Mozambique99+258
Myanmar266+95
Namibia267+264
Nauru268+674
Nepal100+977
Netherlands101+31
Netherlands Antilles269+599
New Caledonia270+687
New Zealand102+64
Nicaragua271+505
Niger106+227
Nigeria103+234
Niue Island272+683
Norfolk Island273+672
North Korea251+850
Northern Mariana Islands313+1
Norway104+47
Oman105+968
Pakistan156+92
Palau274+680
Palestinian Territory305+970
Panama275+507
Papua New Guinea276+675
Paraguay108+595
Peru109+51
Philippines110+63
Poland16+48
Portugal111+351
Puerto Rico277+1
Qatar112+974
Republic of the Congo225+242
Reunion113+262
Romania114+40
Russia115+7
Rwanda116+250
Saint Kitts and Nevis289+1
Saint Lucia290+1
Saint Pierre and Miquelon319+508
Saint Vincent and Grenadines312+1
Samoa (American)278+1
Samoa (Western)279+685
San Marino280+378
Sao Tome & Principe281+239
Saudi Arabia117+966
Senegal282+221
Serbia283+381
Seychelles119+248
Sierra Leone284+232
Singapore121+65
Slovakia285+421
Slovenia123+386
Solomon Islands286+677
Somalia287+252
South Africa124+27
South Korea252+82
South Sudan320+211
Spain125+34
Sri Lanka126+94
St Helena288+290
Sudan291+249
Suriname127+597
Swaziland128+268
Sweden129+46
Switzerland130+41
Syria292+963
Taiwan293+886
Tajikistan294+992
Tanzania295+255
Thailand134+66
Togo296+228
Tonga297+676
Trinidad and Tobago298+1
Tunisia135+216
Turkey136+90
Turkmenistan137+993
Turks and Caicos Islands299+1
Tuvalu300+688
Uganda139+256
Ukraine140+380
United Arab Emirates301+971
United Kingdom141+44
Uruguay302+598
Uzbekistan143+998
Vanuatu303+678
Venezuela144+58
Vietnam145+84
Virgin Islands (British)310+1
Wallis and Futuna Islands304+681
Yemen146+967
Zambia147+260
Zimbabwe148+263