placeOrder

@Post(value = "place")
open override fun placeOrder(@Body request: PlaceOrderRequest): HttpResponse<PlaceOrderResponse>

Handles POST orders/place.

Validates input data and delegates order placement to the application layer. Supports three order types: Delivery, Takeaway, and DineIn.

Response mapping:

  • 200 OK when order is placed successfully

  • 400 Bad Request when payload validation fails or date/items are invalid

Return

An HTTP response containing the created order DTO or an error status.

Parameters

request

Place order payload containing order type and details.