Loyalty Points Earned
Published when a customer earns loyalty points for a completed order.
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "title": "LoyaltyPointsEarned",
4 "description": "Published when a customer earns loyalty points for a completed order",
5 "type": "object",
6 "properties": {
7 "customerId": { "type": "string", "format": "uuid" },
8 "orderId": { "type": "string", "format": "uuid" },
9 "pointsEarned": { "type": "integer", "minimum": 1 },
10 "newBalance": { "type": "integer", "minimum": 0 },
11 "tier": { "type": "string", "enum": ["bronze", "silver", "gold"] },
12 "earnedAt": { "type": "string", "format": "date-time" }
13 },
14 "required": ["customerId", "orderId", "pointsEarned", "newBalance", "earnedAt"]
15}
16