Udemy-Clone-APi

Run in Insomnia
Environment:

Udemy-Clone-APi

Udemy Clone API. Feel free to share your friends and developers who love to build tech with Node js.

cURL

All End Points


Reviews


 

PUT updateRating

http://localhost:5000/api/v1/review/updateRating/5efee96ec193a534f441fa97

To update a rating to a bootcamp.

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "editRating": 10
}

Example request:
curl "http://localhost:5000/api/v1/review/updateRating/5efee96ec193a534f441fa97" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "editRating":10
}' 
Example response:
{
  "status": "success",
  "data": {
    "_id": "5efee96ec193a534f441fa97",
    "title": "This bootcamp is awesome",
    "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
    "rating": 10,
    "bootcamp": "5efc735516104d0d48f23053",
    "user": "5efd61c5ee410e17c00285b5",
    "createdAt": "2020-07-03T08:16:46.518Z",
    "__v": 0
  }
}
 

PUT updateReview

http://localhost:5000/api/v1/review/5efee4f33356381568d366be

To update a review. Only review belongs to user can update.

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "title": "This bootcamp is awesome"
}

Example request:
curl "http://localhost:5000/api/v1/review/5efee4f33356381568d366be" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "title":"This bootcamp is awesome"
}' 
Example response:
{
  "status": "success",
  "data": {
    "_id": "5efedaf0c5748b16acf57fee",
    "title": "This bootcamp is awesome",
    "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
    "rating": 10,
    "bootcamp": {
      "_id": "5efc735516104d0d48f23053",
      "name": "ModrenTech Bootcamp",
      "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
      "id": "5efc735516104d0d48f23053"
    },
    "user": "5efc726516104d0d48f23051",
    "createdAt": "2020-07-03T07:14:56.228Z",
    "__v": 0
  }
}
 

DELETE delete review

http://localhost:5000/api/v1/review/5efee4f33356381568d366be

To delete a review.

Headers
Authorization
Bearer {{TOKEN}}

Example request:
curl "http://localhost:5000/api/v1/review/5efee4f33356381568d366be" \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X DELETE \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
 

POST createReview

http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews

To add a review to a bootcamp. Only one review can be added per bootcamp.

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "title": "This bootcamp is awesome",
  "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
  "rating": "8"
}

Example request:
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "title": "This bootcamp is awesome",
    "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
    "rating": "8"
}' 
Example response:
{
  "status": "success",
  "data": {
    "_id": "5efee96ec193a534f441fa97",
    "title": "This bootcamp is awesome",
    "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
    "rating": 8,
    "bootcamp": "5efc735516104d0d48f23053",
    "user": "5efd61c5ee410e17c00285b5",
    "createdAt": "2020-07-03T08:16:46.518Z",
    "__v": 0
  }
}
 

GET getReview

http://localhost:5000/api/v1/review/5efedaf0c5748b16acf57fee

To get a specific review.


Example request:
curl "http://localhost:5000/api/v1/review/5efedaf0c5748b16acf57fee" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "data": {
    "_id": "5efedaf0c5748b16acf57fee",
    "title": "Great bootcamp",
    "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
    "rating": 10,
    "bootcamp": {
      "_id": "5efc735516104d0d48f23053",
      "name": "ModrenTech Bootcamp",
      "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
      "id": "5efc735516104d0d48f23053"
    },
    "user": "5efc726516104d0d48f23051",
    "createdAt": "2020-07-03T07:14:56.228Z",
    "__v": 0
  }
}
 

GET get reviews for bootcamp

http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews

TO get reviews of a bootcamps.


Example request:
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "count": 1,
  "data": [
    {
      "_id": "5efee3a33bcedf32bccbcd33",
      "title": "Great bootcamp",
      "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
      "rating": 10,
      "bootcamp": {
        "_id": "5efc735516104d0d48f23053",
        "name": "ModrenTech Bootcamp",
        "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
        "id": "5efc735516104d0d48f23053"
      },
      "user": "5efc726516104d0d48f23051",
      "createdAt": "2020-07-03T07:52:03.200Z",
      "__v": 0
    }
  ]
}
 

GET getReviews

http://localhost:5000/api/v1/review/

To get all reviews.


Example request:
curl "http://localhost:5000/api/v1/review/" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "count": 2,
  "pagination": {},
  "data": [
    {
      "_id": "5efee96ec193a534f441fa97",
      "title": "This bootcamp is awesome",
      "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
      "rating": 10,
      "bootcamp": {
        "_id": "5efc735516104d0d48f23053",
        "name": "ModrenTech Bootcamp",
        "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
        "id": "5efc735516104d0d48f23053"
      },
      "user": "5efd61c5ee410e17c00285b5",
      "createdAt": "2020-07-03T08:16:46.518Z",
      "__v": 0
    },
  ]
}

Users ( Only admin can use this routes )


 

GET get a user

http://localhost:5000/api/v1/user/5efc725516104d0d48f23050

To get a user.

Headers
Authorization
Bearer {{TOKEN}}

Example request:
curl "http://localhost:5000/api/v1/user/5efc725516104d0d48f23050" \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "data": {
    "role": "publisher",
    "_id": "5efc725516104d0d48f23050",
    "name": "Rahul Sah",
    "email": "rahul@gmail.com",
    "createdAt": "2020-07-01T11:24:05.199Z",
    "__v": 0
  }
}
 

DELETE deleteUser

http://localhost:5000/api/v1/user/5efc74d165a43f288054030e

To delete a user.

Headers
Authorization
Bearer {{TOKEN}}

Example request:
curl "http://localhost:5000/api/v1/user/5efc74d165a43f288054030e" \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X DELETE \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
 

PUT updateUser

http://localhost:5000/api/v1/user/5efc726516104d0d48f230515555

To update a user

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "name": "sahil Ansari"
}

Example request:
curl "http://localhost:5000/api/v1/user/5efc726516104d0d48f230515555" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "name":"sahil Ansari"
}' 
Example response:
{
  "status": "success",
  "data": {
    "role": "publisher",
    "_id": "5efc725516104d0d48f23050",
    "name": "Sahil Ansari",
    "email": "rahul@gmail.com",
    "createdAt": "2020-07-01T11:24:05.199Z",
    "__v": 0
  }
}
 

POST createUser

http://localhost:5000/api/v1/user/

To create a user.

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "name": "Kajal Sah",
  "email": "kajal@gmail.com",
  "password": "12345678"
}

Example request:
curl "http://localhost:5000/api/v1/user/" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "name":"Kajal Sah",
  "email":"kajal@gmail.com",
  "password":"12345678"
}' 
Example response:
{
  "status": "success",
  "data": {
    "role": "publisher",
    "_id": "5efc725516104d0d48f23050",
    "name": "Rahul Sah",
    "email": "rahul@gmail.com",
    "createdAt": "2020-07-01T11:24:05.199Z",
    "__v": 0
  }
}
 

GET getUsers

http://localhost:5000/api/v1/user/

To see all users

Headers
Authorization
Bearer {{TOKEN}}

Example request:
curl "http://localhost:5000/api/v1/user/" \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "data": {
    "status": "success",
    "count": 5,
    "pagination": {},
    "data": [
      {
        "role": "user",
        "_id": "5f00370aff3c97164ce8d7b0",
        "name": "Aman sah",
        "email": "aman@gmail.com",
        "createdAt": "2020-07-04T08:00:10.177Z",
        "__v": 0
      },
      {
        "role": "user",
        "_id": "5efd61c5ee410e17c00285b5",
        "name": "Kajal Sah",
        "email": "kajal@gmail.com",
        "createdAt": "2020-07-02T04:25:41.365Z",
        "__v": 0
      },
    ]
  }
}

Authentication


 

GET logout

http://localhost:5000/api/v1/auth/logout/

Logout the user. After logout all cookies is set null


Example request:
curl "http://localhost:5000/api/v1/auth/logout/" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "data": {}
}
 

POST resetPassword

 http://localhost:5000/api/v1/auth/resetPassword/765fea6bc1bad113b5682e519a03355fc3596ee8

A reset password token is sent to your email and by using it you ccan reset your password

Headers
Content-Type
application/json
Body json
{
  "newPassword": "sajidansari@"
}

Example request:
curl " http://localhost:5000/api/v1/auth/resetPassword/765fea6bc1bad113b5682e519a03355fc3596ee8" \
  -H 'Content-Type: application/json' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "newPassword":"sajidansari@"
}' 
Example response:
{
  "status": "Error",
  "data": "Your password has been changed"
}
 

POST forgotPassword

http://localhost:5000/api/v1/auth/forgotPassword

In case you forgot your password. You can reset it by giving your email. A reset password token is send to your email.

Headers
Content-Type
application/json
Body json
{
  "email": "Sahil@gmail.com"
}

Example request:
curl "http://localhost:5000/api/v1/auth/forgotPassword" \
  -H 'Content-Type: application/json' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "email":"Sahil@gmail.com"
}' 
Example response:
{
  "status": "success",
  "data": "ResetPassword Email sent"
}
 

PUT updatePassword

http://localhost:5000/api/v1/auth/update/password/

To update user password

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "currentPassword": "12345644",
  "newPassword": "12345678"
}

Example request:
curl "http://localhost:5000/api/v1/auth/update/password/" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "currentPassword":"12345644",
  "newPassword":"12345678"
}' 
Example response:
{
  "status": "success",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWY2Zjk3NmViMmU1YjM2NGNmYWU0NjgiLCJpYXQiOjE1OTM0NTA2MTUsImV4cCI6MTU5NjA0MjYxNX0.mWeTw7qy5JQ0lgtWY0zpEn_EGedHIZigRn8ao5fqHxI"
}
 

PUT updateDetails

http://localhost:5000/api/v1/auth/update/userDetails

To update a user details

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "name": "Rahul devgan",
  "email": "rahul@gmail.com"
}

Example request:
curl "http://localhost:5000/api/v1/auth/update/userDetails" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "name":"Rahul devgan",
  "email":"rahul@gmail.com"
}' 
Example response:
{
  "status": "success",
  "data": {
    "role": "publisher",
    "_id": "5efc725516104d0d48f23050",
    "name": "Rahul devgan",
    "email": "rahul@gmail.com",
    "createdAt": "2020-07-01T11:24:05.199Z",
    "__v": 0
  }
}
 

POST Login user

http://localhost:5000/api/v1/auth/login

To login a user

Headers
Content-Type
application/json
Body json
{
  "email": "rahul@gmail.com",
  "password": "12345678"
}

Example request:
curl "http://localhost:5000/api/v1/auth/login" \
  -H 'Content-Type: application/json' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
    "email":"rahul@gmail.com",
    "password":"12345678"
}' 
Example response:
{
  "status": "success",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NDc4MTYsImV4cCI6MTU5NjQzOTgxNn0.DPheu9UvutK7L7GV2eZ9xZSlK9_ievGc54DeDcOLQuQ"
}
 

POST Register a user

http://localhost:5000/api/v1/auth/register

To register a user

Headers
Content-Type
application/json
Body json
{
  "name": "Aman sah",
  "email": "aman@gmail.com",
  "role": "user",
  "password": "12345678"
}

Example request:
curl "http://localhost:5000/api/v1/auth/register" \
  -H 'Content-Type: application/json' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
    "name": "Aman sah",
  "email": "aman@gmail.com",
  "role":"user",
    "password": "12345678"
}' 
Example response:
{
  "status": "success",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjAwMzcwYWZmM2M5NzE2NGNlOGQ3YjAiLCJpYXQiOjE1OTM4NDk2MTAsImV4cCI6MTU5NjQ0MTYxMH0._tazE7WCxAmImfgrhd5cNAcTNUcysP-z_BlL_TQK-Uk"
}

Course


 

PUT updatetutionCost

http://localhost:5000/api/v1/course/updateTutionCost/5efeec2ad574a704e098fa56

To update a tution cost to a course.

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "newTutionCost": 7000
}

Example request:
curl "http://localhost:5000/api/v1/course/updateTutionCost/5efeec2ad574a704e098fa56" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "newTutionCost":7000
}' 
Example response:
{
  "status": "success",
  "data": {
    "scholarhipsAvailable": true,
    "_id": "5efeec2ad574a704e098fa56",
    "title": "Node js",
    "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
    "weeks": "8",
    "tuition": 7000,
    "minimumSkill": "beginner",
    "bootcamp": "5efc735516104d0d48f23053",
    "user": "5efc725516104d0d48f23050",
    "createdAt": "2020-07-03T08:28:26.954Z",
    "__v": 0
  }
}
 

DELETE deleteCourse

http://localhost:5000/api/v1/course/5ef8d8ee204e3817803ad7f4

To delete a course.

Headers
Authorization
Bearer {{TOKEN}}

Example request:
curl "http://localhost:5000/api/v1/course/5ef8d8ee204e3817803ad7f4" \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X DELETE \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
 

PUT updateCourse

http://localhost:5000/api/v1/course/5efeec2ad574a704e098fa56

To update a course.

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "title": "Javascript"
}

Example request:
curl "http://localhost:5000/api/v1/course/5efeec2ad574a704e098fa56" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "title": "Javascript"
}' 
Example response:
{
  "status": "success",
  "data": {
    "scholarhipsAvailable": true,
    "_id": "5efeec2ad574a704e098fa56",
    "title": "Javascript",
    "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
    "weeks": "8",
    "tuition": 7000,
    "minimumSkill": "beginner",
    "bootcamp": "5efc735516104d0d48f23053",
    "user": "5efc725516104d0d48f23050",
    "createdAt": "2020-07-03T08:28:26.954Z",
    "__v": 0
  }
}
 

POST Create Course

http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses

To add a course to a bootcamp

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "title": "Node js",
  "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
  "weeks": 8,
  "tuition": 1000,
  "minimumSkill": "beginner",
  "scholarhipsAvailable": true
}

Example request:
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "title": "Node js",
    "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
    "weeks": 8,
    "tuition": 1000,
    "minimumSkill": "beginner",
    "scholarhipsAvailable": true
}' 
Example response:
{
  "status": "success",
  "data": {
    "scholarhipsAvailable": true,
    "_id": "5efeec2ad574a704e098fa56",
    "title": "Node js",
    "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
    "weeks": "8",
    "tuition": 1000,
    "minimumSkill": "beginner",
    "bootcamp": "5efc735516104d0d48f23053",
    "user": "5efc725516104d0d48f23050",
    "createdAt": "2020-07-03T08:28:26.954Z",
    "__v": 0
  }
}
 

GET get Course

http://localhost:5000/api/v1/course/5efc738c16104d0d48f23054

To get a single course


Example request:
curl "http://localhost:5000/api/v1/course/5efc738c16104d0d48f23054" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "data": {
    "scholarhipsAvailable": true,
    "_id": "5efc738c16104d0d48f23054",
    "title": "Devworks Bootcamp",
    "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
    "weeks": "8",
    "tuition": 13000,
    "minimumSkill": "beginner",
    "bootcamp": {
      "_id": "5efc735516104d0d48f23053",
      "name": "ModrenTech Bootcamp",
      "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
      "id": "5efc735516104d0d48f23053"
    },
    "user": "5efc725516104d0d48f23050",
    "createdAt": "2020-07-01T11:29:16.109Z",
    "__v": 0
  }
}
 

GET get Courses for a bootcamp

http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses

Example request:
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "count": 2,
  "data": [
    {
      "scholarhipsAvailable": true,
      "_id": "5efeec2ad574a704e098fa56",
      "title": "Node js<script>alert(1)</script>",
      "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
      "weeks": "8",
      "tuition": 7000,
      "minimumSkill": "beginner",
      "bootcamp": {
        "_id": "5efc735516104d0d48f23053",
        "name": "Devworks Bootcamp",
        "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
        "id": "5efc735516104d0d48f23053"
      },
      "user": "5efc725516104d0d48f23050",
      "createdAt": "2020-07-03T08:28:26.954Z",
      "__v": 0
    }
  ]
}
 

GET Courses

http://localhost:5000/api/v1/course/

To get all courses


Example request:
curl "http://localhost:5000/api/v1/course/" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "count": 2,
  "pagination": {},
  "data": [
    {
      "scholarhipsAvailable": true,
      "_id": "5efeec2ad574a704e098fa56",
      "title": "Node js",
      "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
      "weeks": "8",
      "tuition": 7000,
      "minimumSkill": "beginner",
      "bootcamp": {
        "_id": "5efc735516104d0d48f23053",
        "name": "ModrenTech Bootcamp",
        "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
        "id": "5efc735516104d0d48f23053"
      },
      "user": "5efc725516104d0d48f23050",
      "createdAt": "2020-07-03T08:28:26.954Z",
      "__v": 0
    },
    {
      "scholarhipsAvailable": true,
      "_id": "5efc738c16104d0d48f23054",
      "title": "Devworks Bootcamp",
      "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
      "weeks": "8",
      "tuition": 13000,
      "minimumSkill": "beginner",
      "bootcamp": {
        "_id": "5efc735516104d0d48f23053",
        "name": "ModrenTech Bootcamp",
        "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
        "id": "5efc735516104d0d48f23053"
      },
      "user": "5efc725516104d0d48f23050",
      "createdAt": "2020-07-01T11:29:16.109Z",
      "__v": 0
    }
  ]
}

Bootcamp


 

GET get bootcamps in radius

http://localhost:5000/api/v1/bootcamp/radius/01854/50

To get a bootcamps around your area by using zipcode and radius.


Example request:
curl "http://localhost:5000/api/v1/bootcamp/radius/01854/50" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
 

DELETE DeleteBootcamp

http://localhost:5000/api/v1/bootcamp/5ef8d3f28903270ad480d90b

To delete a bootcamp

Headers
Authorization
Bearer {{TOKEN}}

Example request:
curl "http://localhost:5000/api/v1/bootcamp/5ef8d3f28903270ad480d90b" \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X DELETE \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
 

PUT updateBoocamp

http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053

To update bootcamp

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "name": "Devworks Bootcamp"
}

Example request:
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
   "name": "Devworks Bootcamp"
}' 
Example response:
{
  "status": "success",
  "data": {
  "name": "Devworks Bootcamp"
  }
}
 

POST Create a Bootcamp

http://localhost:5000/api/v1/bootcamp/

To create a bootcamp

Headers
Content-Type
application/json
Authorization
Bearer {{TOKEN}}
Body json
{
  "name": "ModrenTech Bootcamp",
  "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
  "website": "https://moderntech.com",
  "phone": "(222) 222-2222",
  "email": "enroll@moderntech.com",
  "address": "220 Pawtucket St, Lowell, MA 01854",
  "careers": [
    "Web Development",
    "UI/UX",
    "Mobile Development"
  ],
  "housing": false,
  "jobAssistance": true,
  "jobGuarantee": false,
  "acceptGi": true
}

Example request:
curl "http://localhost:5000/api/v1/bootcamp/" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X POST \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -d '{
  "name": "ModrenTech Bootcamp",
    "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
    "website": "https://moderntech.com",
    "phone": "(222) 222-2222",
    "email": "enroll@moderntech.com",
    "address": "220 Pawtucket St, Lowell, MA 01854",
    "careers": ["Web Development", "UI/UX", "Mobile Development"],
    "housing": false,
    "jobAssistance": true,
    "jobGuarantee": false,
    "acceptGi": true
}' 
Example response:
{
  "status": "success",
  "count": 1,
  "pagination": {},
  "data": [
    {
      "location": {
        "type": "Point",
        "coordinates": [
          -71.3235419,
          42.6497006
        ],
        "formattedAddress": "UMass Lowell University Police, 220, Pawtucket Street, The Acre, Lowell, Middlesex County, Massachusetts, 01854-5141, United States of America",
        "street": "Pawtucket Street",
        "city": "Lowell",
        "zipcode": "01854-5141",
        "country": "US"
      },
      "careers": [
        "Web Development",
        "UI/UX",
        "Mobile Development"
      ],
      "photo": "no-photo.jpeg",
      "housing": false,
      "jobAssistance": true,
      "jobGaurantee": false,
      "acceptGi": true,
      "_id": "5efc735516104d0d48f23053",
      "name": "ModrenTech Bootcamp",
      "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
      "website": "https://moderntech.com",
      "phone": "(222) 222-2222",
      "email": "enroll@moderntech.com",
      "address": "220 Pawtucket St, Lowell, MA 01854",
      "user": "5efc725516104d0d48f23050",
      "createdAt": "2020-07-01T11:28:21.576Z",
      "slug": "modrentech-bootcamp",
      "__v": 0,
      "averageCost": 10000,
      "averageRating": 10,
      "Courses": [
        {
          "_id": "5efc738c16104d0d48f23054",
          "title": "Devworks Bootcamp",
          "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
          "bootcamp": "5efc735516104d0d48f23053"
        }
      ],
      "id": "5efc735516104d0d48f23053"
    }
  ]
}
 

GET get Bootcamp

http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053

To get a single bootcamp


Example request:
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "count": 1,
  "pagination": {},
  "data": [
    {
      "location": {
        "type": "Point",
        "coordinates": [
          -71.3235419,
          42.6497006
        ],
        "formattedAddress": "UMass Lowell University Police, 220, Pawtucket Street, The Acre, Lowell, Middlesex County, Massachusetts, 01854-5141, United States of America",
        "street": "Pawtucket Street",
        "city": "Lowell",
        "zipcode": "01854-5141",
        "country": "US"
      },
      "careers": [
        "Web Development",
        "UI/UX",
        "Mobile Development"
      ],
      "photo": "no-photo.jpeg",
      "housing": false,
      "jobAssistance": true,
      "jobGaurantee": false,
      "acceptGi": true,
      "_id": "5efc735516104d0d48f23053",
      "name": "ModrenTech Bootcamp",
      "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
      "website": "https://moderntech.com",
      "phone": "(222) 222-2222",
      "email": "enroll@moderntech.com",
      "address": "220 Pawtucket St, Lowell, MA 01854",
      "user": "5efc725516104d0d48f23050",
      "createdAt": "2020-07-01T11:28:21.576Z",
      "slug": "modrentech-bootcamp",
      "__v": 0,
      "averageCost": 10000,
      "averageRating": 10,
      "Courses": [
        {
          "_id": "5efc738c16104d0d48f23054",
          "title": "Devworks Bootcamp",
          "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
          "bootcamp": "5efc735516104d0d48f23053"
        }
      ],
      "id": "5efc735516104d0d48f23053"
    }
  ]
}
 

PUT upload photo to a bootcamp

http://localhost:5000/api/v1/bootcamp/5d725a1b7b292f5f8ceff788/photo

To add a photo to a bootcamp

Headers
Content-Type
multipart/form-data
Authorization
Bearer {{TOKEN}}
Body formdata
file
null

Example request:
curl "http://localhost:5000/api/v1/bootcamp/5d725a1b7b292f5f8ceff788/photo" \
  -H 'Content-Type: multipart/form-data' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -X PUT \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
  -F 'file=null' 
Example response:
{
  "status": "success",
  "photo": "photo5d725a1b7b292f5f8ceff788.jpg"
}
 

GET Bootcamps

http://localhost:5000/api/v1/bootcamp/

To get all bootcamps


Example request:
curl "http://localhost:5000/api/v1/bootcamp/" \
  -X GET \
  -b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' 
Example response:
{
  "status": "success",
  "count": 1,
  "pagination": {},
  "data": [
    {
      "location": {
        "type": "Point",
        "coordinates": [
          -71.3235419,
          42.6497006
        ],
        "formattedAddress": "UMass Lowell University Police, 220, Pawtucket Street, The Acre, Lowell, Middlesex County, Massachusetts, 01854-5141, United States of America",
        "street": "Pawtucket Street",
        "city": "Lowell",
        "zipcode": "01854-5141",
        "country": "US"
      },
      "careers": [
        "Web Development",
        "UI/UX",
        "Mobile Development"
      ],
      "photo": "no-photo.jpeg",
      "housing": false,
      "jobAssistance": true,
      "jobGaurantee": false,
      "acceptGi": true,
      "_id": "5efc735516104d0d48f23053",
      "name": "ModrenTech Bootcamp",
      "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX",
      "website": "https://moderntech.com",
      "phone": "(222) 222-2222",
      "email": "enroll@moderntech.com",
      "address": "220 Pawtucket St, Lowell, MA 01854",
      "user": "5efc725516104d0d48f23050",
      "createdAt": "2020-07-01T11:28:21.576Z",
      "slug": "modrentech-bootcamp",
      "__v": 0,
      "averageCost": 10000,
      "averageRating": 10,
      "Courses": [
        {
          "_id": "5efc738c16104d0d48f23054",
          "title": "Devworks Bootcamp",
          "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue",
          "bootcamp": "5efc735516104d0d48f23053"
        },
      ],
      "id": "5efc735516104d0d48f23053"
    }
  ]
}