ChefSkills API

Backend API for the ChefSkills application to manage kitchens, classes, reviews, users and authentication.

Kitchens 7

Create, read, update and delete Kitchens.

Description

Get all kitchens from database. Includes pagination, filtering, etc.

Description

Add new kitchen to the database. Must be authenticated and must be publisher or admin. Only 1 kitchen allowed per publisher.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "name": "Chef Master Design Institute", "description": "Master the art of design", "website": "https://chefmasterdesigninstitute.com", "phone": "(111) 111-1111", "email": "enroll@chefmasterdesigninstitute.com", "address": "1 Bay State Rd Boston MA 02215", "careers": ["Restaurant Manager", "Executive Chef", "Head Chef"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptIsa": true }
Description

Update single kitchen in database.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "housing": false }
Description

Delete kitchen from database.

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Description

Upload a photo for a kitchen.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
KeyValueDescription
file

Courses 6

Create, read, update and delete courses

Description

Create a course for a specific kitchen.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "title": "Stop burning things", "description": "Course to stop overcooking things.", "weeks": 1, "tuition": 200, "minimumSkill": "beginner", "scholarhipsAvailable": true }
Description

Update course in database.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "weeks": 10 }
Description

Remove course from database.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4

Authentication 8

User authentication including registration, login, reset password, etc.

Description

Add user to database with encrypted password.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

Body
{ "name": "John Doe", "email": "john@gmail.com", "password": "123456", "role": "publisher" }
Description

Log user in and return JWT token.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

Body
{ "email": "john2@gmail.com", "password": "123456" }
Description

Get logged in user information using Bearer token.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Description

Generate password token and send email.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

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

Reset user password using token.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

Body
{ "password": "1234567" }
Description

Update logged in user name and email.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "email": "john@gmail.com", "name": "John Doe" }
Description

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "currentPassword": "1234567", "newPassword": "123456" }
Description

Clear token cookie.

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4

Users 5

Create, read, update and delete users. (admin only)

Description

Get all users. (admin only)

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Description

Get single user by ID. (admin only)

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Description

Add user to database. (admin only)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "name": "Nate Smith", "email": "nate@gmail.com", "password": "123456" }
Description

Update user in database. (admin only)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "name": "Nate Johnson" }
Description

Delete a user from the database. (admin only)

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4

Reviews 6

Create, read, update and delete reviews.

Description

Get all reviews from database and populate with kitchen name and description.

Description

Get a review from database by ID and populate kitchen name and description.

Description

Add review for a specific kitchen.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "title": "Nice Kitchen", "text": "I learned a lot", "rating": 8 }
Description

Update a review in database.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Content-Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4
Body
{ "title": "Great teachers", "rating": 1 }
Description

Delete a review from the database.

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkY2Y0Y2Y3NDI1YjE1MmFhY2U2MzRkNSIsImlhdCI6MTU3Mzg2Nzc2OCwiZXhwIjoxNTc2NDU5NzY4fQ.hVxihJw0vuA3FFzjN0oydCafgQbQxMk_PaGqSC_dmu4