json icon

Discount Calculated

v1.0.0events

Published when a discount has been calculated for a cart.

1{
2  "$schema": "http://json-schema.org/draft-07/schema#",
3  "title": "DiscountCalculated",
4  "description": "Emitted when a discount has been calculated for a cart",
5  "type": "object",
6  "properties": {
7    "eventId": {
8      "type": "string",
9      "format": "uuid"
10    },
11    "occurredAt": {
12      "type": "string",
13      "format": "date-time"
14    },
15    "cartId": {
16      "type": "string",
17      "format": "uuid"
18    },
19    "discount": {
20      "description": "Total discount applied, in minor units (e.g. cents)",
21      "type": "integer",
22      "minimum": 0
23    },
24    "currency": {
25      "type": "string",
26      "pattern": "^[A-Z]{3}$"
27    },
28    "appliedPromotions": {
29      "description": "Identifiers of the promotions that were applied",
30      "type": "array",
31      "items": {
32        "type": "string"
33      }
34    }
35  },
36  "required": ["eventId", "occurredAt", "cartId", "discount", "currency"]
37}
38

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions