CartCouponEvent
Type: schema
Description
Emitted when a coupon is applied to or removed from a cart. Removing a coupon when none is applied emits nothing.
TypeScript Definition
typescript
CartCouponEvent: {{
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
*/
event: "Coupon Applied" | "Coupon Removed";
/** @description Server-issued event id (ULID). Send it with your client-side copy of this event so both copies dedupe. */
event_id: string;
/** @description The `Cart` the coupon change applies to. */
cart_id: string;
/** @description The coupon code applied or removed. */
coupon_code: string;
};
/**
* CartItem
* @description This Cart Item model captures the attributes of a cart item, including product details, pricing information, subscription details, and other relevant information related to Cart Item.
*/
}OpenAPI Schema
json
{
"title": "CartCouponEvent",
"description": "Emitted when a coupon is applied to or removed from a cart. Removing a coupon when none is applied emits nothing.",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/CartCouponEvent",
"description": "API reference for the CartCouponEvent schema"
},
"required": [
"event",
"event_id",
"cart_id",
"coupon_code"
],
"properties": {
"event": {
"type": "string",
"enum": [
"Coupon Applied",
"Coupon Removed"
]
},
"event_id": {
"description": "Server-issued event id (ULID). Send it with your client-side copy of this event so both copies dedupe.",
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"cart_id": {
"description": "The `Cart` the coupon change applies to.",
"type": "string"
},
"coupon_code": {
"description": "The coupon code applied or removed.",
"type": "string"
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions