Authentication : Not Required
Method: POST
path: /auth
PARAMETERS:
DATA | DataType[default] | Detail |
---|---|---|
username | str. (User name or Email) | req. |
password | str. | req. |
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 login api require cart_id INT. please refer to CART Documentation to understand what we mean by cart locally and non locally. and why cart ID must be posted.
RESPONSE { "data": [ { "id": "1", "username": "ogwugo", "email": "[email protected]", "last_name": "fddgvd", "cart_id": "0", "user_token": "TYRgfhjdfsghfjkhlgjfhdgssdfgzI5NDBlNjJj", "user_token_expiry": "2018-02-15 11:17:55" } ], "status": "success", "message": "correct username and password", "error": { "detail": "username and password verified", "code": "202" } } error response type: { "data": "null", "status": "failed", "message": "Wrong Username and password", "error": { "msq": "wrong username or password detected", "detail": "login using username or email with correct password..", "code": 205 } } NB: in the response you see token, this token is not for you to use and authenticate api call, this token is use to auto log user in between domain say, from ogwugo food going to ogwugo gas.