Smart Recycling API is built using Express.js and MySQL. Below is the documentation for the available endpoints.
Install the required dependencies:
npm i
yarn install
pnpm install
Follow the following steps to run the test on this file
Test the API using POSTMAN
or any other API testing tool.
No. | Endpoints | Method |
---|---|---|
1 | /api/signup | POST |
2 | /api/signin | POST |
3 | /api/user | GET |
4 | /api/users [admin] | GET |
5 | /api/user/points | POST |
6 | /api/user/change-role | GET |
7 | /api/reports | GET |
8 | /api/reports | POST |
9 | /api/events | GET |
10 | /api/events | POST |
11 | /api/events/:id | PUT |
12 | /api/exchange | POST |
12 | /api/exchange | POST |
13 | /api/exchange/:user_id | POST |
14 | /api/payment-history/:user_id | GET |
15 | /api/transaction-history/:user_id | GET |
16 | /api/payment-method | POST |
17 | /api/transaction-payment | POST |
18 | /api/items | GET |
19 | /api/items | POST |
20 | /api/items/:id | PUT |
Credit to Jody Yuantoro and Syauqi