Once the application is running, you can interact with the services through the API Gateway. Note that you must replace 8080 with the actual port assigned to the API Gateway during startup.
Common tasks include creating customers, creating orders, checking order status, and querying order history.
# 1. Create a customer
curl -X POST --header "Content-Type: application/json" -d '{
"creditLimit": {
"amount": 5
},
"name": "Jane Doe"
}' http://localhost:8080/customers
# 2. Create an order
curl -X POST --header "Content-Type: application/json" -d '{
"customerId": 1,
"orderTotal": {
"amount": 4
}
}' http://localhost:8080/orders
# 3. Check order status
curl -X GET http://localhost:8080/orders/1
# 4. Check customer order history (CQRS view)
curl -X GET --header "Accept: */*" "http://localhost:8080/customers/1/orderhistory"