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.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
address1 | String | Address line 1. | Yes | |
address_city | String | Address city. | Yes | |
creditcard_name | String | Credit card name. | Yes | |
creditcard_number | String | Credit card number. | Yes | |
creditcard_type | String | Credit card type. | Yes | |
customer | String | Name of customer. | Yes | |
customer_phone | String | Telephone number of customer. | Yes | |
String | Email address of person. | Yes | ||
forename | String | First name of person. | Yes | |
parent | Integer | ID of parent customer. | Yes | |
password | String | Password of person. | Yes | |
plan | Integer | ID of rate plan customer is on. | Yes | |
surname | String | Last name of person. | Yes | |
username | String | User name of person. | Yes | |
accept_terms | Integer | 1 if terms and conditions are accepted, 0 if not. | Yes if terms and conditions have been set. | 0 |
address_code | String | Post or zip code. | No | Empty string. |
address2 | String | Address line 2. | No | Empty string. |
address3 | String | Address line 3. | No | Empty string. |
address_other | String | Address other information. | No | Empty string. |
address_state | String | Address state. | No | Empty string. |
call_credit | Decimal | Starting call credit. Only used for prepaid billing types. | No | 0.00 |
country | String | Address country. | No | Country of parent. |
creditcard_expiry_month | Integer | Credit card expiry month from 1 to 12. | No | 0 |
creditcard_expiry_year | Integer | Credit card expiry year. | No | 0 |
creditcard_issue | Integer | Credit card issue number. | No | 0 |
creditcard_start_month | Integer | Credit card start month from 1 to 12. | No | 0 |
creditcard_start_year | Integer | Credit card start year. | No | 0 |
creditcard_verification | String | Credit card verification number. | No | Empty string. |
customer_email | String | Email address of customer for billing. | No | Same as email parameter. |
customer_fax | String | Fax number of customer | No | Empty string. |
ingroup | Integer | ID of inbound group to add ported number to. Only used if porting number. | Only if porting number. | |
language | String | Language code of person. Empty string for default. | No | Empty string. |
snumber | String | Any numbers to purchase. Separate with commas. Empty string for none. | No | Empty string. |
source | String | Source IP address for logging. Empty string for none. | No | Empty string. |
tax_number | String | Tax number of customer. Empty string for none. | No | Empty string. |
timezone | String | Time zone. Empty string for default. | No | Time zone of parent. |
title | String | Title of person. Empty string for none. | No | Empty string. |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
200 | Success. |
201 | Input passed validation. Only returned if validation=1. |
400 | Invalid 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
Version | Changes |
---|---|
3.14 | ingroup input parameter added. |
3.13 | Function added. |