Listerbox API

Backend API for the Listerbox application to manage profiles, tasks, requests, transactions, reviews, users, messages and authentication

Profiles 6

Profiles CRUD functionality

Description

Fetch all profiles from database. Includes pagination, filtering, etc.

Query
KeyValueDescription
selectname,description,photo
Description

Add new profile to database. Must be authenticated and must be a Tasker or an Admin

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "name": "Keys Jay Profile", "description": "I am a personal chef", "phone": "09090112233", "email": "kels@gmail.com", "address": "12 Admiralty Lekki Phase 1, Lagos", "accountNumber": "01992922819", "bankName": "GT Bank" }
Description

Update single profile in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "description": "I am a cleaner, and also a chef", "accountNumber": 01992922819, "bankName": "GT Bank" }
Description

Route to upload a profile photo

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
KeyValueDescription
file

Authentication 8

Routes for user authentication including register, login, reset password, etc

Description

Add user to database with encrypted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "name": "Kels Jay", "email": "kels@gmail.com", "password": 123456, "role": "Tasker" }
Description

Generate password token and send email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "email": "john@gmail.com" }
Description

Reset user password using token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "password": 123456 }
Description

Update logged in user name and email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "email": "john@gmail.com", "name": "John Doe Nut" }
Description

Update logged in user password, send in the body currentPassword and newPassword

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "currentPassword": "1234567", "newPassword": "123456" }
Description

Clear token cookie

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "email": "john@gmail.com", "password": "123456" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Users 5

CRUD functionality for users only available to admins

Description

Get all users (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Description

Add user to database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "name": "Jamie Jady", "email": "jamie@gmail.com", "password": "123456" }
Description

Update user in databse (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "name": "Jamie Jady Kahn", "password": "123456", "role": "Tasker" }
Description

Delete user in database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Tasks 6

Task CRUD

Description

Get all tasks in database

Query
KeyValueDescription
categories[in]Caterer
Description

Create a task for a specific profile

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "title": "Top Caterer", "description": "I can cook and get it delivered or I can be your personal chef", "categories": ["Caterer"], "price": 10000 }
Description

Update task in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "title": "Chief Top Caterer yo" }
Description

Delete task in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Reviews 6

Manage task reviews

Description

Get all reviews from database and populate with task title

Description

Fetch a review from database by id and populate task name and description

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "title": "Nice job Shola", "text": "Shola's food was really nice, and delivery was pretty fast", "rating": 10 }
Description

Update review in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "title": "Shola was really nice" }
Description

Delete review in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Requests 11

Manage task requests

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "address": "118a Babatunde Dabiri Street, Lekki Phase 1, Lagos", "time": "10am", "date": "27th April 2020", "description": "I need you to ring the bell when you get to my house or call me again" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "description": "I need you to call me once you get to my house or ring the bell" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Description

Tasker accepts request from user

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Description

This allows the user check the service as completed

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Description

This allows the tasker check the service as completed, then an email is sent to the user to comfirm service completion

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Description

Cancel request from the user

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Payouts 3

Description

Tasker can request for a payout

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content

Body
{ "amount": 5000 }