METRO APP REST API END POINTS | CHEAT SHEET
Most routes require JWT token [Bearer JWT;]
Name | Method | Route | JSON | Protected |
---|---|---|---|---|
Passenger End Points | ||||
Pass – Register | POST | /pass/register | {"first_name":" ","last_name":" ", "email":" ","phone":"2547xxxxx", "password":" " } | N |
Pass - Profile | GET | /pass/profile | Y | |
Pass – Balance | GET | /pass/balance | Y | |
Pass – Login | POST | /pass/login | { "email":" ", "password":" " } | N |
Pass – Edit Profile | PUT | /pass/edit | { "first_name":" ", "last_name":" " } | Y |
Pass – Top Up | POST | /pass/topup | {"amount":"1000"} | Y |
Pass – Pay | POST | /pay/pay | {"reg_no":"KGD 123A","amount":"120"} | Y |
Pass – Forgot Password | PUT | /pass/forgot-password | { "email":" "} | N |
Pass – Change Password | PUT | /pass/change-password | {"new_password":" ","confirm_password":" "} | Y |
Pass – All Payments | GET | /pass/all-payments | Y | |
Pass – All Top Ups | GET | /pass/all-topup | Y | |
Crew End Points | ||||
Crew - Register | POST | /crew/register | { "first_name":" ", "last_name":" ", "email":" ", "phone":"2547XXXX", "password":" "} | N |
Crew – Profile | GET | /crew/profile | Y | |
Crew – Login | POST | /crew/login | { "email":" ", "password":" "} | N |
Crew – Forgot Password | PUT | /crew/forgot-password | {"email":" "} | N |
Crew – Change Password | PUT | /crew/change-password | {"new_password":" ", "confirm_password":" " } | Y |
Crew – Edit Profile | PUT | /crew/edit | { "first_name":" ", "last_name":" " } | Y |
Crew – Add Bookmark | POST | /crew/bookmark | { "reg_no":" ", "alias":" " } | Y |
Crew – View Bookmark | GET | /crew/bookmark/<id> | Y | |
Crew – Pay using Bookmark | POST | /crew/bookmark/<id> | { "amount":"80", "pass_phone":"2547XXX" } | Y |
Crew – View All Bookmark | GET | /crew/bookmark | { "reg_no":"KGA 202X", "alias":" " } | Y |
Crew – View All Payments | GET | /crew/payments | Y | |
Crew – View Payments Per Car | GET | /crew/payments/<id> | Y | |
Owner End Points | ||||
Owner – Register | POST | /owner/register | { "first_name":" ", "last_name":" ", "email":" ", "phone":"254XXXX", "password":" " } | N |
Owner – Profile | GET | /owner/profile | Y | |
Owner – Login | POST | /owner/login | { "email":" ", "password":" "} | N |
Owner – Change Password | PUT | /owner/change-password | { "new_password":" ", "confirm_password":" " } | Y |
Owner – Forgot Password | PUT | /owner/forgot-password | { "email":" " } | N |
Owner – Profile | GET | /owner/profile | Y | |
Owner – Edit Profile | PUT | /owner/edit | { "first_name":" ", "last_name":" "} | Y |
Owner – Add Vehicle | PUT | /owner/add-vehicle | { "reg_no":"KGA 200X", "sacco":" ", "capacity":"33" } | Y |
Owner – View All Vehicle | GET | /owner/vehicles | Y | |
Owner – View Vehicle | GET | /owner/vehicle | { "reg_no":"KGA 211X"} | Y |
Owner – Balance | GET | /owner/balance | Y | |
Owner – Withdraw | POST | /owner/withdraw | { "amount":" ", "owner_phone":"2547XXXX"} | Y |
Owner – All Deposits | GET | /owner/all-deposits | Y | |
Owner – All Withdraw | GET | /owner/all-withdraws | Y | |
Owner – View Payments P. Car | GET | /owner/vehicle/payment/<id> | Y | |
Owner – Transfer | PUT | /owner/transfer | { "email":" ","reg_no":"KGA 200X"} | Y |
Owner – Edit Vehicle | PUT | /owner/vehicle/1 | {"sacco":" ","capacity":"14"} | Y |