CreateVendorCouponInput

Create a coupon owned by the calling vendor. The owner is taken from the caller's own credentials, and the coupon is valid on their storefront only.

Fields

    code
    String!
    Required
    Code customers type at checkout. Must be unique across the platform.
    color
    String!
    Required
    Hex colour for UI display (e.g. "#FF5733").
    description
    String
    Terms or explanation shown with the coupon. Optional.
    discount
    Decimal!
    Required

    Percentage when percentage is true, otherwise a fixed amount.

    Never negative: the order paths subtract this, so a negative value would increase what the customer pays.

    expiresOn
    DateTime
    When the coupon stops working (UTC). Omit for a coupon that never expires.
    forDelivery
    Boolean!
    Required
    Whether the discount applies to the delivery fee.
    isActive
    Boolean!
    Required
    Whether the coupon can be redeemed straight away.
    maxCouponAmount
    Decimal
    Caps a percentage discount. Ignored for fixed amounts.
    minOrderAmount
    Decimal
    Smallest order the coupon applies to, in the vendor's currency. Omit for no minimum.
    percentage
    Boolean!
    Required

    Whether discount is a percentage rather than a fixed amount.

    productIds
    [Int!]
    Required
    Restrict to specific products. All of the vendor's products when empty.
    times
    Int
    Total redemptions allowed across all customers.
    vendorLocationIds
    [Int!]
    Required
    Restrict to specific locations. Valid at all of the vendor's locations when omitted or empty.
Built with