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

Read the architecture guide →

Get buyer

Returns the Buyer profile selected by identifier, subject to the caller's authorization.

Customer Management
GET/api/v1/buyers/me

GetBuyer 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/buyers/me) to retrieve a buyer’s profile (id, name, and address). Callers with the admin role retrieve the profile specified by the Id query parameter; all other authenticated callers are resolved to the buyer linked to their Microsoft Entra ID NameIdentifier claim.

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 GET, application/json response
Gateway EndpointGET /ordering/api/v1/buyers/me (service path /api/v1/buyers/me)
Authentication & AuthorizationMicrosoft Entra ID JWT — customer or admin role plus scopes ordering_read, ordering_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

Query Parameters

NameTypeRequiredConstraintsDescription
Idstring (uuid)YesValid UUIDBuyer identifier requested by admin callers; ignored for non-admin callers whose buyer ID is resolved from NameIdentifier
Note

Because Id binds as a non-nullable UUID, non-admin clients must still supply a valid UUID query parameter even though the service resolves their own authenticated buyer ID.

Success Response (200 OK)

NameTypeRequiredConstraintsDescription
idstring (uuid)YesValid UUIDUnique identifier of the buyer profile
namestring | nullYesNullableBuyer display name (null when unset)
addressstring | nullYesNullableFormatted shipping address (null when unset)

Behavior & Side Effects

  • Role-scoped resolution: Administrators query by the supplied Id parameter; standard customers always resolve their own profile from their token’s NameIdentifier claim.
  • No state mutation: Pure read query with no database writes or integration events.

Error Responses

Status / CodeConditionClient Recovery Action
400 Bad RequestMissing or malformed Id UUID query parameterSupply a valid UUID in the Id query parameter; do not retry unchanged
401 UnauthorizedMissing, expired, or invalid Entra ID bearer tokenRe-authenticate and retry
403 ForbiddenCaller lacks Ordering API roles or scopesRequest a token with customer or admin role and Ordering scopes
404 Not FoundNo buyer profile exists for the resolved buyer IDPrompt the user to create a buyer profile via Create buyerCommandv1.0.0Create buyerCreates a Buyer profile for the authenticated customer from the supplied address.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs
429 Too Many RequestsRate limit quota exceeded (Retry-After header included)Wait for the Retry-After duration before retrying

Get buyer schema

3 properties

Buyer profile response documented by the Ordering API OpenAPI contract.

idstring<uuid>
required
namestring | null
required
addressstring | null
required