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

Read the architecture guide →

Delete order

Soft-deletes an Order by its identifier without changing its business status.

Order Lifecycle
DELETE/api/v1/orders/{id}

DeleteOrder soft-deletes an OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs in 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 (DELETE /ordering/api/v1/orders/{id}) while leaving its business status unchanged. Access is restricted to callers holding the Microsoft Entra ID admin role.

Overview

PropertyValue
Bounded ContextOrdering
Owner ServiceOrder 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 / FormatHTTP DELETE, path parameter only, empty response (204 No Content)
Gateway EndpointDELETE /ordering/api/v1/orders/{id} (service path /api/v1/orders/{id})
Authentication & AuthorizationMicrosoft Entra ID JWT — admin policy (role admin plus scopes ordering_read, ordering_write)
Idempotency / ConcurrencyNot idempotent across retries; repeat calls return 404 Not Found; no x-request-id header is required
Rate Limit / CachingGlobal concurrency (100), per-IP fixed-window (30 req/min), and per-user token bucket (30 burst, 20 per 10s, queue 5)
Contract Version1.0.0 (ApiVersions.V1)

Request & Response Contract

Path Parameters

Accepts no request body and requires no x-request-id header.

NameTypeRequiredConstraintsDescription
idstring (uuid)YesPath parameter; valid UUIDUnique identifier of the order to soft-delete

Success Response (204 No Content)

Empty response body confirms the order was soft-deleted.

Behavior & Side Effects

  • Soft-delete without status transition: Sets isDeleted = true without changing the order’s status (New, Completed, or Cancelled).
  • Global query filter: Soft-deleted orders are hidden from standard read queries and subsequent DELETE calls (404 Not Found).
  • No events emitted: Raises no domain events and publishes no Kafka integration events. To cancel an active order and notify downstream workflows, use Cancel orderCommandv1.0.0Cancel orderMarks an existing Order as Cancelled when its current status is New.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs.

Error Responses

Status / CodeConditionClient Recovery Action
400 Bad RequestPath parameter {id} is not a valid UUIDSupply a valid UUID; do not retry unchanged
401 UnauthorizedMissing, expired, or invalid Entra ID bearer tokenAcquire a fresh Entra ID access token and retry
403 ForbiddenCaller lacks the admin role or ordering_read/ordering_write scopesAuthenticate with an admin token that includes the required scopes
404 Not FoundOrder does not exist or was already soft-deletedVerify the order identifier; treat as already soft-deleted if retrying a prior call
429 Too Many RequestsRate limit quota exceeded (Retry-After header included)Wait for the Retry-After interval before retrying
500 Internal Server ErrorUnhandled database failureRetry with backoff and inspect service logs

Delete order schema

0 properties

Path identifier for the Order to soft-delete. The operation has no request body.

Schema does not contain any properties.