Create coupon series

This API allows you to create a new coupon series for the org.

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Access group resource: Write access to coupon group resource

Resource information

URI/v2/coupon/series
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNo

API endpoint example

https://eucrm.cc.capillarytech.com/v2/coupon/series

📘

Daily Limit on API Calls

You can make as many API calls as you need to create coupon series each day. But, it is important to be careful and balanced in how many calls you make at once to avoid overloading the system.

If limits are set for coupon series in the system, these limits will acts as an restriction for creating the number of coupon series per day.

Body parameter

ParameterData TypeDescription
CouponSeriesV2ObjectObject containing the coupon series details.
customPropertyMapObjectAn object containing a collection of keys that represents unique property names and each value represents the corresponding property's value.
customPropertyMap.key1StringCustom field of the coupon series, providing additional information about the coupon.
customPropertyMap.key2StringCustom field of the coupon series, providing additional information about the coupon.
standard_terms_and_conditionsStringCustom field in the coupon series that provides information about the terms and conditions.
descriptionStringBrief description of the coupon series.
discountCodeStringThe code given for the coupon as the POS identifier.
validTillDateStringValidity of the card series in UTC timestamp. Format: YYYY-MM-DDTHH:MM:SS+/-(time-zone).
expiryStrategyValueIntegerSpecifies the duration a coupon remains valid based on the expiryStrategyType.

For expiryStrategyType: "SERIES_EXPIRY", expiryStrategyValue is always 1, which defines the coupon expires based on the rules defined for its series.

For expiryStrategyType: "DAYS", and expiryStrategyValue: "5", specifies that coupon will be valid till 5 days of issuance

For expiryStrategyType: "MONTHS_END", and expiryStrategyValue: "10" specifies that the coupon will be valid for 10 months of issuance.
maxCreateIntegerMaximum number of coupons that can be created.
maxRedeemIntegerMaximum number of coupons that can be redeemed.
anyUserBooleanIndicates if any user can use the offer.
sameUserMultipleRedeemBooleanIndicates if the same user can redeem multiple times.
isReferralExistingUsersAllowedBooleanIndicates if the referral is allowed for existing users.
isMultipleUseAllowedBooleanIndicates if multiple uses of the offer are allowed.
isValidWithDiscountedItemBooleanIndicates if the offer is valid with discounted items.
smsTemplateStringTemplate for the SMS that is sent to users.
isSMSDisabledBooleanIndicates if SMS is disabled.
infoStringAdditional information about the coupon.
isMultipleVouchersPerUserAllowedBooleanIndicates if multiple vouchers per user are allowed.
doNotResendExistingVoucherBooleanindicates not to resend existing vouchers.
mutualExclusiveSeriesIdsStringAllows you to specify a list of offer IDs that are mutually exclusive to the current offer. If a customer already has a coupon from any of the offer IDs in this list, they will not be eligible to receive a coupon from the current series
maxVouchersPerUserIntegerMaximum number of vouchers allowed per user.
minDaysBetweenVouchersIntegerMinimum days between issuance of vouchers.
discountValueIntegerDiscount value of the coupon.
redemptionRangeStringDefines the specific days, weekdays, and hours during which the coupon can be redeemed.
minBillAmountIntegerMinimum bill amount required to use the coupon.
maxBillAmountIntegerMaximum bill amount allowed for coupon redemption.
maxRedemptionsInSeriesPerUserIntegerMaximum redemptions in the series per user.
minDaysBetweenRedemptionIntegerMinimum days required between redemptions.
redemptionValidFromStringDate from which redemption is valid.
productInfoArrayInformation about the products on which the coupon can be applied.
productInfo.productTypeEnumType of the product. Supported values: SKU, CATEGORY, BRAND.
productInfo.productIdsArrayIDs of product.
redemptionOrgEntityDetailsArrayDetails about the organization entities where the coupon can be redeemed.
redemptionOrgEntityTypeEnumType of redemption organization entity. Supported values: CONCEPT, TILL, ZONE, STORE.
orgEntityIdIntegerID of the organization entity.
targetUserDetailsObjectDetails of the criteria that the customer must meet to redeem the coupon.
validMaxUserTransactionLimitIntegerNumber of transactions required by the customer to redeem the coupon.
validUserRegistrationStartTimeIntegerCustomer can redeem the coupon only if their registration date is after the specified date.
validUserRegistrationEndTimeIntegerCustomer can redeem the coupon only if their registration date is within the specified date.
redemptionValidAfterDaysIntegerNumber of days after which the redemption becomes valid.
alphaNumericBooleanIndicates if the code is alphanumeric.
randomCodeLengthIntegerLength of the random code for the coupon.
resendMessageEnabledBooleanIndicates if the resend message feature is enabled.
clientHandlingTypeStringMethod using which the coupons should be generated. Supported values: DISC_CODE (generate coupon codes automatically), GENERIC (provide a common coupon code), DISC_CODE_PIN (Upload existing coupon codes).
genericCodeStringGeneric code of the coupon.
Note:Only required if the clientHandlingType is set to GENERIC.
expiryStrategyTypeEnumDefines the method for coupon expiry.
Supported values: SERIES_EXPIRY(defines the coupon expires based on the rules defined for its series), MONTHS_END(defines the number of months from issuance until the coupon expires.), DAYS(defines the number of days from issuance until the coupon expires).
discountTypeEnumSpecifies the type of discount provided by the coupon. Supported values: ABS(a fixed amount is discounted), PERC(a percentage of the total amount is discounted).
 {
    "CouponSeriesV2": {
        "customPropertyMap": {
            "milestone": "custom property 1",
            "trackerid": "custom property 2",
            "standard_terms_and_conditions" : "terms and condtion"
        },
        "description": "DIWALI 100% OFF",
        "discountCode": "XYZ123",
        "validTillDate": "2029-05-10T00:00:00+05:30",
        "expiryStrategyValue": 1,
        "maxCreate": -1,
        "maxRedeem": -1,
        "anyUser": false,
        "sameUserMultipleRedeem": false,
        "isReferralExistingUsersAllowed": false,
        "isMultipleUseAllowed": false,
        "isValidWithDiscountedItem": true,
       "smsTemplate": "Hi  {{first_name}} {{last_name}} your voucher code {{voucher}}is valid {{valid_days_from_create}}. {{fullname}} {{offer_name}}",
        "isSMSDisabled": false,
        "info": "Evil coupon",
        "isMultipleVouchersPerUserAllowed": true,
        "doNotResendExistingVoucher": true,
        "mutualExclusiveSeriesIds": "[10]",
        "maxVouchersPerUser": 11,
        "minDaysBetweenVouchers": 23,
        "discountValue": 500,
        "redemptionRange": "{\"dom\" : [1], \"dow\": [1], \"hours\": [1]}",
        "minBillAmount": 100,
        "maxBillAmount": 20000,
        "maxRedemptionsInSeriesPerUser": 122,
        "minDaysBetweenRedemption": 962,
        "redemptionValidFrom": "2024-05-18T00:00:00+05:30",
        "productInfo": [
            {
                "productType": "SKU",
                "productIds": [
                    30,
                    40
                ]
            },
            {
                "productType": "CATEGORY",
                "productIds": [
                    50,
                    60
                ]
            },
            {
                "productType": "BRAND",
                "productIds": [
                    10,
                    20
                ]
            }
        ],
        "redemptionOrgEntityDetails": [
            {
                "redemptionOrgEntityType": "CONCEPT",
                "orgEntityId": 10
            },
            {
                "redemptionOrgEntityType": "TILL",
                "orgEntityId": 20
            },
            {
                "redemptionOrgEntityType": "ZONE",
                "orgEntityId": 30
            },
            {
                "redemptionOrgEntityType": "STORE",
                "orgEntityId": 40
            }
        ],
        "targetUserDetails": {
            "validMaxUserTransactionLimit": 1,
            "validUserRegistrationStartTime": 0,
            "validUserRegistrationEndTime": 10000
        },
        "redemptionValidAfterDays": 22,
        "alphaNumeric": true,
        "randomCodeLength": 10,
        "resendMessageEnabled": true,
        "clientHandlingType": "DISC_CODE",
        "expiryStrategyType": "SERIES_EXPIRY",
        "discountType": "ABS"
    }
}

Response parameter

ParameterDatatypeDescription
customPropertyMapObjectAn object containing a collection of keys that represents unique property names and each value represents the corresponding property's value.
standard_terms_and_conditionsstringCustom field in the coupon series that provides information about the terms and conditions.
idintegerUnique identifier of the coupon series
orgIdintegerOrganization ID associated with the coupon series
descriptionstringDescription of the coupon series
discountCodestringThe code given for the coupon as the POS identifier that was created during the creation of coupon series.
validTillDatestringValidity of the card series in UTC timestamp. Format: YYYY-MM-DDTHH:MM:SS+/-(time-zone).
validDaysFromCreationintegerNumber of days the coupon is valid from creation
expiryStrategyValueintegerSpecifies the duration a coupon remains valid based on the expiryStrategyType.

For expiryStrategyType: "SERIES_EXPIRY", expiryStrategyValue is always 1, which defines the coupon expires based on the rules defined for its series.

For expiryStrategyType: "DAYS", and expiryStrategyValue: "5", specifies that coupon will be valid till 5 days of issuance

For expiryStrategyType: "MONTHS_END", and expiryStrategyValue: "10" specifies that the coupon will be valid for 10 months of issuance.
maxCreateintegerMaximum number of coupons that can be created
maxRedeemintegerMaximum number of coupons that can be redeemed.
isTransferrablebooleanIndicates if the coupon is transferable
anyUserbooleanIndicates if any user can use the offer.
sameUserMultipleRedeembooleanIndicates if the same user can redeem multiple times.
isReferralExistingUsersAllowedbooleanIndicates if the referral is allowed for existing users.
isMultipleUseAllowedbooleanIndicates if multiple uses of the offer are allowed.
isValidationRequiredbooleanIndicates if validation is required for the coupon
isValidWithDiscountedItembooleanIndicates if the offer is valid with discounted items.
createdByintegerID of the user who created the coupon series
numIssuedintegerNumber of coupons issued from this series
numRedeemedintegerNumber of coupons redeemed from this series
createdOnstringDate and time when the coupon series was created.
lastUsedstringDate and time when the coupon was last used
seriesCodestringCode for the coupon series
smsTemplatestringTemplate for the SMS that is sent to users.
isSMSDisabledbooleanIndicates if SMS is disabled.
infostringAdditional information about the coupon
isMultipleVouchersPerUserAllowedbooleanIndicates if multiple vouchers per user are allowed
doNotResendExistingVoucherbooleanIndicates not to resend existing vouchers.
mutualExclusiveSeriesIdsstringAllows you to specify a list of offer IDs that are mutually exclusive to the current offer. If a customer already has a coupon from any of the offer IDs in this list, they will not be eligible to receive a coupon from the current series.
storeIdsJsonstringIDs of stores where the coupon is valid.
isDvsEnabledbooleanIndicates if DVS (Dynamic Voucher System) is enabled
dvsExpiryDatestringExpiry date for DVS.
priorityintegerPriority level of the offer.
shortSMSTemplatestringShort template for the SMS to be sent to users
maxVouchersPerUserintegerMaximum number of vouchers allowed per user
minDaysBetweenVouchersintegerMinimum days between issuance of vouchers.
maxReferralsPerRefereeintegerMaximum number of referrals allowed per referee
discountUptointegerMaximum discount value
discountValueintegerDiscount value of the coupon
dvsItemsstringItems for DVS (Dynamic Voucher System).
redemptionRangestringDefines the specific days, weekdays, and hours during which the coupon can be redeemed.
minBillAmountintegerMinimum bill amount required to use the coupon.
maxBillAmountintegerMaximum bill amount allowed for coupon redemption
redeemAtStorestringStores IDs where redemption is allowed.
campaignIdintegerIdentifier of the campaign associated with the coupon
tagstringTag or label for the coupon
maxRedemptionsInSeriesPerUserintegerMaximum redemptions in the series per user.
minDaysBetweenRedemptionintegerMinimum days required between redemptions.
redemptionValidFromstringDate from which redemption is valid.
sourceOrgIdintegerIdentifier of the source organization
issueToLoyaltybooleanIndicates if the coupon is issued to loyalty members
redeemStoreTypestringType of store where the coupon can be redeemed. Supported values : redeemable_stores.
offlineRedeemTypebooleanIndicates if offline redemption is enabled
isOldFlowEnabledbooleanIndicates if the old redemption flow is enabled
isPreRedeemEventRequiredbooleanIndicates if a pre-redeem event is required
termsAndConditionsstringTerms and conditions for the offer.
signalRedemptionEventbooleanIndicates if a redemption event signal is required
syncToClientbooleanIndicates if the coupon data should be synchronized to the client
showPinCodebooleanIndicates if a PIN code should be displayed
validMaxUserTransactionLimitintegerNumber of transactions required by the customer to redeem the coupon.
validUserRegistrationStartTimeintegerCustomer can redeem the coupon only if their registration date is after the specified date.
validUserRegistrationEndTimeintegerCustomer can redeem the coupon only if their registration date is within the specified date.
numUploadedNonIssuedintegerNumber of non-issued coupons uploaded
numUploadedTotalintegerTotal number of coupons uploaded
redemptionValidAfterDaysintegerNumber of days after which the redemption becomes valid.
ownedBystringOwnership details for the offer.
ownerIdintegerIdentifier of the owner of the coupon
ownerValidityintegerValidity period of the owner's rights to the coupon
alphaNumericbooleanIndicates if the code is alphanumeric.
shortCodeLengthintegerLength of the short code generated for the coupon
randomCodeLengthintegerLength of the random code for the coupon.
fixedExpiryDateintegerFixed expiry date of the coupon (in epoch milliseconds)
numTotalintegerTotal number of coupons issued
latestIssualTimeintegerLatest issuance time of the coupon (in epoch milliseconds)
latestRedemptionTimeintegerLatest redemption time of the coupon (in epoch milliseconds)
resendMessageEnabledbooleanIndicates if the resend message feature is enabled.
seriesTypestringType of coupon series.
clientHandlingTypestringMethod using which the coupons should be generated. Supported values: DISC_CODE (generate coupon codes automatically), GENERIC (provide a common coupon code), DISC_CODE_PIN (Upload existing coupon codes).
expiryStrategyTypestringDefines the method for coupon expiry.
Supported values: SERIES_EXPIRY(defines the coupon expires based on the rules defined for its series), MONTHS_END(defines the number of months from issuance until the coupon expires.), DAYS(defines the number of days from issuance until the coupon expires).
discountOnstringType of discount.
discountTypestringSpecifies the type of discount provided by the coupon. Supported values: ABS(a fixed amount is discounted), PERC(a percentage of the total amount is discounted).
updateProductDatabooleanIndicating if the product data can be updated.
externalIssualbooleanIndicating if external issuance is allowed.
warningsarrayList of warnings related to the coupon.
{
  "customPropertyMap": {
        "standard_terms_and_conditions": "terms and condtion"
    },
  "id": 86066,
  "orgId": 100458,
  "description": "DIWALI 10% OFF",
  "discountCode": "XYZ123",
  "validTillDate": "2021-05-09T00:00:00Z",
  "validDaysFromCreation": 30,
  "expiryStrategyValue": 1,
  "maxCreate": -1,
  "maxRedeem": -1,
  "isTransferrable": false,
  "anyUser": false,
  "sameUserMultipleRedeem": false,
  "isReferralExistingUsersAllowed": false,
  "isMultipleUseAllowed": false,
  "isValidationRequired": false,
  "isValidWithDiscountedItem": true,
  "createdBy": 75040399,
  "numIssued": 0,
  "numRedeemed": 0,
  "createdOn": "2021-05-13T11:11:42Z",
  "lastUsed": "2021-05-13T11:11:41Z",
  "seriesCode": "453163F75E8C4A2EAA2E",
  "smsTemplate": "Hi {{first_name}} {{last_name}} your voucher code {{voucher}}is valid {{valid_days_from_create}}. {{fullname}} {{offer_name}}",
  "isSMSDisabled": false,
  "info": "Evil coupon",
  "isMultipleVouchersPerUserAllowed": true,
  "doNotResendExistingVoucher": true,
  "mutualExclusiveSeriesIds": "[]",
  "storeIdsJson": "[-1]",
  "isDvsEnabled": false,
  "dvsExpiryDate": "2021-05-13T00:00:00Z",
  "priority": 0,
  "shortSMSTemplate": "Hello {{cust_name}}, your voucher code is {{voucher_code}}",
  "maxVouchersPerUser": 11,
  "minDaysBetweenVouchers": 23,
  "maxReferralsPerReferee": -1,
  "discountUpto": 0,
  "discountValue": 500,
  "dvsItems": "items",
  "redemptionRange": "{\"dom\" : [1], \"dow\": [1], \"hours\": [1]}",
  "minBillAmount": 100,
  "maxBillAmount": 20000,
  "redeemAtStore": "[-1]",
  "campaignId": -1,
  "tag": "DIWALI 10% OFF",
  "maxRedemptionsInSeriesPerUser": 122,
  "minDaysBetweenRedemption": 962,
  "redemptionValidFrom": "2020-11-17T00:00:00Z",
  "sourceOrgId": -1,
  "issueToLoyalty": false,
  "redeemStoreType": "redeemable_stores",
  "offlineRedeemType": false,
  "isOldFlowEnabled": false,
  "isPreRedeemEventRequired": false,
  "termsAndConditions": "T&C",
  "signalRedemptionEvent": false,
  "syncToClient": false,
  "showPinCode": false,
  "targetUserDetails": {
    "validMaxUserTransactionLimit": 1,
    "validUserRegistrationStartTime": 0,
    "validUserRegistrationEndTime": 10000
  },
  "numUploadedNonIssued": 0,
  "numUploadedTotal": 0,
  "redemptionValidAfterDays": 22,
  "ownedBy": "NONE",
  "ownerId": -1,
  "ownerValidity": 0,
  "alphaNumeric": true,
  "shortCodeLength": 0,
  "randomCodeLength": 10,
  "fixedExpiryDate": 1620518400000,
  "numTotal": 0,
  "latestIssualTime": 0,
  "latestRedemptionTime": 0,
  "resendMessageEnabled": true,
  "seriesType": "UNDEFINED",
  "clientHandlingType": "DISC_CODE",
  "expiryStrategyType": "SERIES_EXPIRY",
  "discountOn": "BILL",
  "discountType": "ABS",
  "updateProductData": false,
  "externalIssual": false,
  "warnings": []
}
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!