Conscent.ai Developer Documentation
  • Version 2.0
    • Using Conscent.ai
    • Web SDK
    • Login
    • Logout
    • User Details Drawer
    • Google One Tap
    • Mobile SDK
      • iOS(Swift)
        • In-App Purchases with Conscent
      • Android SDK
      • React Native SDK
      • Google In-App Purchases with Conscent
      • Apple In-App Purchases with Conscent
    • Facebook SSO Integration Guide
    • Landing Page API v 2.0
    • AMP Integration
    • Integrating APIs(v2)
      • Purchase Details
      • User Registered Or Not
      • User Registrations
      • Subscription Plans Details
      • Get User Details
      • Add Subscription If User Registered
      • Update UserDetails
      • Update SubscriptionDetails
      • Get All Transaction Details
    • IAM System API Documentation
  • Version 1.0
    • Getting Started
    • On Board
    • Using Conscent.ai
    • Authentication
    • Web SDK
    • Login
    • Logout
    • Amp Documentation
    • Mobile SDK
      • Android
      • Flutter
      • iOS(Swift)
      • React Native SDK
    • Auto Login
    • Creating External Purchases
    • Landing Page API
  • Login Screen Customization
  • Integrating Client Payment Gateway
  • Integrating with APIs
    • User Details and Subscriptions Information
    • Purchased Subscriptions
    • User and Purchase Details
    • Client Purchases
    • Client Micropayments
    • Client Passes
    • Cancel Active Subscriptions
    • Delete User
  • Events API Docs
    • Different Types of Events
    • SSO Login Flow
  • Discount Coupon
    • Dynamic Coupon API Generation:
  • New Webhooks
    • Meter Banner Webhook
    • Paywall Webhook
    • SignUp Webhook
    • Refund Webhook
    • Purchase Webhook
    • Subscription Landing Page Webhook
    • Popup Webhook
    • User Update Webhook
    • Payment Gateway Webhook
    • Review Page Webhook
    • Transaction Webhook
    • Login Webhook
    • Cancel Subscription Webhook
  • Old Webhooks
    • Sign Up Webhook
    • Login Webhook
    • Subscription Payment Webhook
    • Subscription Cancelled Webhook
    • Pass Payment Webhook
    • Subscription Bundle Payment Webhook
    • Review Subscription Webhook
    • Micro Payment Webhook
    • How to validate Webhooks?
  • Registering The Content
    • Create Content
    • Edit Content
    • View Content
  • Country Code List
  • Supported Currencies and Payment Gateways
    • Stripe Supported Country with Currency
    • Razorpay Supported Country with Currency
    • Paypal Supported Country with Currency
  • Errors
  • Loyalty System
    • Web SDK
    • iOS SDK
    • Android SDK
    • Flutter SDK
    • API from server
Powered by GitBook
On this page
  1. Discount Coupon

Dynamic Coupon API Generation:

This API endpoint facilitates the generation of dynamic discount coupons based on specific templates: AUTO_ALLOCATE and AUTO_ACCEPT flag set during template generation.

PreviousDiscount CouponNextNew Webhooks

Last updated 1 year ago

Basic Auth:

POST {API_URL}/subscription/discount-coupon-template/generate-user-coupon

Enter as username and password respectively.

Request Body

Name
Type
Description

couponName*

String

Unique identifier for the coupon name.

clientId*

String

Unique identifier for the client.

quantity*

Integer

Number of coupons to be generated.

couponCodes *

Array of Strings

Predefined coupon codes provided by the client.

Details of the generated coupons including identifiers and metadata are provided in the response.

{
  "couponName": "Test Dynamic Coupon",
  "clientId": "YOUR_CLIENT_ID",
  "quantity": 10
}
{ "couponName": "Test Dynamic Coupon",
 "clientId": "5f92a62013332e0f667794dc", 
"couponCodes": ["TESTDIWALI500", "fdhfuhiufh", "FUNCHRISTMAS"] }
Rules and Constraints:

Functionality of AUTO_ALLOCATE and AUTO_ACCEPT templates are exclusive:

AUTO_ALLOCATE: Automatic generation in specified quantity.

AUTO_ACCEPT: Generation based on client-provided couponCodes.

The quantity parameter is ignored for AUTO_ACCEPT, and couponCodes for AUTO_ALLOCATE.

couponCodes must be unique and follow format/validation rules of the template.

Quantity Limitation: The quantity of coupons requested in an AUTO_ALLOCATE template cannot exceed the maximum quantity set for that template in the dashboard during template creation. Attempts to generate coupons beyond this limit will result in an error

Error Handling: Error messages and codes for scenarios like invalid template IDs, missing fields, or invalid coupon codes. Specific errors will be returned if the requested quantity exceeds the template's maximum limit.

API-KEY and API-Secret