Skip to content

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
{
  "description": "Emitted when a coupon is applied to or removed from a cart. Removing a coupon when none is applied emits nothing.",
  "type": "object",
  "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"
    }
  },
  "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"
  ],
  "title": "CartCouponEvent"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: