User Registration
Authentication : Not Required
Method: POST
path: /registration/user
PARAMETERS:
phonestr.req.
DataType[default] | Detail | |
---|---|---|
username | str. | req. |
password | str. | req. (6-20 char, lEttEr 0101) |
str. | req. | |
address | str. | req. |
city_id | int. | req. |
state_id | int. | req. |
country_id | str. | req. |
longitude | str. | req. |
latitude | str. | req. |
first_name | str. | req. |
device_uuid | str. | eg. android device uuid |
referrer_email | str. | |
cart_id | int.[0] | req. if the cart is handled non locally. |
domain | str. (ENUM(local,international,food,gas)) | req. we should know from which site the user register |
platform | str. (ENUM(web,android,ios)) | req. we should know where the user register from |
server_ip | str. | every device has an ip in a network. |
the registration api require city_id INT. In the documentation there are endpoints to [GET ALL COUNTRY*GET ALL STATES* GET ALL CITIES it is required that you load all country, from which you load states and load cities thus: retrieve city id.
QUICK INTRO FOR CITY ID
path: /countries/list
get single country; /countries/single/{id}
STATE: /states/list
/states/single/{id}
Cities: /cities/list
/cities/single/{id}
cart_id This is an ecormerce site. a guest can add item to cart and decide to register after that, you should post the cart id so we know it belong to this user after registration and still return the cart id.
THE RESPONSE:
{
“data”: [
{
“id”: “63”,
“username”: “ekuma6223”,
“email”: “[email protected]”,
“last_name”: “Okokoh”,
“first_name”: “Benjamin”,
“device_uuid”: “4356787654”,
“cart_id”: “0”,
“user_token”: “TYRgfhjdfsghfjkhlgjfhdgssdfgzI5NDBlNjJj”,
“user_token_expiry”: “2018-02-15 11:17:55”
}
],
“status”: “success”,
“message”: “Congratulation registration completed, please check your email and verify your email”,
“error”: {
“detail”: “Congratulations: registration completed Verification mail sending failed: Kindly click on resend verification in your dashboard”,
“code”: “202”
}