JSON API » user » user/signup

Signs up for a new customer. This should be used for simple end-user initiated self-signups only. For new customers created by the system owner or resellers, or new customers with complex features, customers/create and other */create functions should be used instead.

Input parameters

Does not require authentication.

NameTypeDescriptionRequiredDefault value
address1StringAddress line 1.Yes
address_cityStringAddress city.Yes
creditcard_nameStringCredit card name.Yes
creditcard_numberStringCredit card number.Yes
creditcard_typeStringCredit card type.Yes
customerStringName of customer.Yes
customer_phoneStringTelephone number of customer.Yes
emailStringEmail address of person.Yes
forenameStringFirst name of person.Yes
parentIntegerID of parent customer.Yes
passwordStringPassword of person.Yes
planIntegerID of rate plan customer is on.Yes
surnameStringLast name of person.Yes
usernameStringUser name of person.Yes
accept_termsInteger1 if terms and conditions are accepted, 0 if not.Yes if terms and conditions have been set.0
address_codeStringPost or zip code.NoEmpty string.
address2StringAddress line 2.NoEmpty string.
address3StringAddress line 3.NoEmpty string.
address_otherStringAddress other information.NoEmpty string.
address_stateStringAddress state.NoEmpty string.
call_creditDecimalStarting call credit. Only used for prepaid billing types.No0.00
countryStringAddress country.NoCountry of parent.
creditcard_expiry_monthIntegerCredit card expiry month from 1 to 12.No0
creditcard_expiry_yearIntegerCredit card expiry year.No0
creditcard_issueIntegerCredit card issue number.No0
creditcard_start_monthIntegerCredit card start month from 1 to 12.No0
creditcard_start_yearIntegerCredit card start year.No0
creditcard_verificationStringCredit card verification number.NoEmpty string.
customer_emailStringEmail address of customer for billing.NoSame as email parameter.
customer_faxStringFax number of customerNoEmpty string.
languageStringLanguage code of person. Empty string for default.NoEmpty string.
snumberStringAny numbers to purchase. Separate with commas. Empty string for none.NoEmpty string.
sourceStringSource IP address for logging. Empty string for none.NoEmpty string.
tax_numberStringTax number of customer. Empty string for none.NoEmpty string.
timezoneStringTime zone. Empty string for default.NoTime zone of parent.
titleStringTitle of person. Empty string for none.NoEmpty string.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
200Success.
201Input passed validation. Only returned if validation=1.
400Invalid input parameters specified. Check the key and message fields for more details.

Data returned

Fields of auto-generated features, such as telephone line username.

Example: With required parameters

http://enswitch.example.com/api/json/user/signup/?parent=2;plan=123;customer=example;username=user@example.com;password=secret;forename=Example;surname=User;email=user@example.com;customer_phone=2125551234;address1=123+Example+Street;address_city=Example+City;creditcard_name=Mr+Example+User;creditcard_number=1234567890123456;creditcard_type=visa

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123, "phone_name":"1234567", ... } }

Change history

VersionChanges
3.13Function added.