Coupon

Response DTO representing a coupon with full details, tracking, and timestamps

Fields

    code
    String!
    Required
    Unique coupon code that users enter to redeem the discount
    color
    String!
    Required
    Hex color code for UI display purposes (e.g., "#FF5733")
    createdAt
    DateTime!
    Required
    Timestamp when the coupon was created
    creatorId
    Int
    ID of the admin user who created this coupon
    deletedAt
    DateTime
    Timestamp when the coupon was soft-deleted, if applicable
    description
    String
    Optional descriptive text explaining the coupon's purpose or terms
    discount
    Decimal!
    Required
    Fixed discount amount in the specified currency
    expired
    Boolean!
    Required
    Whether the coupon has expired
    expiresOn
    DateTime
    Expiration date and time for the coupon (UTC)
    forDelivery
    Boolean!
    Required
    Whether this coupon applies to delivery fees
    formattedExpiresOn
    String!
    Required
    Formatted expiration date for display
    id
    Int!
    Required
    Unique identifier for the coupon
    isActive
    Boolean!
    Required
    Whether this coupon is currently active
    maxCouponAmount
    Decimal
    Maximum discount amount that can be applied (caps percentage discounts)
    minOrderAmount
    Decimal
    Minimum order amount required to use this coupon
    percentage
    Boolean!
    Required
    Whether the discount is a percentage (true) or fixed amount (false)
    photo
    String
    Photo URL for the coupon
    products
    [CouponProductInfo!]!
    Required
    List of products the coupon applies to
    times
    Int
    Maximum number of times this coupon can be used across all users
    updatedAt
    DateTime!
    Required
    Timestamp when the coupon was last updated
    usageType
    String
    Usage restriction type (e.g., "once_per_user", "unlimited")
    useLeft
    Int
    Number of uses left for the coupon
    vendorTypeId
    Int
    Optional vendor type restriction - limits coupon to specific vendor categories
    vendors
    [CouponVendorInfo!]!
    Required
    List of vendors the coupon applies to
Built with