command

Calculate Discount

Command to calculate the discount that applies to a cart.

Command
POST/discounts/calculate

Overview

CalculateDiscount is handled by the Promotion ServicePromotion ServiceServicev1.0.0Evaluates promotion rules and calculates the discount that applies to a cart. Receives discount requests and publishes t...Publishesdiscount-calculatedSubscribescalculate-discountOwnershopping-platformMapRepoView docs. It is sent by the Cart APICart APIServicev1.0.0The public-facing API for shopping carts. Handles commands to add and remove items and to check out, and publishes an ev...Publishescart-checked-out, calculate-discountSubscribesadd-item-to-cart, remove-item-from-cart +1APIsOpenAPIOwnershopping-platformMapRepoView docs when pricing a cart. The service evaluates the applicable promotion rules and returns the discount, also publishing a Discount CalculatedDiscount CalculatedEventv1.0.0Published when a discount has been calculated for a cart. Ownershopping-platformSchemaMapView docs event.

Architecture diagram

Schema

Event-driven architecture documentation: Acme Inc

JSON Schema

9 properties

Command to calculate the discount for a cart, and the discount returned

requestobject
required
responseobject
required