"version": "1.0"
"description": "DROOM REST API"
"apihost": "https://jobdroom.herokuapp.com"Droom means dream in Dutch. This app helps you find your dream job by swiping right. Think Tinder + LinkedIn
Request Success ( 200 - OK || 201 - CREATED )
{
"key": "data",
}
----- OR ------
[
{
"data": "data",
},
{
"key": "data",
},
...
]Request Error ( 400 - Bad Request || 404 - Not Found || 500 - Internal Server Error )
{
"error": "Error message"
}| ENDPOINT | DESCRIPTION |
|---|---|
| GET / | Base URL |
| POST /api/auth/register | Register new Job Seeker / Company |
| POST /api/auth/login | Login for User / Company |
| GET /api/company | Get all Companies |
| GET /api/company/id | Get a particular Company by ID |
| PUT /api/company | Update Company Profile |
| GET /api/seekers | Get All Job Seekers |
| GET /api/seekers/id | Get Job Seeker by ID |
| PUT /api/seekers | Update a Job Seeker Profile |
| GET /api/jobs | Get all Jobs |
| GET /api/jobs/id | Get a particular Job by ID |
| POST /api/jobs | Create a new Job posting |
| PUT /api/jobs/id | Update Job |
| DELETE /api/jobs/id | Delete a particular Job |
| GET /api/matches | Get all Matches by a User |
| POST /api/matches/company | User(Company) can send a potential match(job seeker) |
| POST /api/matches/seeker | User(Job Seeker) can send a potential match(Company) |
| GET /api/messages/id | User can get all messages with match |
| POST /api/messages/id | User can send message to match |
Response body:
{
"message": "Welcome to Droom API"
}Description: Creates a Job Seeker or Company User account depending on "isCompany": "true" or "false".
Request body:
{
"name": "John Doe",
"email": "john@email.com",
"password": "johnny",
"isCompany": false
}Response body:
{
"id": 1,
"name": "John Doe",
"email": "john@email.com",
"isCompany": false,
"createdAt": "2019-07-29T03:56:42.294Z"
}Description: Returns a User token, contains User role.
Request body:
{
"email": "john@email.com",
"password": "johnny"
}Response body:
{
"message": "Welcome, John Doe!",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTMsImVtYWlsIjoiY29tcGFueUBlbWFpbC5jb20iLCJpc0NvbXBhbnkiOnRydWUsImlhdCI6MTU2NDM3MjY0MSwiZXhwIjoxNTY0NDU5MDQxfQ.U5XPvzO7eNw48b4hn4BzIrmNT-yA2b-qABypN-O7BfU"
}Description: Returns a Company Profile.
Response body:
{
"id": 5,
"name": "Company Work",
"email": "companywork@company.com",
"about": "Company Work, we know that finding the best document management solution for your organization means reducing costs without sacrificing access to information.",
"location": "Abia, Nigeria",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg",
"jobs": [
{
"id": 10,
"title": "Engineering Recruiting Director",
"description": "Responsible for leading a safe and educational classroom environment by providing daily care, nurturing and development of children.",
"location": "Lagos, Nigeria",
"userId": 5,
"createdAt": "2019-07-30T09:39:43.205Z"
},
{
"id": 11,
"title": "Software Engineer",
"description": "Developing new systems and improving existing systems.",
"location": "Remote",
"userId": 5,
"createdAt": "2019-07-30T09:39:43.205Z"
},
...
]
}Description: Returns all companies.
Response body:
[
{
"id": 5,
"name": "Company Work",
"email": "companywork@company.com",
"about": "Company Work, we know that finding the best document management solution for your organization means reducing costs without sacrificing access to information.",
"location": "LocalHost, PORT, 8080",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg"
},
{
"id": 6,
"name": "Company Work",
"email": "companywork2@company.com",
"about": "promotions build more momentum for big results.",
"location": "LocalHost, PORT, 8080",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg"
}
...
]Description: Update Company Profile having current authorization token.
Header
...
Authorization: token(company)Request Body
{
"about": "Company Work, we know that finding the best document management solution for your organization means reducing costs without sacrificing access to information.",
"location": "LocalHost, PORT, 8080",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg",
}Response body:
{
"id": 11,
"about": "Company Work, we know that finding the best document management solution for your organization means reducing costs without sacrificing access to information.",
"location": "LocalHost, PORT, 8080",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg"
}Description: Returns all Job Seeker's Profiles.
Header
...
Authorization: tokenResponse body:
[
{
"id": 1,
"name": "John Doe",
"email": "john@email.com",
"interests": "Data Analytics, BlockChain",
"pastExperience": "Devops",
"location": "",
"profileImg": ""
},
{
"id": 2,
"name": "Jane Doe",
"email": "jane@email.com",
"interests": "Photography",
"pastExperience": "Quality Assurance, Data Analytics",
"location": "",
"profileImg": ""
},
...
]Description: Returns a Job Seeker's Profile.
Header
...
Authorization: tokenResponse body:
[
{
"id": 1,
"name": "John Doe",
"email": "john@email.com",
"interests": "Data Analytics, BlockChain",
"pastExperience": "Devops",
"location": "",
"profileImg": ""
}
...
]Description: Update Job Seeker Profile having current authorization token.
Header
...
Authorization: token(job seeker)Request Body
{
"interests": "Data Analytics, BlockChain",
"pastExperience": "Devops",
"location": "LocalHost, Port, 8080",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg"
}Response body:
{
"id": 1,
"name": "John Doe",
"email": "john@email.com",
"interests": "Data Analytics, BlockChain",
"pastExperience": "Devops",
"location": "LocalHost, Port, 8080",
"profileImg": "https://res.cloudinary.com/elbon/image/upload/v1561734286/luncher_assets/pfzxjfpkh47yepawxbzf.jpg",
}Description: Returns all Jobs Postings.
Header
...
Authorization: tokenResponse body:
[
{
"id": 1,
"title": "Delivery Driver",
"description": "You’ll play a critical role in delivering on our promise to provide our customers with excellent customer service.",
"location": "Job Location on the Moon",
"companyId": 6,
"company": "Company Name I",
"email": "companyII@company.com",
"createdAt": "2019-07-29T03:41:22.513Z"
},
{
"id": 2,
"title": "Entry Level Marketing and Public Relations",
"description": "We are actively seeking Entry-Level Professionals for our public relations & sales marketing team!",
"location": "Job Location on the Sun",
"companyId": 7,
"company": "Company Name II",
"email": "companyII@company.com",
"createdAt": "2019-07-29T03:41:22.513Z"
}
...
]Description: Returns a particular Job.
Header
...
Authorization: tokenResponse body:
{
"id": 1,
"title": "Delivery Driver",
"description": "You’ll play a critical role in delivering on our promise to provide our customers with excellent customer service.",
"location": "Job Location on the Moon",
"companyId": 7,
"company": "Company Name I",
"email": "companyII@company.com",
"createdAt": "2019-07-29T03:41:22.513Z"
}Description: Create a new Job posting by current Company authorization token.
Header
...
Authorization: token(company)Request body:
{
"title": "Delivery Driver",
"description": "You’ll play a critical role in delivering on our promise to provide our customers with excellent customer service.",
"location": "Job Location on the Moon",
}Response body:
{
"id": 1,
"title": "Delivery Driver",
"description": "You’ll play a critical role in delivering on our promise to provide our customers with excellent customer service.",
"location": "Job Location on the Moon",
"userId": 13,
"createdAt": "2019-07-29T03:41:22.513Z"
}Description: Updates existing Job posting by current Company authorization token.
Header
...
Authorization: token(company)Request body:
{
"title": "Delivery Driver updated",
"description": "You’ll play a critical role in delivering on our promise to provide our customers with excellent customer service.",
"location": "Job Location on the Moon",
}Response body:
{
"id": 1,
"title": "Delivery Driver updated",
"description": "You’ll play a critical role in delivering on our promise to provide our customers with excellent customer service.",
"location": "Job Location on the Moon",
"userId": 13,
"createdAt": "2019-07-29T03:41:22.513Z"
}Description: Deletes existing Job posting by current Company authorization token.
Header
...
Authorization: token(company)Response body: (204 - No Content)
Description: Return all matches for user wth token.
Header
...
Authorization: tokenResponse body:
[
{
"id": 4,
"companyId": 2,
"companyName": "test company2",
"jobSeekerId": 3,
"jobSeekerName": "test jobseeker1",
"createdAt": "2019-07-31T11:57:45.455Z",
"matchedAt": "2019-07-31T11:57:49.798Z",
"isMatch": true
},
{
"id": 3,
"companyId": 2,
"companyName": "test company2",
"jobSeekerId": 4,
"jobSeekerName": "test jobseeker2",
"createdAt": "2019-07-31T11:57:45.455Z",
"matchedAt": "2019-07-31T11:57:45.453Z",
"isMatch": true
}
...
]_Description: User(company) can add a potential match(Job seeker).
Header
...
Authorization: token(company)Request body:
{
"match": 2(jobseekerId)
}Response body:
{
"id": 3,
"companyId": 1,
"jobSeekerId": 2,
"createdAt": "2019-07-31T11:57:45.455Z",
"matchedAt": "2019-07-31T12:10:29.124Z",
"isMatch": false || true
}Description: User(job seeker) can add a potential match(company).
Header
...
Authorization: token(seeker)Request body:
{
"match": 2(companyId)
}Response body:
{
"id": 3,
"companyId": 2,
"jobSeekerId": 2,
"createdAt": "2019-07-31T11:57:45.455Z",
"matchedAt": "2019-07-31T12:10:29.124Z",
"isMatch": false || true
}Description: Returns the messages between match(job seeker and company) by providing the matchId.
Header
...
Authorization: tokenResponse body:
[
{
"id": 5,
"matchId": 6,
"sentById": 4,
"sentByName": "John Doe",
"jobSeekerId": 4,
"jobSeekerName": "John Doe",
"companyId": 5,
"companyName": "Intake Company",
"message": "Hello, I'm interested in your last job listing, can I come in for a chat. thank you.",
"createdAt": "2019-08-01T10:57:42.157Z"
},
{
"id": 7,
"matchId": 6,
"sentById": 5,
"sentByName": "Intake Company",
"jobSeekerId": 4,
"jobSeekerName": "John Doe",
"companyId": 5,
"companyName": "Intake Company",
"message": "Sure, John Doe. Kindly come to the office on monday for a chat.",
"createdAt": "2019-08-01T10:57:59.113Z"
},
...
]Description: Add a message between match. id - matchId.
Header
...
Authorization: tokenRequest body:
{
"messages": "Hello, ..."
}Response body:
{
"id": 7,
"matchId": 6,
"sentBy": 4,
"message": "Hello, ...",
"createdAt": "2019-08-01T14:11:47.326Z"
}- Node | Express | hapi/joi | bcryptjs | cors | knex | Postgres | Jest | Supertest