json icon

Order cancelled

v0.0.1events

Indicates an order has been canceled

1{
2    "$schema": "http://json-schema.org/draft-07/schema#",
3    "title": "OrderCancelledEvent",
4    "type": "object",
5    "properties": {
6      "orderId": {
7        "type": "string",
8        "format": "uuid",
9        "description": "The unique identifier of the order that was cancelled."
10      },
11      "userId": {
12        "type": "string",
13        "format": "uuid",
14        "description": "The unique identifier of the user who placed the order."
15      },
16      "orderItems": {
17        "type": "array",
18        "description": "A list of items included in the cancelled order, each containing product details and quantities.",
19        "items": {
20          "type": "object",
21          "properties": {
22            "productId": {
23              "type": "string",
24              "format": "uuid",
25              "description": "The unique identifier of the product."
26            },
27            "productName": {
28              "type": "string",
29              "description": "The name of the product."
30            },
31            "quantity": {
32              "type": "integer",
33              "description": "The quantity of the product ordered."
34            },
35            "unitPrice": {
36              "type": "number",
37              "format": "float",
38              "description": "The price per unit of the product."
39            },
40            "totalPrice": {
41              "type": "number",
42              "format": "float",
43              "description": "The total price for this order item (quantity * unit price)."
44            }
45          },
46          "required": ["productId", "productName", "quantity", "unitPrice", "totalPrice"]
47        }
48      },
49      "orderStatus": {
50        "type": "string",
51        "description": "The current status of the order after cancellation.",
52        "enum": ["cancelled"]
53      },
54      "totalAmount": {
55        "type": "number",
56        "format": "float",
57        "description": "The total amount of the order that was cancelled."
58      },
59      "cancellationReason": {
60        "type": ["string", "null"],
61        "description": "The reason for the order cancellation, if provided."
62      },
63      "timestamp": {
64        "type": "string",
65        "format": "date-time",
66        "description": "The date and time when the order was cancelled."
67      }
68    },
69    "required": ["orderId", "userId", "orderItems", "orderStatus", "totalAmount", "timestamp"],
70    "additionalProperties": false
71  }
72  

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions