Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microservices-patterns/ftgo-application/llms.txt

Use this file to discover all available pages before exploring further.

The Restaurant Service REST API is available at http://localhost:8084. It maintains the restaurant registry — including each restaurant’s address and menu — that other services (Order Service, Kitchen Service) depend on for order validation and ticket creation.

POST /restaurants

Registers a new restaurant along with its physical address and menu. Returns the system-assigned restaurant ID on success.

Request body

name
string
required
The display name of the restaurant, e.g. "Ajanta".
address
object
required
The physical address of the restaurant.
menu
object
required
The restaurant’s menu, containing one or more items.

Response

id
number
The unique identifier assigned to the newly created restaurant.

Status codes

CodeMeaning
200 OKRestaurant created successfully.

Example

curl -s -X POST http://localhost:8084/restaurants \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ajanta",
    "address": {
      "street1": "1 Main Street",
      "street2": "",
      "city": "Oakland",
      "state": "CA",
      "zip": "94612"
    },
    "menu": {
      "menuItems": [
        { "id": "beef-burger", "name": "Beef Burger", "price": { "amount": "8.99" } }
      ]
    }
  }'

GET /restaurants/

Retrieves a restaurant’s ID and name by its unique identifier.

Path parameters

restaurantId
number
required
The unique ID of the restaurant to retrieve.

Response

id
number
The unique identifier of the restaurant.
name
string
The display name of the restaurant.

Status codes

CodeMeaning
200 OKRestaurant found and returned.
404 Not FoundNo restaurant exists with the given restaurantId.

Example

curl -s http://localhost:8084/restaurants/1

Build docs developers (and LLMs) love