Create a new Loyalty Rule
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
const rule = await client.loyalty.rules.create({
amount: '10.5',
effectiveEndTime: '2024-12-31T23:59:00Z',
effectiveStartTime: '2024-01-01T00:00:00Z',
endTime: '2024-12-31T23:59:00Z',
frequency: 'daily',
loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
metadata: {},
name: 'Referral Bonus Rule',
organizationId: '123e4567-e89b-12d3-a456-426614174001',
startTime: '2024-01-01T00:00:00Z',
type: 'Bonus',
websiteId: '123e4567-e89b-12d3-a456-426614174002',
});
console.log(rule.id);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"backgroundAssetUrl": "https://example.com/background.png",
"name": "Referral Bonus Rule",
"description": "A loyalty rule rewarding users for referrals.",
"network": "mainnet",
"type": "Bonus",
"frequency": "daily",
"interval": "weekly",
"startTime": "2024-01-01T00:00:00Z",
"endTime": "2024-12-31T23:59:00Z",
"effectiveStartTime": "2024-01-01T00:00:00Z",
"effectiveEndTime": "2024-12-31T23:59:00Z",
"amount": "<any>",
"customRewardsCsvUrl": "https://example.com/rewards.csv",
"customRewardsApiUrl": "https://api.example.com/rewards",
"subscriptionId": "sub12345",
"metadata": {
"isCheckInOnEveryTxn": true,
"onlyNonListed": true,
"hasPaidFullRoyalty": false,
"hasVerifiedTwitter": true,
"onlyRewardExistingUser": true,
"hasNeverSold": false,
"onlyNative": true,
"hasFillSource": true,
"fillSource": "opensea.io",
"hasOrderSource": true,
"orderSource": "opensea.io",
"liquidity": {
"network": "mainnet",
"protocol": "Uniswap V2",
"onlyRewardInRangeLiquidity": true,
"liquidityPerDay": 1000,
"customFunction": "x = y * 1000",
"calculationType": "fixed",
"pools": [
{
"id": "0xabcdefabcdefabcdefabcdefabcdefabcdef"
}
]
},
"twitterUsername": "@example_user",
"twitterUserId": "1234567890",
"twitterHashtag": "#loyalty",
"enableVerifiedMultiplier": true,
"verifiedMultiplier": 1.5,
"isMultiplierApplied": true,
"onlyKnownUsers": false,
"firstReferralReward": 10,
"referrerReward": 50,
"secondReferralReward": 5,
"enableStreaks": true,
"promoCode": "PROMO123",
"promoCodeType": "code",
"promoCodeLength": 10,
"promoCodeCsvUrl": "https://example.com/promo_codes.csv",
"enableJoinDiscordServers": true,
"discordServersToJoin": [
{
"id": "123456789012345678",
"channels": [
{
"id": "987654321098765432",
"text": "Hello",
"emojis": [
{
"id": "1f600"
}
]
}
],
"roles": [
{
"id": "role123"
}
]
}
],
"streakArray": [
{
"streakMilestone": 5,
"streakAmount": 10
}
],
"dripQuestsToComplete": [
{
"id": "drip123"
}
],
"collection": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet",
"multiplier": 2
}
],
"range": [
{
"startRange": 1,
"endRange": 10,
"amount": 5,
"loyaltyBadgeId": "badge123",
"loyaltyMultiplierAmount": 1.5
}
],
"customRewardsApiKey": "api-key-1234",
"link": "https://example.com",
"socialPlatform": "X(Twitter)",
"socialPlatformName": "Twitter",
"socialPlatformLogo": "https://example.com/logo.png",
"rewardPerImpression": true,
"minQty": 1,
"maxQty": 10,
"snapshotProposals": [
{
"id": "proposal123",
"space": "space123"
}
],
"cta": {
"label": "Click Here",
"href": "https://example.com"
},
"hasSaleCurrency": false,
"isTokenHoldMultiplier": true,
"saleCurrency": "USD",
"isRetroactive": true,
"timeDelayToVerifySeconds": 300,
"referralRequirements": {
"points": {
"amount": 50,
"loyaltyCurrecyId": "currency123"
},
"achievePoints": true,
"completeProfile": false,
"connectTwitter": true,
"connectDiscord": true,
"connectEmail": true
},
"multiplierLoyaltyCurrencyIds": [
"currency123",
"currency456"
],
"verifyPlaceHolderText": "Enter your verification code here.",
"verificationTextMinimumLength": 10,
"buttonText": "Verify Now",
"telegramChannelId": "telegram-channel-123",
"twitterAccountUrl": "https://twitter.com/example_user",
"twitterPostUrl": "https://twitter.com/example/status/1234567890",
"checkLike": true,
"checkRepost": true,
"checkComment": true,
"checkText": "loyalty",
"smartContract": {
"contractId": "123e4567-e89b-12d3-a456-426614174000",
"abi": "[]",
"event": "Transfer",
"criteria": "everyEvent",
"params": [
{
"name": "value",
"condition": ">=",
"value": "100"
}
],
"withCustomRange": true,
"customRange": {
"startsAt": "2024-01-01T00:00:00Z",
"endsAt": "2024-01-31T23:59:59Z"
},
"max": 1000,
"withBonus": true,
"bonus": [
{
"amount": 50,
"count": 5
}
],
"addressMapping": "0x123...789",
"amountMultiplier": {
"valueMapping": "amount"
}
},
"walletType": "evm",
"imageUrl": "https://example.com/image.png",
"trackAllContracts": true,
"onlyRewardSingleTokenOwnership": true,
"skipMultiplier": true,
"completeProfileConditions": {
"twitter": true,
"discord": false
},
"steamAppId": "1234567890",
"trackProgress": true,
"rewardByBatch": true,
"batchSize": 100,
"youtubeVideoId": "1234567890",
"youtubeChannelId": "1234567890",
"isRestrictedToNewUsers": false,
"rewardBadgePerRange": false,
"swap": {
"provider": "any",
"relayReferrerId": "<string>",
"tokenMode": "any",
"swappedToChain": 123,
"requireCrossChainSwap": true,
"swappedToTokens": [
{
"address": "<string>",
"chainId": "<string>"
}
],
"trackTokenAmount": true
}
},
"collectionAddress": "0x1234567890abcdef1234567890abcdef12345678",
"collections": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet"
}
],
"hideInUi": false,
"isRequired": true,
"oauthCredentialsId": "123e4567-e89b-12d3-a456-426614174003",
"loyaltyCurrencyId": "456e1234-e89b-12d3-a456-426614174003",
"loyaltyRuleGroupId": "123e4567-e89b-12d3-a456-426614174004",
"rewardType": "points",
"loyaltyBadgeId": "123e4567-e89b-12d3-a456-426614174004",
"mediaUrl": "https://example.com/media.png",
"loyaltyUserAllotmentCsvUrl": "https://example.com/loyalty-user-allotment.csv",
"maxAmountPerInterval": 100,
"maxAmountInterval": "daily",
"shopifyStoreUrl": "https://example.com",
"externalIntegrationId": "123e4567-e89b-12d3-a456-426614174005"
}
Body
Schema for creating a new loyalty rule with detailed validations
200
Schema for creating a new loyalty rule with detailed validations
Was this page helpful?
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
const rule = await client.loyalty.rules.create({
amount: '10.5',
effectiveEndTime: '2024-12-31T23:59:00Z',
effectiveStartTime: '2024-01-01T00:00:00Z',
endTime: '2024-12-31T23:59:00Z',
frequency: 'daily',
loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
metadata: {},
name: 'Referral Bonus Rule',
organizationId: '123e4567-e89b-12d3-a456-426614174001',
startTime: '2024-01-01T00:00:00Z',
type: 'Bonus',
websiteId: '123e4567-e89b-12d3-a456-426614174002',
});
console.log(rule.id);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"backgroundAssetUrl": "https://example.com/background.png",
"name": "Referral Bonus Rule",
"description": "A loyalty rule rewarding users for referrals.",
"network": "mainnet",
"type": "Bonus",
"frequency": "daily",
"interval": "weekly",
"startTime": "2024-01-01T00:00:00Z",
"endTime": "2024-12-31T23:59:00Z",
"effectiveStartTime": "2024-01-01T00:00:00Z",
"effectiveEndTime": "2024-12-31T23:59:00Z",
"amount": "<any>",
"customRewardsCsvUrl": "https://example.com/rewards.csv",
"customRewardsApiUrl": "https://api.example.com/rewards",
"subscriptionId": "sub12345",
"metadata": {
"isCheckInOnEveryTxn": true,
"onlyNonListed": true,
"hasPaidFullRoyalty": false,
"hasVerifiedTwitter": true,
"onlyRewardExistingUser": true,
"hasNeverSold": false,
"onlyNative": true,
"hasFillSource": true,
"fillSource": "opensea.io",
"hasOrderSource": true,
"orderSource": "opensea.io",
"liquidity": {
"network": "mainnet",
"protocol": "Uniswap V2",
"onlyRewardInRangeLiquidity": true,
"liquidityPerDay": 1000,
"customFunction": "x = y * 1000",
"calculationType": "fixed",
"pools": [
{
"id": "0xabcdefabcdefabcdefabcdefabcdefabcdef"
}
]
},
"twitterUsername": "@example_user",
"twitterUserId": "1234567890",
"twitterHashtag": "#loyalty",
"enableVerifiedMultiplier": true,
"verifiedMultiplier": 1.5,
"isMultiplierApplied": true,
"onlyKnownUsers": false,
"firstReferralReward": 10,
"referrerReward": 50,
"secondReferralReward": 5,
"enableStreaks": true,
"promoCode": "PROMO123",
"promoCodeType": "code",
"promoCodeLength": 10,
"promoCodeCsvUrl": "https://example.com/promo_codes.csv",
"enableJoinDiscordServers": true,
"discordServersToJoin": [
{
"id": "123456789012345678",
"channels": [
{
"id": "987654321098765432",
"text": "Hello",
"emojis": [
{
"id": "1f600"
}
]
}
],
"roles": [
{
"id": "role123"
}
]
}
],
"streakArray": [
{
"streakMilestone": 5,
"streakAmount": 10
}
],
"dripQuestsToComplete": [
{
"id": "drip123"
}
],
"collection": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet",
"multiplier": 2
}
],
"range": [
{
"startRange": 1,
"endRange": 10,
"amount": 5,
"loyaltyBadgeId": "badge123",
"loyaltyMultiplierAmount": 1.5
}
],
"customRewardsApiKey": "api-key-1234",
"link": "https://example.com",
"socialPlatform": "X(Twitter)",
"socialPlatformName": "Twitter",
"socialPlatformLogo": "https://example.com/logo.png",
"rewardPerImpression": true,
"minQty": 1,
"maxQty": 10,
"snapshotProposals": [
{
"id": "proposal123",
"space": "space123"
}
],
"cta": {
"label": "Click Here",
"href": "https://example.com"
},
"hasSaleCurrency": false,
"isTokenHoldMultiplier": true,
"saleCurrency": "USD",
"isRetroactive": true,
"timeDelayToVerifySeconds": 300,
"referralRequirements": {
"points": {
"amount": 50,
"loyaltyCurrecyId": "currency123"
},
"achievePoints": true,
"completeProfile": false,
"connectTwitter": true,
"connectDiscord": true,
"connectEmail": true
},
"multiplierLoyaltyCurrencyIds": [
"currency123",
"currency456"
],
"verifyPlaceHolderText": "Enter your verification code here.",
"verificationTextMinimumLength": 10,
"buttonText": "Verify Now",
"telegramChannelId": "telegram-channel-123",
"twitterAccountUrl": "https://twitter.com/example_user",
"twitterPostUrl": "https://twitter.com/example/status/1234567890",
"checkLike": true,
"checkRepost": true,
"checkComment": true,
"checkText": "loyalty",
"smartContract": {
"contractId": "123e4567-e89b-12d3-a456-426614174000",
"abi": "[]",
"event": "Transfer",
"criteria": "everyEvent",
"params": [
{
"name": "value",
"condition": ">=",
"value": "100"
}
],
"withCustomRange": true,
"customRange": {
"startsAt": "2024-01-01T00:00:00Z",
"endsAt": "2024-01-31T23:59:59Z"
},
"max": 1000,
"withBonus": true,
"bonus": [
{
"amount": 50,
"count": 5
}
],
"addressMapping": "0x123...789",
"amountMultiplier": {
"valueMapping": "amount"
}
},
"walletType": "evm",
"imageUrl": "https://example.com/image.png",
"trackAllContracts": true,
"onlyRewardSingleTokenOwnership": true,
"skipMultiplier": true,
"completeProfileConditions": {
"twitter": true,
"discord": false
},
"steamAppId": "1234567890",
"trackProgress": true,
"rewardByBatch": true,
"batchSize": 100,
"youtubeVideoId": "1234567890",
"youtubeChannelId": "1234567890",
"isRestrictedToNewUsers": false,
"rewardBadgePerRange": false,
"swap": {
"provider": "any",
"relayReferrerId": "<string>",
"tokenMode": "any",
"swappedToChain": 123,
"requireCrossChainSwap": true,
"swappedToTokens": [
{
"address": "<string>",
"chainId": "<string>"
}
],
"trackTokenAmount": true
}
},
"collectionAddress": "0x1234567890abcdef1234567890abcdef12345678",
"collections": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet"
}
],
"hideInUi": false,
"isRequired": true,
"oauthCredentialsId": "123e4567-e89b-12d3-a456-426614174003",
"loyaltyCurrencyId": "456e1234-e89b-12d3-a456-426614174003",
"loyaltyRuleGroupId": "123e4567-e89b-12d3-a456-426614174004",
"rewardType": "points",
"loyaltyBadgeId": "123e4567-e89b-12d3-a456-426614174004",
"mediaUrl": "https://example.com/media.png",
"loyaltyUserAllotmentCsvUrl": "https://example.com/loyalty-user-allotment.csv",
"maxAmountPerInterval": 100,
"maxAmountInterval": "daily",
"shopifyStoreUrl": "https://example.com",
"externalIntegrationId": "123e4567-e89b-12d3-a456-426614174005"
}
Create a new Loyalty Rule
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
const rule = await client.loyalty.rules.create({
amount: '10.5',
effectiveEndTime: '2024-12-31T23:59:00Z',
effectiveStartTime: '2024-01-01T00:00:00Z',
endTime: '2024-12-31T23:59:00Z',
frequency: 'daily',
loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
metadata: {},
name: 'Referral Bonus Rule',
organizationId: '123e4567-e89b-12d3-a456-426614174001',
startTime: '2024-01-01T00:00:00Z',
type: 'Bonus',
websiteId: '123e4567-e89b-12d3-a456-426614174002',
});
console.log(rule.id);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"backgroundAssetUrl": "https://example.com/background.png",
"name": "Referral Bonus Rule",
"description": "A loyalty rule rewarding users for referrals.",
"network": "mainnet",
"type": "Bonus",
"frequency": "daily",
"interval": "weekly",
"startTime": "2024-01-01T00:00:00Z",
"endTime": "2024-12-31T23:59:00Z",
"effectiveStartTime": "2024-01-01T00:00:00Z",
"effectiveEndTime": "2024-12-31T23:59:00Z",
"amount": "<any>",
"customRewardsCsvUrl": "https://example.com/rewards.csv",
"customRewardsApiUrl": "https://api.example.com/rewards",
"subscriptionId": "sub12345",
"metadata": {
"isCheckInOnEveryTxn": true,
"onlyNonListed": true,
"hasPaidFullRoyalty": false,
"hasVerifiedTwitter": true,
"onlyRewardExistingUser": true,
"hasNeverSold": false,
"onlyNative": true,
"hasFillSource": true,
"fillSource": "opensea.io",
"hasOrderSource": true,
"orderSource": "opensea.io",
"liquidity": {
"network": "mainnet",
"protocol": "Uniswap V2",
"onlyRewardInRangeLiquidity": true,
"liquidityPerDay": 1000,
"customFunction": "x = y * 1000",
"calculationType": "fixed",
"pools": [
{
"id": "0xabcdefabcdefabcdefabcdefabcdefabcdef"
}
]
},
"twitterUsername": "@example_user",
"twitterUserId": "1234567890",
"twitterHashtag": "#loyalty",
"enableVerifiedMultiplier": true,
"verifiedMultiplier": 1.5,
"isMultiplierApplied": true,
"onlyKnownUsers": false,
"firstReferralReward": 10,
"referrerReward": 50,
"secondReferralReward": 5,
"enableStreaks": true,
"promoCode": "PROMO123",
"promoCodeType": "code",
"promoCodeLength": 10,
"promoCodeCsvUrl": "https://example.com/promo_codes.csv",
"enableJoinDiscordServers": true,
"discordServersToJoin": [
{
"id": "123456789012345678",
"channels": [
{
"id": "987654321098765432",
"text": "Hello",
"emojis": [
{
"id": "1f600"
}
]
}
],
"roles": [
{
"id": "role123"
}
]
}
],
"streakArray": [
{
"streakMilestone": 5,
"streakAmount": 10
}
],
"dripQuestsToComplete": [
{
"id": "drip123"
}
],
"collection": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet",
"multiplier": 2
}
],
"range": [
{
"startRange": 1,
"endRange": 10,
"amount": 5,
"loyaltyBadgeId": "badge123",
"loyaltyMultiplierAmount": 1.5
}
],
"customRewardsApiKey": "api-key-1234",
"link": "https://example.com",
"socialPlatform": "X(Twitter)",
"socialPlatformName": "Twitter",
"socialPlatformLogo": "https://example.com/logo.png",
"rewardPerImpression": true,
"minQty": 1,
"maxQty": 10,
"snapshotProposals": [
{
"id": "proposal123",
"space": "space123"
}
],
"cta": {
"label": "Click Here",
"href": "https://example.com"
},
"hasSaleCurrency": false,
"isTokenHoldMultiplier": true,
"saleCurrency": "USD",
"isRetroactive": true,
"timeDelayToVerifySeconds": 300,
"referralRequirements": {
"points": {
"amount": 50,
"loyaltyCurrecyId": "currency123"
},
"achievePoints": true,
"completeProfile": false,
"connectTwitter": true,
"connectDiscord": true,
"connectEmail": true
},
"multiplierLoyaltyCurrencyIds": [
"currency123",
"currency456"
],
"verifyPlaceHolderText": "Enter your verification code here.",
"verificationTextMinimumLength": 10,
"buttonText": "Verify Now",
"telegramChannelId": "telegram-channel-123",
"twitterAccountUrl": "https://twitter.com/example_user",
"twitterPostUrl": "https://twitter.com/example/status/1234567890",
"checkLike": true,
"checkRepost": true,
"checkComment": true,
"checkText": "loyalty",
"smartContract": {
"contractId": "123e4567-e89b-12d3-a456-426614174000",
"abi": "[]",
"event": "Transfer",
"criteria": "everyEvent",
"params": [
{
"name": "value",
"condition": ">=",
"value": "100"
}
],
"withCustomRange": true,
"customRange": {
"startsAt": "2024-01-01T00:00:00Z",
"endsAt": "2024-01-31T23:59:59Z"
},
"max": 1000,
"withBonus": true,
"bonus": [
{
"amount": 50,
"count": 5
}
],
"addressMapping": "0x123...789",
"amountMultiplier": {
"valueMapping": "amount"
}
},
"walletType": "evm",
"imageUrl": "https://example.com/image.png",
"trackAllContracts": true,
"onlyRewardSingleTokenOwnership": true,
"skipMultiplier": true,
"completeProfileConditions": {
"twitter": true,
"discord": false
},
"steamAppId": "1234567890",
"trackProgress": true,
"rewardByBatch": true,
"batchSize": 100,
"youtubeVideoId": "1234567890",
"youtubeChannelId": "1234567890",
"isRestrictedToNewUsers": false,
"rewardBadgePerRange": false,
"swap": {
"provider": "any",
"relayReferrerId": "<string>",
"tokenMode": "any",
"swappedToChain": 123,
"requireCrossChainSwap": true,
"swappedToTokens": [
{
"address": "<string>",
"chainId": "<string>"
}
],
"trackTokenAmount": true
}
},
"collectionAddress": "0x1234567890abcdef1234567890abcdef12345678",
"collections": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet"
}
],
"hideInUi": false,
"isRequired": true,
"oauthCredentialsId": "123e4567-e89b-12d3-a456-426614174003",
"loyaltyCurrencyId": "456e1234-e89b-12d3-a456-426614174003",
"loyaltyRuleGroupId": "123e4567-e89b-12d3-a456-426614174004",
"rewardType": "points",
"loyaltyBadgeId": "123e4567-e89b-12d3-a456-426614174004",
"mediaUrl": "https://example.com/media.png",
"loyaltyUserAllotmentCsvUrl": "https://example.com/loyalty-user-allotment.csv",
"maxAmountPerInterval": 100,
"maxAmountInterval": "daily",
"shopifyStoreUrl": "https://example.com",
"externalIntegrationId": "123e4567-e89b-12d3-a456-426614174005"
}
Body
Schema for creating a new loyalty rule with detailed validations
200
Schema for creating a new loyalty rule with detailed validations
Was this page helpful?
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
const rule = await client.loyalty.rules.create({
amount: '10.5',
effectiveEndTime: '2024-12-31T23:59:00Z',
effectiveStartTime: '2024-01-01T00:00:00Z',
endTime: '2024-12-31T23:59:00Z',
frequency: 'daily',
loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
metadata: {},
name: 'Referral Bonus Rule',
organizationId: '123e4567-e89b-12d3-a456-426614174001',
startTime: '2024-01-01T00:00:00Z',
type: 'Bonus',
websiteId: '123e4567-e89b-12d3-a456-426614174002',
});
console.log(rule.id);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"backgroundAssetUrl": "https://example.com/background.png",
"name": "Referral Bonus Rule",
"description": "A loyalty rule rewarding users for referrals.",
"network": "mainnet",
"type": "Bonus",
"frequency": "daily",
"interval": "weekly",
"startTime": "2024-01-01T00:00:00Z",
"endTime": "2024-12-31T23:59:00Z",
"effectiveStartTime": "2024-01-01T00:00:00Z",
"effectiveEndTime": "2024-12-31T23:59:00Z",
"amount": "<any>",
"customRewardsCsvUrl": "https://example.com/rewards.csv",
"customRewardsApiUrl": "https://api.example.com/rewards",
"subscriptionId": "sub12345",
"metadata": {
"isCheckInOnEveryTxn": true,
"onlyNonListed": true,
"hasPaidFullRoyalty": false,
"hasVerifiedTwitter": true,
"onlyRewardExistingUser": true,
"hasNeverSold": false,
"onlyNative": true,
"hasFillSource": true,
"fillSource": "opensea.io",
"hasOrderSource": true,
"orderSource": "opensea.io",
"liquidity": {
"network": "mainnet",
"protocol": "Uniswap V2",
"onlyRewardInRangeLiquidity": true,
"liquidityPerDay": 1000,
"customFunction": "x = y * 1000",
"calculationType": "fixed",
"pools": [
{
"id": "0xabcdefabcdefabcdefabcdefabcdefabcdef"
}
]
},
"twitterUsername": "@example_user",
"twitterUserId": "1234567890",
"twitterHashtag": "#loyalty",
"enableVerifiedMultiplier": true,
"verifiedMultiplier": 1.5,
"isMultiplierApplied": true,
"onlyKnownUsers": false,
"firstReferralReward": 10,
"referrerReward": 50,
"secondReferralReward": 5,
"enableStreaks": true,
"promoCode": "PROMO123",
"promoCodeType": "code",
"promoCodeLength": 10,
"promoCodeCsvUrl": "https://example.com/promo_codes.csv",
"enableJoinDiscordServers": true,
"discordServersToJoin": [
{
"id": "123456789012345678",
"channels": [
{
"id": "987654321098765432",
"text": "Hello",
"emojis": [
{
"id": "1f600"
}
]
}
],
"roles": [
{
"id": "role123"
}
]
}
],
"streakArray": [
{
"streakMilestone": 5,
"streakAmount": 10
}
],
"dripQuestsToComplete": [
{
"id": "drip123"
}
],
"collection": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet",
"multiplier": 2
}
],
"range": [
{
"startRange": 1,
"endRange": 10,
"amount": 5,
"loyaltyBadgeId": "badge123",
"loyaltyMultiplierAmount": 1.5
}
],
"customRewardsApiKey": "api-key-1234",
"link": "https://example.com",
"socialPlatform": "X(Twitter)",
"socialPlatformName": "Twitter",
"socialPlatformLogo": "https://example.com/logo.png",
"rewardPerImpression": true,
"minQty": 1,
"maxQty": 10,
"snapshotProposals": [
{
"id": "proposal123",
"space": "space123"
}
],
"cta": {
"label": "Click Here",
"href": "https://example.com"
},
"hasSaleCurrency": false,
"isTokenHoldMultiplier": true,
"saleCurrency": "USD",
"isRetroactive": true,
"timeDelayToVerifySeconds": 300,
"referralRequirements": {
"points": {
"amount": 50,
"loyaltyCurrecyId": "currency123"
},
"achievePoints": true,
"completeProfile": false,
"connectTwitter": true,
"connectDiscord": true,
"connectEmail": true
},
"multiplierLoyaltyCurrencyIds": [
"currency123",
"currency456"
],
"verifyPlaceHolderText": "Enter your verification code here.",
"verificationTextMinimumLength": 10,
"buttonText": "Verify Now",
"telegramChannelId": "telegram-channel-123",
"twitterAccountUrl": "https://twitter.com/example_user",
"twitterPostUrl": "https://twitter.com/example/status/1234567890",
"checkLike": true,
"checkRepost": true,
"checkComment": true,
"checkText": "loyalty",
"smartContract": {
"contractId": "123e4567-e89b-12d3-a456-426614174000",
"abi": "[]",
"event": "Transfer",
"criteria": "everyEvent",
"params": [
{
"name": "value",
"condition": ">=",
"value": "100"
}
],
"withCustomRange": true,
"customRange": {
"startsAt": "2024-01-01T00:00:00Z",
"endsAt": "2024-01-31T23:59:59Z"
},
"max": 1000,
"withBonus": true,
"bonus": [
{
"amount": 50,
"count": 5
}
],
"addressMapping": "0x123...789",
"amountMultiplier": {
"valueMapping": "amount"
}
},
"walletType": "evm",
"imageUrl": "https://example.com/image.png",
"trackAllContracts": true,
"onlyRewardSingleTokenOwnership": true,
"skipMultiplier": true,
"completeProfileConditions": {
"twitter": true,
"discord": false
},
"steamAppId": "1234567890",
"trackProgress": true,
"rewardByBatch": true,
"batchSize": 100,
"youtubeVideoId": "1234567890",
"youtubeChannelId": "1234567890",
"isRestrictedToNewUsers": false,
"rewardBadgePerRange": false,
"swap": {
"provider": "any",
"relayReferrerId": "<string>",
"tokenMode": "any",
"swappedToChain": 123,
"requireCrossChainSwap": true,
"swappedToTokens": [
{
"address": "<string>",
"chainId": "<string>"
}
],
"trackTokenAmount": true
}
},
"collectionAddress": "0x1234567890abcdef1234567890abcdef12345678",
"collections": [
{
"address": "0xabcdefabcdefabcdefabcdefabcdefabcdef",
"network": "mainnet"
}
],
"hideInUi": false,
"isRequired": true,
"oauthCredentialsId": "123e4567-e89b-12d3-a456-426614174003",
"loyaltyCurrencyId": "456e1234-e89b-12d3-a456-426614174003",
"loyaltyRuleGroupId": "123e4567-e89b-12d3-a456-426614174004",
"rewardType": "points",
"loyaltyBadgeId": "123e4567-e89b-12d3-a456-426614174004",
"mediaUrl": "https://example.com/media.png",
"loyaltyUserAllotmentCsvUrl": "https://example.com/loyalty-user-allotment.csv",
"maxAmountPerInterval": 100,
"maxAmountInterval": "daily",
"shopifyStoreUrl": "https://example.com",
"externalIntegrationId": "123e4567-e89b-12d3-a456-426614174005"
}