Method Name: CreateAccount()
Please keep in mind that many products use the Red Rook Registration and Billing API, so it is not safe to assume that a customer account does not exist already.
Before attempting to create an account, a check should be made to FindAccount() by supplying the users email address to determine if the account is already on file.
Whether an account exists or a new one is successfully created, the id returned by the API should be stored with your customer data. This will be the id used for all requests thereafter.
Parameters:
Name |
Type |
Required |
OrgName |
string(100) |
No |
FirstName |
string(50) |
Yes |
LastName |
string(50) |
Yes |
Phone |
string(20) |
Yes |
Email |
string(100) |
Yes |
PreferredContactMethod |
string(1) |
Yes P=Phone or E=Email |
Address1 |
string(50) |
Yes |
Address2 |
string(50) |
No |
Address3 |
string(50) |
No |
City |
string(50) |
Yes |
State |
string(2) |
Yes |
PostalCode |
string(10) |
Yes |
Country |
string(20) |
Yes |
URL:
Success Status Code: 200 (Success)
Success response: JSON
{ "id": "02dfccda-bf32-4d9f-81eb-af4cdd949360", "Login": "123@aol.com", "OrgName": "Red Rook, Inc", "FirstName": "James", "LastName": "Dean", "Email": "123@aol.com", "Phone": "770-792-2212", "PreferredContactMethod": "E", "Address1": "1955 Vaughn Road", "Address2": "Suite 108", "Address3": "", "City": "Kennesaw", "State": "GA", "PostalCode": "30144", "Country": "USA" }
Error Status Code: 400 (Bad Request)
Error response: JSON
{
"Error": "A value for FirstName is Required."
}
{
"Error": "A value for LastName is Required."
}
{
"Error": "A value for Phone is Required."
}
{
"Error": "A value for Email is Required."
}
{
"Error": "The Email address requested is invalid."
}
{
"Error": "A value for PreferredContactMethod is Required. Valid values are (P) Phone or (E) Email."
}
{
"Error": "A value for Address1 is Required."
}
{
"Error": "A value for City is Required."
}
{
"Error": "A value for State is Required."
}
{
"Error": "A value for PostalCode is Required."
}
{
"Error": "A value for Country is Required."
}
{
"Error": "The Email address requested has already been registered."
}