Pay Pool is an API service designed to facilitate the sharing of expenses and splitting bills among a group of people when dining together.
To get started with the Pay Pool API, you can follow the steps outlined below:
-
POST /api/v1/user/register This endpoint allows you to register a new user account.
- Request Body:
{ "username": "jose", "password": "password", "email": "jose@gmail.com" }
- Response:
{ "success": true, "message": "user added successfully", "data": null, } or { "success": false, "message": "email already exists", "data": null }
- Request Body:
-
POST /api/v1/user/login This endpoint allows you to get the token for the authenticated.
- Request Body
{ "email": "jose@gmail.com", "password": "password" }
- Response:
{ "success": true, "message": "login successfully", "data": { "token": "JWT token" } }
- Request Body
-
GET auth/api/v1/user This endpoint allows you to get the info of the user
- Request Header: "token": {token get from /login}
- Request Parameters: /user?email={email}
- Response:
{ "success": true, "message": "get user successfully", "data": { "id": 4, "username": "adrian", "email": "adrian@gmail.com" } }
-
POST auth/api/v1/friend This endpoint allows you to send a friend request
- Request Header: "token": {token get from /login}
- Request Body:
{ "friendEmail": "jose@gmail.com" }
- Response:
{ "success": true, "message": "add friend request successfully", "data": null }