---
title: "Get Code"
method: GET
path: "/codes/{code}"
tags: ["Codes"]
---

# Get Code

`GET /codes/{code}`

Resolves a code to its type (affiliate, promo or referral) and returns the relevant data for that type. Requires no app user id.

## Path parameters

- `code` string, required

## Headers

- `x-api-key` string, required

## Response `200`

The resolved code.

- CodeResponse
  - `data` Code, required
    - `type` 'affiliate' | 'promo' | 'referral', required — The resolved code type
    - `code` string, required — The code
    - `is_active` boolean, required — Whether the code is active and can be claimed
    - `entity` union, required — The type-specific entity: the affiliate, the promo code, or the referral code owner.
      - CodeAffiliate
        - `name` string, required — The affiliate name
        - `logo_url` string, nullable, required — The affiliate logo url
        - `platforms` AffiliatePlatform[], required — The affiliate social platforms
          - `type` 'instagram' | 'tiktok' | 'youtube' | 'twitter' | 'website', required — The platform type
          - `handle` string, required — The public handle/username on the platform
          - `verified` boolean, required — Whether ownership of the platform has been verified
      - CodePromoCode
        - `limit` integer, required — The maximum number of times the code can be claimed (0 = unlimited)
      - CodeReferralUser
        - `app_user_id` string, required — The app user id of the referral code owner
    - `rewards` ReceiverRewards, required
      - `basic` ReceiverBasicReward[], required — The basic rewards
        - `reward` BasicReward, required
          - `key` string, required — The key of the reward
          - `name` string, required — The name of the reward
          - `description` string, nullable, required — The description of the reward
          - `metadata` object, nullable, required — The metadata of the reward
          - `created_at` string, date-time, required — The created at of the reward
          - `updated_at` string, date-time, nullable, required — The updated at of the reward
        - `activation` ReceiverRewardActivation, required
          - `variant` 'claim' | 'conversion', required — When the reward is activated for the receiver
        - `deactivation` union, required — When the reward deactivates for the receiver
          - ReceiverRewardNeverDeactivation
            - `variant` 'never', required — The reward never deactivates
          - ReceiverRewardIntervalDeactivation
            - `variant` 'interval', required — The reward deactivates after a fixed interval
            - `duration` integer, required — The duration of the interval
            - `period` 'days' | 'months' | 'years', required — The period of the interval
      - `credit` ReceiverCreditReward[], required — The credit rewards
        - `reward` CreditReward, required
          - `key` string, required — The key of the reward
          - `credits` integer, required — The credits of the reward
          - `name` string, required — The name of the reward
          - `description` string, nullable, required — The description of the reward
          - `metadata` object, nullable, required — The metadata of the reward
          - `created_at` string, date-time, required — The created at of the reward
          - `updated_at` string, date-time, nullable, required — The updated at of the reward
        - `activation` ReceiverRewardActivation, required
          - `variant` 'claim' | 'conversion', required — When the reward is activated for the receiver
        - `deactivation` union, required — When the reward deactivates for the receiver
          - ReceiverRewardNeverDeactivation
            - `variant` 'never', required — The reward never deactivates
          - ReceiverRewardIntervalDeactivation
            - `variant` 'interval', required — The reward deactivates after a fixed interval
            - `duration` integer, required — The duration of the interval
            - `period` 'days' | 'months' | 'years', required — The period of the interval
      - `offer_code` ReceiverOfferCodeReward[], required — The offer code rewards
        - `reward` OfferCodeReward, required
          - `key` string, required — The key of the reward
          - `offer_code_id` string, required — The offer code id
          - `offer_code_ref_name` string, required — The offer code reference name that is set in the App Store Connect
          - `subscription_product_id` string, required — The subscription product id of the offer code
          - `name` string, required — The name of the reward
          - `description` string, nullable, required — The description of the reward
          - `metadata` object, nullable, required — The metadata of the reward
          - `created_at` string, date-time, required — The created at of the reward
          - `updated_at` string, date-time, nullable, required — The updated at of the reward
        - `activation` ReceiverRewardClaimActivation, required
          - `variant` 'claim', required — When the reward is activated for the receiver
        - `deactivation` union, required — When the reward deactivates for the receiver
          - ReceiverRewardNeverDeactivation
            - `variant` 'never', required — The reward never deactivates
          - ReceiverRewardIntervalDeactivation
            - `variant` 'interval', required — The reward deactivates after a fixed interval
            - `duration` integer, required — The duration of the interval
            - `period` 'days' | 'months' | 'years', required — The period of the interval
      - `googleplay_promo_code` ReceiverGooglePlayPromoCodeReward[], required — The Google Play promo code rewards
        - `reward` GooglePlayPromoCodeReward, required
          - `key` string, required — The key of the reward
          - `name` string, required — The name of the reward
          - `description` string, nullable, required — The description of the reward
          - `metadata` object, nullable, required — The metadata of the reward
          - `created_at` string, date-time, required — The created at of the reward
          - `updated_at` string, date-time, nullable, required — The updated at of the reward
        - `activation` ReceiverRewardClaimActivation, required
          - `variant` 'claim', required — When the reward is activated for the receiver
        - `deactivation` union, required — When the reward deactivates for the receiver
          - ReceiverRewardNeverDeactivation
            - `variant` 'never', required — The reward never deactivates
          - ReceiverRewardIntervalDeactivation
            - `variant` 'interval', required — The reward deactivates after a fixed interval
            - `duration` integer, required — The duration of the interval
            - `period` 'days' | 'months' | 'years', required — The period of the interval
      - `revenuecat_entitlement` ReceiverRevenueCatEntitlementReward[], required — The RevenueCat entitlement rewards
        - `reward` RevenueCatEntitlementReward, required
          - `key` string, required — The key of the reward
          - `entitlement_id` string, required — The entitlement ID of the reward
          - `entitlement_key` string, required — The entitlement key of the reward
          - `name` string, required — The name of the reward
          - `description` string, nullable, required — The description of the reward
          - `metadata` object, nullable, required — The metadata of the reward
          - `created_at` string, date-time, required — The created at of the reward
          - `updated_at` string, date-time, nullable, required — The updated at of the reward
        - `activation` ReceiverRewardActivation, required
          - `variant` 'claim' | 'conversion', required — When the reward is activated for the receiver
        - `deactivation` union, required — When the reward deactivates for the receiver
          - ReceiverRewardNeverDeactivation
            - `variant` 'never', required — The reward never deactivates
          - ReceiverRewardIntervalDeactivation
            - `variant` 'interval', required — The reward deactivates after a fixed interval
            - `duration` integer, required — The duration of the interval
            - `period` 'days' | 'months' | 'years', required — The period of the interval
      - `revenuecat_offering` ReceiverRevenueCatOfferingReward[], required — The RevenueCat offering rewards
        - `reward` RevenueCatOfferingReward, required
          - `key` string, required — The key of the reward
          - `offering_id` string, required — The offering ID of the reward
          - `offering_key` string, required — The offering key of the reward
          - `name` string, required — The name of the reward
          - `description` string, nullable, required — The description of the reward
          - `metadata` object, nullable, required — The metadata of the reward
          - `created_at` string, date-time, required — The created at of the reward
          - `updated_at` string, date-time, nullable, required — The updated at of the reward
        - `activation` ReceiverRewardClaimActivation, required
          - `variant` 'claim', required — When the reward is activated for the receiver
        - `deactivation` union, required — When the reward deactivates for the receiver
          - ReceiverRewardNeverDeactivation
            - `variant` 'never', required — The reward never deactivates
          - ReceiverRewardIntervalDeactivation
            - `variant` 'interval', required — The reward deactivates after a fixed interval
            - `duration` integer, required — The duration of the interval
            - `period` 'days' | 'months' | 'years', required — The period of the interval

## Other responses

- `401` — Unauthorized
- `404` — The code has not been found.

---

[API](https://skmtc.dev/winwinkit/apis/winwinkit-api.md) · [All operations](https://skmtc.dev/winwinkit/apis/winwinkit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/winwinkit/winwinkit-api/revisions/5b921a291cf8/schema)
