customer-orders-bff/docs/api/customer-order-workflows.md
2026-03-31 16:30:26 -06:00

30 lines
1.2 KiB
Markdown

# Customer Order Workflow API
## Purpose
This BFF exposes customer-facing order submission, status, detail, and history workflows over REST while delegating orchestration to `operations-service`.
## Endpoints
- `GET /api/customer/orders/status?contextId=<value>`
- Returns the current customer order status snapshot.
- `GET /api/customer/orders/history?contextId=<value>`
- Returns the recent customer order history snapshot.
- `GET /api/customer/orders/{orderId}?contextId=<value>`
- Returns the current detail projection for a single order within the active customer context.
- `POST /api/customer/orders`
- Submits a customer order snapshot for processing.
## Upstream Dependency
- Base address configuration: `OperationsService:BaseAddress`
- Default runtime target: `http://operations-service:8080`
- Internal upstream routes:
- `GET /internal/operations/customer/status`
- `POST /internal/operations/orders`
## Notes
- Customer order submission currently maps `ItemIds.Count` into the upstream restaurant order workflow because the internal service contract still accepts aggregate item counts.
- Correlation IDs are preserved through Thalos session checks and operations-service calls.