command

Add Item To Cart

Command to add an item to a shopping cart.

Command
POST/carts/{cartId}/items

Overview

AddItemToCart is handled 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. It adds an item (or increases its quantity) in the cart and persists the change to the Cart DatabaseCart DatabaseContainerv1.0.0PostgreSQL database that is the system of record for shopping carts and their items.MapView docs.

Architecture diagram

Schema

Event-driven architecture documentation: Acme Inc

JSON Schema

3 properties

Command to add an item to a shopping cart

cartIdstring<uuid>
required

Unique identifier of the cart

productIdstring<uuid>
required

Identifier of the product to add

quantityinteger
required

Number of units to add

Minimum: 1