Basket API
Internal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkout cleanup.
Service Responsibility & Boundary
Basket API owns transient, customer-scoped shopping BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs and Basket ItemEntityv1.0.0Basket ItemChild entry within a Basket pairing a Catalog book identifier with a positive requested quantity.Ownercommerce-fulfillment-teamOpen docs state within the ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs domain. It exposes authenticated HTTP endpoints for the storefront, serves internal gRPC basket snapshots to 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 during checkout, enriches basket reads with live titles and prices 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, and performs asynchronous post-checkout cleanup with Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs over Kafka.
Service Profile
| Property | Value |
|---|---|
| Bounded Context / Domain | ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs |
| Owner Team | Commerce Fulfillment TeamTeamCommerce Fulfillment TeamStream-Aligned team owning customer shopping baskets, checkout coordination, order lifecycle, and financial saga orchest...Open docs |
| Runtime Style | REST API, gRPC Server/Client, and Async Kafka Consumer/Producer |
| Public / Gateway Exposure | Yes via API Gateway (HTTP) and Internal Only (gRPC) |
| Authentication & Authorization Policy | Microsoft Entra ID JWT via Identity ProviderSystemv1.0.0Identity ProviderExternal identity infrastructure that authenticates BookWorm users and
provides OAuth-compatible identity verification f...Ownerplatform-engineering-teamDiagramOpen docs; customer role with basket read/write scopes; basket owner derived strictly from token |
| Owned Data Store(s) | Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs (Redis key-value store, no SQL database) |
| Key Resilience / Idempotency Pattern | 24-hour message-ID idempotency guard, per-user rate limiting, and dead-letter routing on Basket Dead Letter QueueChannelv1.0.0Basket Dead Letter QueueKafka dead-letter topic owned by the platform team that captures Basket API messages after retry exhaustion or deseriali...Ownerplatform-engineering-teamOpen docs |
Contracts & Data Ownership
Basket API stores only customer ID, book IDs, and positive quantities in Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs. Basket updates replace the entire item collection rather than merging partial changes, and basket records are never used to reconstruct accepted orders.
On read, Basket API batches distinct book IDs into a single gRPC lookup against 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 to attach current titles, regular prices, and sale prices. If Catalog returns no match for a book ID, the item remains in the response without inventing metadata.
Both Basket API and Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs consume Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs on the same Kafka topic. When Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs retries on timeout, both consumers receive the retry.
Sends messages (4)
Quickly find the message you need by searching for the name, type, or summary.Receives messages (6)
Quickly find the message you need by searching for the name, type, or summary.Architecture Visualizations & Specifications
Basket API Context
Loading graph...
Service Interactions
Owned Entities
Attached Resources & Related Docs
- API and contracts indexCustom DocAPI and contracts indexConsolidated index of BookWorm HTTP v1, gRPC, AG-UI, MCP, A2A, and Kafka/Wolverine contracts grouped by service with aut...Ownerplatform-engineering-teamOpen doc — Consolidated HTTP, gRPC, and Kafka contract reference.
- Basket DatabaseContainerv1.0.0Basket DatabaseAuthoritative Redis key-value store owned by the Shopping bounded context for customer-scoped pre-checkout shopping bask...Ownercommerce-fulfillment-teamDiagramOpen docs — Redis key structure and durability characteristics.
- Checkout InteractionDiagramv1.0.0Checkout InteractionEnd-to-end checkout acceptance and independent basket cleanup, order email, and Finance timeout outcomes across Ordering...Ownercommerce-fulfillment-teamOpen diagram — Interaction between Shopping, Ordering, and Finance.
- domains/bookworm/subdomains/shopping/engineering/basket-api-contracts — Basket API contracts and boundaries.
- domains/bookworm/subdomains/shopping/guides/checkout-lifecycle — Pre-order to checkout handoff guide.