Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Get basket

Returns the current basket and its item details.

Order Lifecycle
GET/api/v1/baskets

GetBasket retrieves the authenticated customer’s active basket from Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs (GET /basket/api/v1/baskets) and enriches non-empty basket items with live titles and pricing from Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs over gRPC. The caller’s customer identity is resolved from the Microsoft Entra ID access token; no basket identifier parameter is accepted.

Overview

PropertyValue
Bounded ContextShopping
Owner ServiceBasket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs
Protocol / FormatHTTP GET, application/json response
Gateway EndpointGET /basket/api/v1/baskets (service path /api/v1/baskets)
Authentication & AuthorizationMicrosoft Entra ID JWT — customer role plus scopes basket_read, basket_write
Idempotency / ConcurrencyRead-only and naturally idempotent
Rate Limit / CachingGlobal concurrency (100), per-IP fixed-window (30 req/min), and per-user token bucket (30 limit, 20 per 10s, queue 5)
Contract Version1.0.0 (ApiVersions.V1)

Request & Response Contract

Request Parameters

Accepts no path parameters, query parameters, or request body; resolves the customer ID from the authenticated token.

Success Response (200 OK)

NameTypeRequiredConstraintsDescription
idstring | nullYes—Identifier of the customer’s basket
itemsobject[]YesArray (may be empty)Line items currently stored in the basket
items[].idstring | nullYes—Catalog book identifier
items[].quantityinteger | stringYesint32Requested unit quantity
items[].namestring | nullNoNullableBook title enriched from Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs (null when unavailable)
items[].pricenumber | stringNodouble, default 0Regular unit price enriched from Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs
items[].priceSalenumber | string | nullNodouble or nullPromotional sale price enriched from Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs (null when no sale applies)

Behavior & Side Effects

  • Read-time catalog enrichment: Reads basket state from Redis and, when items is non-empty, deduplicates book IDs and enriches items 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.
  • No state mutation: Pure read query with no database writes or integration events.

Error Responses

Status / CodeConditionClient Recovery Action
401 UnauthorizedMissing, expired, or invalid Entra ID bearer tokenRe-authenticate the customer and retry
403 ForbiddenPrincipal lacks the customer role or required basket_read/basket_write scopesRequest a token with the required customer scopes
404 Not FoundNo active basket exists in Redis for the authenticated customerTreat as an empty/uninitialized basket until the customer creates one
429 Too Many RequestsRate limit quota exceeded (Retry-After header included)Wait for the Retry-After duration before retrying

Get basket schema

7 properties
idstring | null
required
itemsarray[object]
required