command

Create Product

Command to add a new product to the catalog.

Command
POST/products

Overview

CreateProduct is handled by the Product APIProduct APIServicev1.0.0The public-facing API for the product catalog. Handles commands to create, update and delete products, serves product re...Subscribescreate-product, update-product +2APIsOpenAPIOwnerproduct-platformMapRepoView docs. It validates the incoming product, writes it to the Product DatabaseProduct DatabaseContainerv1.0.0PostgreSQL database that is the system of record for all product data.MapView docs, and on success publishes a Product CreatedProduct CreatedEventv1.0.0Published when a new product has been added to the catalog. Ownerproduct-platformSchemaMapView docs event.

Architecture diagram

Schema

Event-driven architecture documentation: Acme Inc

JSON Schema

7 properties

Command to add a new product to the catalog

skustring
required

Stock keeping unit — must be unique

namestring
required

Display name of the product

Min length: 1
descriptionstring

Long-form product description

priceinteger
required

Price in minor units (e.g. cents)

Minimum: 0
currencystring
required

ISO 4217 currency code

Match pattern: ^[A-Z]{3}$
categorystring

Category the product belongs to

statusstring

Initial lifecycle status — defaults to DRAFT

Allowed values: DRAFT ACTIVE ARCHIVED