-
Require Authentication: true
-
Request
- Method: GET
- URL: /api/users/:userId
- Header:
- Content-Type:application/json
- Body:
{ "id": 2, "firstName": "jane", "lastName": "Doe", "phoneNumber": 2222222, "profileImageUrl": "https://freeawsbucket.s3.us-west-1.amazonaws.com/user_seeders/pexels-demo2-.jpg", "username": "FakeUser1" }
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{
"user": {
"id": 1,
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"username": "Demo-lition"
}
}
-
Require Authentication: true
-
Request
- Method: GET
- URL: /api/users/
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{
"user": [
{
"id": 1,
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"username": "Demo-lition"
}
]
}
-
Require Authentication: false
-
Request
- Method: POST
- URL: /api/users
- Header:
- Content-Type:application/json
- Body:
{ "email", "username", "hashedPassword", "firstName", "lastName", "profileImageUrl", "phoneNumber", }
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "User":{ "id": ..., "firstName": ..., "lastName": ..., "email": ..., "username": ..., "profileImageUrl": ..., "phoneNumber": ..., } };
-
Require Authentication: true
-
Request
- Method: PUT
- URL: /api/users/:userId
- Header:
- Content-Type:application/json
- Body:
{ "User":{ "id": ..., "firstName": ..., "lastName": ..., "email": ..., "username": ..., "phoneNumber": ..., } };
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "User":{ "id": ..., "firstName": ..., "lastName": ..., "email": ..., "username": ..., "phoneNumber": ..., } };
-
Require Authentication: true
-
Request
- Method: GET
- URL: /api/users/:userId
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "message": "Successfully deleted" }
- Require Authentication: false
- Request
- Method: GET
- URL: /api/coffee
- Body: none
- Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "Coffee":[ "id": 1, "name": "Espresso", "price": 2.5, "description": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" ] }
- Request
- Require Authentication: false
- Request
- Method: GET
- URL: /api/coffee/:coffeeId
- Body: none
- Successful Response - status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "id": 1, "name": "Espresso", "price": 2.5, "description": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" }
- Request
-
Creates and returns a new Item.
-
Require Authentication: true
-
Request
-
Method: POST
-
URL: /api/coffee/:coffeeId
-
Headers:
-
Content-Type: application/json
-
Body:
{ "id": 1, "name": "Espresso", "price": 2.5, "description": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" }
-
-
-
Successful Response
-
Status Code: 201
-
Headers: - Content-Type: application/json - Body:
{ "id": 1, "name": "Espresso", "price": 2.5, "description": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" }
-
- Require Authentication: false
- Request
- Method: GET
- URL: /api/coffee/:coffeeId/reviews
- Body: none
- Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
[ { "id": 1, "coffeeId": 1, "userId": 2, "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z", "User": { "id": 2, "firstName": "jane", "lastName": "Doe", "phoneNumber": 2222222, "username": "FakeUser1" } } ]
- Request
-
Require Authentication: false
- Request
- Method: POST
- URL: /api/coffee/:coffeeId/reviews
- Body:
{ "coffeeId": 1, "userId": 2, "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>" }
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "coffeeId": 1, "userId": 2, "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>" }
- Request
-
Require Authentication: false
-
Request
- Method: GET
- URL: /api/reviews
-
Successful Response
-
status Code:200
-
Header:
-
Content-Type:application/json
-
Body:
[ { "id": 1, "coffeeId": 1, "userId": 2, "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" } ]
-
-
-
Require Authentication: false
-
Request
- Method: GET
- URL: /api/reviews/current
-
Successful Response
-
status Code:200 - Header:
-
Content-Type:application/json
-
Body:
[ { "id": 1, "coffeeId": 1, "userId": 2, "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" } ]
-
-
-
Require Authentication: false
-
Request - Method: put
-
URL: /api/reviews
-
Request
-
Body:
{ "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>" }
-
-
Successful Response
-
status Code:200
-
Header:
- Content-Type:application/json
-
Body:
{ "id": 1, "coffeeId": 1, "userId": 2, "title": "Heavenly Espresso Delight!", "rating": 5, "review": " <=== body ===>", "createdAt": "2023-06-23T17:09:39.000Z", "updatedAt": "2023-06-23T17:09:39.000Z" }
-
-
-
Require Authentication: false
-
Request
- Method: DELETE
- URL: /api/reviews/:reviewId
-
Successful Response
-
status Code:200
-
Header:
- Content-Type:application/json
-
Body:
{ "message": "Review Successfully Deleted" }
-
-
-
Require Authentication: false
-
Request
- Method: GET
- URL: /api/items
-
Successful Response
-
status Code:200
-
Header:
- Content-Type:application/json
-
Body:
{ "Items":[ { { "id": 36, "cartId": 1, "coffeeId": 1, "instructionId": null, "quantity": 1, "createdAt": "2023-07-04T09:57:44.218Z", "updatedAt": "2023-07-04T09:57:44.218Z" }, } ] }
-
-
-
Require Authentication: false
-
Request
- Method: GET
- URL: /api/items/:itemId
-
Successful Response
-
status Code:200
-
Header:
- Content-Type:application/json
-
Body:
{ "oneItem": [ { "id": 38, "cartId": 1, "coffeeId": 2, "instructionId": null, "quantity": 5, "createdAt": "2023-07-04T09:57:44.218Z", "updatedAt": "2023-07-04T09:57:44.218Z" } ] }
-
-
-
Require Authentication: false
-
Request
-
Method: PUT
-
URL: /api/items/:itemId
-
Header:
- Content-Type:application/json
-
Body:
{ "id": 38, "cartId": 1, "coffeeId": 2, "instructionId": null, "quantity": 5 }
-
-
Successful Response
-
status Code:200
-
Header:
- Content-Type:application/json
-
Body:
{ "oneItem": [ { "id": 38, "cartId": 1, "coffeeId": 2, "instructionId": null, "quantity": 5, "createdAt": "2023-07-04T09:57:44.218Z", "updatedAt": "2023-07-04T09:57:44.218Z" } ] }
-
-
-
Require Authentication: false
-
Request
- Method: DELETE
- URL: /api/items/:itemId
-
Successful Response
-
status Code:200
-
Header:
- Content-Type:application/json
-
Body:
{ "message": "Review Successfully Deleted" }
-
-
-
Require Authentication: false
- Request
- Method: DELETE
- URL: /api/items/:itemId
- Successful Response
- Header:
- Content-Type:application/json
- Body:
{ "additions": [ ["Extra Large", 29], ["2% Milk", 30], ["Very Hot", 31], ["", 32] ], "custom": ["85555555555555555555555555555555555", 8] }
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "Item":{ "id":8, "Coffee":{}, "Instruction":[{…}], "cartId":1, "coffeeId":8, "instructionId":null, "quantity":1, "createdAt":"2023-08-07T00:57:47.000Z", "updatedAt":"2023-08-07T00:57:47.000Z", } }
- Request
-
Require Authentication: true
-
Request
- Method: GET
- URL: /api/cart/
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "ShoppingCart": [ { "id": 1, "userId": 1, "createdAt": "2023-08-07T00:57:47.000Z", "updatedAt": "2023-08-07T00:57:47.000Z" }, { "id": 2, "userId": 2, "createdAt": "2023-08-07T00:57:47.000Z", "updatedAt": "2023-08-07T00:57:47.000Z" }, { "id": 4, "userId": 5, "createdAt": "2023-08-07T15:18:23.382Z", "updatedAt": "2023-08-07T15:18:23.382Z" } ] }
-
Require Authentication: true
-
Request
- Method: GET
- URL: /api/cart/current
-
Successful Response
- status Code:200
- Header:
- Content-Type:application/json
- Body:
{ "UserCart": [ { "id": 1, "userId": 1, "createdAt": "2023-08-07T00:57:47.000Z", "updatedAt": "2023-08-07T00:57:47.000Z", "Items": [ { "id": 8, "cartId": 1, "coffeeId": 8, "instructionId": null, "quantity": 1, "createdAt": "2023-08-07T00:57:47.000Z", "updatedAt": "2023-08-07T00:57:47.000Z", "Coffee": { "id": 8, "name": "Affogato", "price": 5, "description": " Indulge in our heavenly Affogato - a delightful union of rich, smooth espresso and velvety vanilla gelato. A symphony of flavors awaits as a single shot of our freshly brewed espresso is poured over a generous scoop of luscious, artisanal vanilla gelato. Watch as the steam rises, mingling with the cold creaminess of the gelato, creating a tantalizing dance of temperature and texture. ", "default": "Small-Whole Mlik-Cold-1/3 Decaf Espresso Roast", "createdAt": "2023-08-07T00:57:47.000Z", "updatedAt": "2023-08-07T00:57:47.000Z" }, "Instruction": [] } ] } ] }
```