Get order
Returns Order details, including the recorded item quantities and prices.
/api/v1/orders/{id}GetOrder queries Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle,
creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs (GET /ordering/api/v1/orders/{id}) to retrieve a single order’s header metadata, purchase-time unit prices, quantities, and book display names. Standard customers can retrieve only their own orders, while administrators (admin role) can retrieve any order; nonexistent and out-of-scope orders both return 404 Not Found.
Overview
| Property | Value |
|---|---|
| Bounded Context | Ordering |
| Owner Service | Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs |
| Protocol / Format | HTTP GET, application/json response |
| Gateway Endpoint | GET /ordering/api/v1/orders/{id} (service path /api/v1/orders/{id}) |
| Authentication & Authorization | Microsoft Entra ID JWT — customer or admin role plus scopes ordering_read, ordering_write |
| Idempotency / Concurrency | Read-only and naturally idempotent |
| Rate Limit / Caching | Global concurrency (100), per-IP fixed-window (30 req/min), and per-user token bucket (30 limit, 20 per 10s, queue 5) |
| Contract Version | 1.0.0 (ApiVersions.V1) |
Request & Response Contract
Path Parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string (uuid) | Yes | Valid UUID | Unique identifier of the order to retrieve |
Success Response (200 OK)
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string (uuid) | Yes | Valid UUID | Unique identifier of the order |
date | string (date-time) | Yes | ISO 8601 UTC timestamp | UTC timestamp when the order was placed |
total | number | Yes | Decimal currency amount | Total order amount computed from recorded item prices and quantities |
status | string | Yes | Enum: New, Cancelled, Completed | Current lifecycle status of the order |
items | object[] | Yes | Array | Line items recorded at checkout |
items[].id | string (uuid) | Yes | Valid UUID | Catalog book identifier |
items[].quantity | integer | Yes | > 0 | Purchased unit quantity |
items[].price | number | Yes | Decimal currency amount | Unit price locked at checkout (does not change if Catalog prices update later) |
items[].name | string | null | No | Nullable | Book title enriched via Get books over gRPCQueryv1.0.0Get books over gRPCReturns multiple Catalog books by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs (null if unavailable) |
Behavior & Side Effects
- Catalog enrichment: Reads recorded order items from PostgreSQL and enriches
items[].namevia Get books over gRPCQueryv1.0.0Get books over gRPCReturns multiple Catalog books by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs when items exist. - No state mutation: Pure read query with no database writes or integration events.
Error Responses
| Status / Code | Condition | Client Recovery Action |
|---|---|---|
401 Unauthorized | Missing, expired, or invalid Entra ID bearer token | Re-authenticate and retry |
403 Forbidden | Caller lacks Ordering API roles or scopes | Request a token with customer or admin role and Ordering scopes |
404 Not Found | Order does not exist, is soft-deleted, or belongs to another buyer outside the caller’s role scope | Display a not-found state; do not assume whether the ID belongs to another customer |
429 Too Many Requests | Rate limit quota exceeded (Retry-After header included) | Wait for the Retry-After duration before retrying |
Related Documentation
- Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs — Service overview, persistence, and endpoints.
- OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs — Order entity model.
- List ordersQueryv1.0.0List ordersReturns Orders with pagination and optional status and Buyer filters.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Paginated and filterable order summary listing.
- Get books over gRPCQueryv1.0.0Get books over gRPCReturns multiple Catalog books by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs — Catalog API gRPC query used to enrich line-item names.
- Cancel orderCommandv1.0.0Cancel orderMarks an existing Order as Cancelled when its current status is New.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Transition an order to
Cancelled. - Complete orderCommandv1.0.0Complete orderMarks an existing Order as Completed when its current status is New.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Transition an order to
Completed.
Get order schema
Order detail response documented by the Ordering API OpenAPI contract.
New Cancelled Completed