שִׂיג ושִׂיח | cig.chat icon

שִׂיג ושִׂיח | cig.chat

Interact with the cig.chat messaging platform - 258 operations across 32 resources. Manage subscribers, send messages, configure flows, run the shop, and integrate with WhatsApp, Facebook, Instagram, Telegram, web chat, and more.

Actions258

Shop Discount Code → Create Discount Code

AI-generated

Summary

Create a new shop discount code with specified attributes such as code, type, discount value, usage limits, and validity period.

Inputs

  • Code (required) — The unique discount code string to be created.
  • Type (required) — The type of discount: Percentage, Amount, or Free Shipping.
  • Discount Percentage — Numeric value for percentage discount if type is 'percentage'.
  • Discount Amount — Numeric value for fixed discount amount if type is 'amount'.
  • Once per Order — Boolean indicating if the code can be used only once per order.
  • Minimum Requirement — Type of minimum purchase requirement: none, min_price, or min_qty.
  • Minimum Price — Minimum price needed for the discount to apply when min_require is 'min_price'.
  • Minimum Quantity — Minimum quantity needed for the discount to apply when min_require is 'min_qty'.
  • Has Usage Limit — Boolean to set if there is a maximum usage count for the discount code.
  • Max Usage Count — Maximum number of times the discount code can be used if usage limit is enabled.
  • One per Customer — Boolean indicating if each customer can use the discount code only once.
  • Start Time (required) — Start datetime (Y-m-d H:i:s) when the discount code becomes valid.
  • End Time (required) — End datetime (Y-m-d H:i:s) when the discount code expires.

Output shape

a single created discount code record containing all specified attributes and the server's response data.

All required fields must be provided for successful code creation. Optional fields allow setting constraints and usage limits. The operation returns the created discount code details in the response.

Examples

Example 1: Create a percentage discount code named SAVE10 valid for a specified time range.

Set Code to SAVE10, Type to Percentage, Discount Percentage to 10, set Start Time and End Time accordingly, and optionally configure usage limits.

Links

Discussion