command

Cancel Order

Command to cancel an existing order.

Command
POST/orders/{orderId}/cancel

Overview

CancelOrder is handled by the Order ServiceOrder ServiceServicev1.0.0The system of record for orders. Creates and cancels orders, serves order lookups, and publishes events as orders move t...Publishesorder-created, order-completed +1Subscribescreate-order, cancel-order +1APIsAsyncAPIOwnerordering-platformMapRepoView docs. It cancels an order that has not yet been completed — releasing any reservations and voiding the payment authorization where needed. On success the Order Service publishes an Order CancelledOrder CancelledEventv1.0.0Published when an order has been cancelled. Ownerordering-platformSchemaMapView docs event.

Architecture diagram

Schema

Event-driven architecture documentation: Acme Inc

JSON Schema

2 properties

Command to cancel an existing order

orderIdstring<uuid>
required

Identifier of the order to cancel

reasonstring
required

Why the order is being cancelled

Allowed values: CUSTOMER_REQUESTED PAYMENT_FAILED OUT_OF_STOCK FRAUD