curl --request POST \
--url https://api.winwinkit.com/users/{app_user_id}/rewards/grant \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"key": "discounted-offering",
"operation_id": "821fae4b5-0123-4567-9152-5297086a161c"
}
'{
"data": {
"rewards_granted": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"referral_code": "XYZ123",
"referral_code_link": "https://appname.wwk.link/XYZ123",
"is_trial": false,
"is_premium": false,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": null,
"metadata": {},
"stripe_customer_id": "cus_1234567890",
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2024-11-10T10:28:18.104Z"
},
"referred_by": {
"code": "XYZ123",
"type": "referral"
},
"stats": {
"claims": 0,
"conversions": 0,
"churns": 0
},
"rewards": {
"active": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"expired": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
}
},
"referral_program": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Referral Program #1",
"description": "This is a referral program",
"metadata": {},
"distribution_percentage": 100,
"limit": 0,
"rewards": {
"sender": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
]
},
"receiver": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
]
}
},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
}
}
}Grants a reward for a user. Note 1: currently only granting of credit rewards is supported. Note 2: this endpoint is only accessible with a secret API key.
curl --request POST \
--url https://api.winwinkit.com/users/{app_user_id}/rewards/grant \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"key": "discounted-offering",
"operation_id": "821fae4b5-0123-4567-9152-5297086a161c"
}
'{
"data": {
"rewards_granted": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"user": {
"app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c",
"referral_code": "XYZ123",
"referral_code_link": "https://appname.wwk.link/XYZ123",
"is_trial": false,
"is_premium": false,
"first_seen_at": "2024-11-10T10:28:18.104Z",
"last_seen_at": null,
"metadata": {},
"stripe_customer_id": "cus_1234567890",
"claim_code_eligibility": {
"eligible": true,
"eligible_until": "2024-11-10T10:28:18.104Z"
},
"referred_by": {
"code": "XYZ123",
"type": "referral"
},
"stats": {
"claims": 0,
"conversions": 0,
"churns": 0
},
"rewards": {
"active": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"credits": 100,
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"value": {
"value": "ABCDEFGHIJKLMNOPQR",
"expires_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expires_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
},
"expired": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"expired_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
]
}
},
"referral_program": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Referral Program #1",
"description": "This is a referral program",
"metadata": {},
"distribution_percentage": 100,
"limit": 0,
"rewards": {
"sender": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1,
"limit": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim",
"amount": 1
},
"deactivation": {
"variant": "never"
}
}
]
},
"receiver": {
"basic": [
{
"reward": {
"key": "basic-reward",
"name": "Basic Reward",
"description": "This is a basic reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"credit": [
{
"reward": {
"key": "credit-reward",
"credits": 100,
"name": "Credit Reward",
"description": "This is a credit reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"offer_code": [
{
"reward": {
"key": "offer-code-reward",
"offer_code_id": "123e4567-e89b-12d3-a456-426614174000",
"offer_code_ref_name": "Free Month",
"subscription_product_id": "com.winwinkit.monthly",
"name": "Offer Code Reward",
"description": "This is an offer code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"googleplay_promo_code": [
{
"reward": {
"key": "promo-code-reward",
"name": "Promo Code Reward",
"description": "This is a promo code reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_entitlement": [
{
"reward": {
"key": "premium-entitlement",
"entitlement_id": "entl1234567890",
"entitlement_key": "premium",
"name": "Premium Access",
"description": "This is an RevenueCat entitlement reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
],
"revenuecat_offering": [
{
"reward": {
"key": "discounted-offering",
"offering_id": "ofrng1234567890",
"offering_key": "discounted",
"name": "Discounted Offering",
"description": "This is an RevenueCat offering reward",
"metadata": {},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"activation": {
"variant": "claim"
},
"deactivation": {
"variant": "never"
}
}
]
}
},
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
}
}
}
}The secret API key.
The app user id of the user to grant a reward to.
The reward has been already available for the user and cannot be granted again.
Show child attributes