Get Code
curl --request GET \
--url https://api.winwinkit.com/codes/{code} \
--header 'x-api-key: <x-api-key>'const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.winwinkit.com/codes/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"type": "affiliate",
"code": "SUMMER",
"is_active": true,
"entity": {
"name": "Jane Doe",
"logo_url": "https://example.com/logo.png",
"platforms": [
{
"type": "instagram",
"handle": "winwinkit",
"verified": true
}
]
},
"rewards": {
"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"
}
}
]
}
}
}{
"errors": [
{
"code": "<string>",
"status": 123,
"message": "<string>",
"source": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": 123,
"message": "<string>",
"source": "<string>"
}
]
}Codes
Get Code
Resolves a code to its type (affiliate, promo or referral) and returns the relevant data for that type. Requires no app user id.
GET
/
codes
/
{code}
Get Code
curl --request GET \
--url https://api.winwinkit.com/codes/{code} \
--header 'x-api-key: <x-api-key>'const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.winwinkit.com/codes/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"type": "affiliate",
"code": "SUMMER",
"is_active": true,
"entity": {
"name": "Jane Doe",
"logo_url": "https://example.com/logo.png",
"platforms": [
{
"type": "instagram",
"handle": "winwinkit",
"verified": true
}
]
},
"rewards": {
"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"
}
}
]
}
}
}{
"errors": [
{
"code": "<string>",
"status": 123,
"message": "<string>",
"source": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": 123,
"message": "<string>",
"source": "<string>"
}
]
}⌘I