End Point: Account

Registration


POST
DOMAIN/auth/register

Parameter Type Description
firstName required string First Name
lastName required string Last Name
email required string Email address
password required string Customer password
rePassword required string Reply password

{
      firstName: 'Joe',
      lastName: 'Cole',
      email: 'test@gmail.com', 
      password: '7887wds!dsads', 
      rePassword: '7887wds!dsads' 
}

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request
system.incorrect_first_name Incorrect first name
system.incorrect_last_name Incorrect last name
system.email_address_exist Message for duplicate email address
system.incorrect_re_password Message for duplicate email address


Login


POST
DOMAIN/auth/login

Parameter Type Description
email required string Email address
password required string Customer Password
rememberMe optional int Remember password or not

{
      email: 'test@gmail.com', 
      password: '454dwds77', 
      rememberMe: 1 
}

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP/1.1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request
system.incorrect_login_or_password Incorrect email or password message


Change Details


POST
DOMAIN/auth/change

Parameter Type Description
id required int Customer identifier
firstName required string First Name
lastName required string Last Name
password optional string Customer password
rePassword optional string Reply password

{
      id: 5,
      firstName: 'Joe',
      lastName: 'Cole',
      password: '7887wds!dsads', 
      rePassword: '7887wds!dsads' 
}

HTTP1/1 200 OK
{
      status: 'success',
      message: 'Successfully updated'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request
system.incorrect_first_name Incorrect first name
system.incorrect_last_name Incorrect last name
system.successfully_updated Message for Success


Reset Password


POST
DOMAIN/auth/reset-password

Parameter Type Description
idrequired int Customer identifier
resetHash required string Reset hash code
password required string Customer password
rePassword required string Reply password

{
      id: 5,
      resetHash: '754dsadsad7sargvfvsddfdsfds',
      password: '7887wds!dsads', 
      rePassword: '7887wds!dsads' 
}

HTTP1/1 200 OK
{
      status: 'success',
      message: 'Successfully updated'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request
system.incorrect_reset_hash Incorrect reset hash code
system.successfully_updated Message for Success


Logout


GET
DOMAIN/auth/logout


Verify Account


GET
DOMAIN/auth/prompt/{hash}/{id}

Parameter Type Description
hash required string Unique hash code
id required int Customer Identifier

Key Description
system.bad_request Message for bad request
system.thank_you_confirmation_message Message for success request

If request type is not xmlHttpRequest - script created flash message and redirected to home page