https://espresso-food-delivery-backend-cc3e106e2d34.herokuapp.com/
For information on the Data Transfer Objects (DTOs) used in the requests and responses, check out the DTOs here.
- POST
/register
- Description: Registers a new user with the provided details.
- Request Body:
UserRegisterDto
(Object) - Data Transfer Object containing user registration details. - Responses:
201 Created
if registration is successful.400 Bad Request
with error message if registration fails.
- POST
/login
- Description: Authenticates a user and returns a user identifier upon successful login.
- Request Body:
UserLoginDto
(Object) - Data Transfer Object containing user login credentials. - Responses:
200 OK
with user identifier if login is successful.401 Unauthorized
with error message if login fails.
- GET
/profile/{userId}
- Description: Retrieves the profile details of a specific user.
- Path Parameters:
userId
(UUID) - The unique identifier of the user. - Responses:
200 OK
with user profile details if found.404 Not Found
with error message if user profile is not found.
- POST
/profile/{userId}/location
- Description: Updates the location details for a specific user's profile.
- Path Parameters:
userId
(UUID) - The unique identifier of the user. - Request Body:
UserUpdateLocationDto
(Object) - Data Transfer Object containing new location details. - Responses:
200 OK
if the location is successfully updated.404 Not Found
with error message if the user profile is not found or update fails.
- POST
/orders/{userId}/items
- Adds a food item to the user's order.
- Path:
userId
(UUID as string) - Body:
foodId
(Integer) - Response:
200 OK
with order ID,500 Internal Server Error
with error message.
- POST
/orders/items/{itemId}
- Updates the quantity of an item in the order.
- Path:
itemId
(Integer) - Body: Quantity (Integer)
- Response:
200 OK
with item details,500 Internal Server Error
with error message.
- GET
/orders/{userId}
- Retrieves the user's active order.
- Path:
userId
(UUID as string) - Response:
200 OK
with order details,404 Not Found
with error message.
- GET
/orders/{userId}/all
- Retrieves all orders for the specified user.
- Path:
userId
(UUID as string) - Response:
200 OK
with a list of all orders,404 Not Found
with error message if no orders are found.
- GET
/orders/{userId}/complete
- Completes the user's current order.
- Path:
userId
(UUID as string) - Response:
200 OK
with completion status,500 Internal Server Error
with error message.
- DELETE
/orders/{userId}/current
- Deletes the user's current order.
- Path:
userId
(UUID as string) - Response:
200 OK
with deletion status,500 Internal Server Error
with error message.
- DELETE
/orders/{userId}/{orderId}
- Deletes a specific order for the user.
- Path:
userId
(UUID as string),orderId
(Integer) - Response:
200 OK
with deletion status,500 Internal Server Error
with error message.
- GET
/orders/{userId}/all
- Retrieves all orders for the specified user.
- Path:
userId
(UUID as string) - Response:
200 OK
with a list of all orders,404 Not Found
with error message if no orders are found.
- GET
/foods/{foodId}
- Retrieves details for a specific food item.
- Path:
foodId
(Integer) - Response:
200 OK
with food details,404 Not Found
with error message.
- GET
/foods
- Lists all foods or returns search results based on query.
- Query:
search
(String, optional) - Search term for food items. - Response:
200 OK
with list of foods or search results,404 Not Found
with error message.
-
GET
/foods/categories
- Retrieves foods filtered by category.
- Query:
type
(String, optional) - Category type, defaults to "all". - Response:
200 OK
with foods by category,404 Not Found
with error message.
-
GET
/foods/categories/list
- Retrieves a list of all food categories.
- Response:
200 OK
with list of food categories,404 Not Found
with error message.