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

Read the architecture guide →

Delete basket

Deletes the current basket.

Order Lifecycle
DELETE/api/v1/baskets

DeleteBasket removes the authenticated customer’s active BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs from Redis in 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 (DELETE /basket/api/v1/baskets) and returns 204 No Content. This endpoint handles customer-initiated deletion only; post-checkout basket cleanup runs asynchronously over Kafka via Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs.

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 DELETE, empty request and response (204 No Content)
Gateway EndpointDELETE /basket/api/v1/baskets (service path /api/v1/baskets)
Authentication & AuthorizationMicrosoft Entra ID JWT — customer role plus scopes basket_read, basket_write
Idempotency / ConcurrencyNot idempotent across retries; repeat calls return 404 Not Found
Rate Limit / CachingGlobal concurrency (100), per-IP fixed-window (30 req/min), and per-user token bucket (30 tokens, +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.

Success Response (204 No Content)

Empty response body confirms the basket was deleted.

Behavior & Side Effects

Note

OpenAPI metadata declares 404 Not Found as application/problem+json, whereas runtime responses return application/json with { "detail": "The requested resource was not found." }.

Error Responses

Status / CodeConditionClient Recovery Action
401 UnauthorizedMissing, expired, or invalid Entra ID bearer tokenAcquire a valid Entra ID access token and retry
403 ForbiddenValid token missing the customer role or basket_read/basket_write scopesRequest a token with the required role and scopes
404 Not FoundNo active basket exists in Redis for the authenticated customerTreat the basket as already cleared or refresh client state; do not retry unchanged
429 Too Many RequestsRate limit quota exceeded (Retry-After header included)Wait for the Retry-After interval before retrying
500 Internal Server ErrorUnexpected Redis or server failure (traceId included)Retry with exponential backoff; inspect service logs using traceId

Delete basket schema

0 properties

The OpenAPI operation defines no request body or parameters.

Additional properties: not allowed

Schema does not contain any properties.