Skip to Content
FeaturesDiscounts & Offers

Discounts & Offers

Overview

The Discounts feature lets vendors create promotional discount codes that customers can apply at checkout. Siyahfy supports percentage discounts, fixed amount discounts, and free shipping offers. Each discount code can have conditions such as minimum order value, maximum usage limits, specific products or collections, and date-based validity periods.

How It Works

Discount Types

TypeDescription
PercentageReduces the total by a percentage (e.g., 15% off)
Fixed AmountReduces the total by a fixed currency amount (e.g., Rs. 500 off)
Free ShippingRemoves shipping charges from the order

Discount Conditions

  • Minimum purchase amount — Discount only applies above a threshold
  • Minimum item quantity — Requires a certain number of items in cart
  • Specific products — Restrict discount to certain products
  • Specific collections — Apply only to items in chosen collections
  • Customer eligibility — Limit to specific customers or customer groups
  • Usage limits — Set total uses and per-customer use limits
  • Date range — Schedule discount start and end dates
  • One-per-customer — Prevent a customer from using the same code twice

Key API Endpoints

POST/api/manageDiscountAuth Required

Create a new discount code or update an existing one

GET/api/discount/:id/:storeAuth Required

Get details of a specific discount by ID

GET/api/getAllDiscountsofVendorAuth Required

List all discount codes for a vendor's store with pagination

GET/api/discounts/getActivesAuth Required

Get all currently active (non-expired) discount codes

POST/api/deactivate-storeAuth Required

Deactivate a specific discount code

POST/api/discount-bulk-actionAuth Required

Bulk activate, deactivate, or delete multiple discount codes

POST/api/export-discountsAuth Required

Export discount codes to CSV

Storefront Validation

POST/api/applyDiscount

Validate and apply a discount code to a cart at checkout

Database Tables

TablePurpose
discountsDiscount code definitions — code, type, value, conditions, usage limits, dates, status
ordersTracks which discount code was applied to each order
  • Orders — Discounts are applied during order checkout
  • Storefront — Customers enter discount codes on the checkout page
  • Customers — Some discounts target specific customer segments
  • Marketing — Discount codes are often shared via marketing campaigns