Skip to main content
GET
/
rewards
/
{rewardId}
Get reward by id
curl --request GET \
  --url https://{subdomain}.nudj.cx/api/v2/integration/rewards/{rewardId} \
  --header 'x-api-token: <api-key>'
{
  "id": "<string>",
  "organisationId": "<string>",
  "communityId": "<string>",
  "additionalCommunityIds": [
    "<string>"
  ],
  "details": {
    "title": "<any>",
    "description": "<any>",
    "light": "<any>",
    "dark": "<any>"
  },
  "assetPointsPrice": 1,
  "assetPointsSwapValue": 1,
  "entryPointsPrice": 1,
  "assetsSupply": 1,
  "entriesSupply": 1,
  "maxAssetsPerUser": 2,
  "maxEntriesPerUser": 2,
  "allocationsType": "assets-only",
  "isSharedAssetsSupply": true,
  "isSharedEntriesSupply": true,
  "allocations": [
    {
      "id": "<string>",
      "allocationType": "assets",
      "supply": 1,
      "amountToDistribute": 2,
      "distributed": 1,
      "isShop": true,
      "isLive": true
    }
  ],
  "redemptionConfig": {
    "instructions": "<string>",
    "instructionsImageUrl": "<string>",
    "supportEmail": "jsmith@example.com",
    "supportPhoneNumber": "<string>",
    "supportUrl": "<string>",
    "type": "rich-text",
    "additionalInformation": [
      {
        "variableConfigId": "<any>",
        "required": "<any>",
        "position": "<any>"
      }
    ],
    "redeemByDate": "<string>",
    "autoRedeem": false,
    "content": "<string>"
  },
  "featured": true,
  "tags": [
    {
      "id": "<string>",
      "organisationId": "<string>",
      "value": "<string>",
      "config": {
        "filtering": [
          "achievement"
        ],
        "display": [
          "achievement"
        ],
        "iconifyIcon": "<string>"
      },
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "campaigns": [
    {
      "id": "<string>",
      "organisationId": "<string>",
      "name": "<string>",
      "startDate": "<string>",
      "endDate": "<string>",
      "status": "archived",
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "status": "archived",
  "drawsAt": "<string>",
  "startsAt": "<string>",
  "expiresAt": "<string>",
  "isManualGiveaway": true,
  "availableAsTemplateForOrganisations": [
    "<string>"
  ],
  "isGlobalTemplate": true,
  "metadata": {},
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "challenges": [
    {
      "id": "<string>",
      "organisationId": "<string>",
      "communityId": "<string>",
      "additionalCommunityIds": [
        "<string>"
      ],
      "details": {
        "title": "<any>",
        "description": "<any>",
        "light": "<any>",
        "dark": "<any>"
      },
      "progressPeriod": "daily",
      "maxCompletionsPerPeriod": 1,
      "numberOfActions": 1,
      "actionIds": [
        "<string>"
      ],
      "challengeType": "survey",
      "enabledForSingleView": true,
      "actionGroups": [
        {
          "id": "<string>",
          "parentGroupId": "<string>",
          "type": "single",
          "displayType": "list",
          "details": {
            "title": "<any>",
            "description": "<any>",
            "light": "<any>",
            "dark": "<any>"
          }
        }
      ],
      "status": "archived",
      "startDate": "<string>",
      "endDate": "<string>",
      "featured": true,
      "threadId": "<string>",
      "isSkippable": true,
      "isLinear": true,
      "unlockPrice": 1,
      "tags": [
        {
          "id": "<string>",
          "organisationId": "<string>",
          "value": "<string>",
          "config": {
            "filtering": [
              "achievement"
            ],
            "display": [
              "achievement"
            ],
            "iconifyIcon": "<string>"
          },
          "createdAt": "<string>",
          "updatedAt": "<string>"
        }
      ],
      "campaigns": [
        {
          "id": "<string>",
          "organisationId": "<string>",
          "name": "<string>",
          "startDate": "<string>",
          "endDate": "<string>",
          "status": "archived",
          "createdAt": "<string>",
          "updatedAt": "<string>"
        }
      ],
      "availableAsTemplateForOrganisations": [
        "<string>"
      ],
      "isGlobalTemplate": true,
      "startsAt": "<string>",
      "expiresAt": "<string>",
      "groupIds": [
        "<string>"
      ],
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "videoConfig": {
        "videoUrl": "<string>",
        "isVideoEnabled": true
      },
      "actions": [
        {
          "id": "<string>",
          "organisationId": "<string>",
          "communityId": "<string>",
          "allocationId": "<string>",
          "allocatedTo": "achievement",
          "actionGroupId": "<string>",
          "actionGroupIndex": 123,
          "position": 123,
          "category": "nudj",
          "key": "facebook-comment",
          "details": {
            "title": "<string>",
            "description": "<string>",
            "light": {
              "primaryImageUrl": "<any>",
              "secondaryImageUrl": "<any>"
            },
            "dark": {
              "primaryImageUrl": "<any>",
              "secondaryImageUrl": "<any>"
            }
          },
          "progressPeriod": "daily",
          "maxCompletionsPerPeriod": 1,
          "attributes": "<any>",
          "config": {
            "isOptional": true,
            "socialValidation": "validation-on",
            "prerequisites": {
              "requiredActionCount": 123,
              "actionIds": [
                "<string>"
              ]
            },
            "requiresCorrectAnswer": true
          },
          "videoMetadata": {
            "startsAtMs": 1,
            "shouldPause": true,
            "validatesAtMs": 1,
            "endsAtMs": 1
          },
          "createdAt": "<string>",
          "availableAsTemplateForOrganisations": [
            "<string>"
          ],
          "isGlobalTemplate": true,
          "previousAction": "<string>",
          "nextAction": "<string>",
          "stats": {
            "totalXp": 123
          },
          "reward": {
            "points": 1,
            "completionXp": 1,
            "items": [
              {
                "id": "<string>",
                "details": {
                  "title": "<string>",
                  "description": "<string>",
                  "light": {},
                  "dark": {}
                },
                "type": "assets",
                "amountToDistribute": 1,
                "totalSupply": 1,
                "remainingSupply": 1
              }
            ],
            "rewardSelectionMethod": "all",
            "numberOfRewardsToReceive": 1,
            "distributionEventId": "<string>"
          },
          "userState": {
            "criteriaMet": true,
            "status": "completed",
            "statusMessage": "<string>",
            "eligibleXp": 123,
            "earnedXp": 123,
            "attempts": 123,
            "output": "<any>",
            "unmetCriteriaMessage": "<string>"
          },
          "participations": [
            {
              "id": "<string>",
              "criteriaMet": true,
              "output": "<any>",
              "status": "pending",
              "participatedAt": "<string>",
              "processingStartedAt": "<string>",
              "processedAt": "<string>",
              "unmetCriteriaMessage": "<string>",
              "processingFailedMessage": "<string>"
            }
          ]
        }
      ],
      "community": {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "slug": "<string>",
        "logo": "<string>"
      },
      "participantStats": {
        "startedCount": 1,
        "completedCount": 1
      },
      "stats": {
        "totalXp": 1,
        "totalActionsCount": 1
      },
      "reward": {
        "points": 1,
        "completionXp": 1,
        "items": [
          {
            "id": "<string>",
            "details": {
              "title": "<string>",
              "description": "<string>",
              "light": {},
              "dark": {}
            },
            "type": "assets",
            "amountToDistribute": 1,
            "totalSupply": 1,
            "remainingSupply": 1
          }
        ],
        "rewardSelectionMethod": "all",
        "numberOfRewardsToReceive": 1,
        "distributionEventId": "<string>"
      },
      "userState": {
        "status": "completed",
        "completionsInPeriod": 0,
        "totalCompletions": 0,
        "keysContributed": 0,
        "latestAttempt": {
          "eligibleXp": 0,
          "actionsCompletedCount": 0,
          "startedAt": "<string>",
          "earnedXp": 0,
          "earnedPoints": 0,
          "earnedRewardAssets": [
            {
              "rewardAssetId": "<string>",
              "rewardId": "<string>"
            }
          ],
          "earnedRewardEntries": [
            {
              "rewardEntryId": "<string>",
              "rewardId": "<string>",
              "amount": 1
            }
          ],
          "completionTime": 0,
          "successRate": 0
        },
        "historicAttempts": []
      }
    }
  ],
  "achievements": [
    {
      "id": "<string>",
      "organisationId": "<string>",
      "communityId": "<string>",
      "details": {
        "title": "<any>",
        "description": "<any>",
        "light": "<any>",
        "dark": "<any>"
      },
      "progressPeriod": "daily",
      "displayMode": "default",
      "tags": [
        "<string>"
      ],
      "campaigns": [
        "<string>"
      ],
      "criteria": {
        "type": "sum",
        "parameters": {
          "query": "<any>",
          "operator": "<any>",
          "attribute": "<any>",
          "value": "<any>"
        }
      },
      "queries": [
        {
          "type": "event",
          "alias": "<string>",
          "parameters": {
            "eventName": "<string>",
            "eventCategory": "achievement",
            "eventSubCategory": "achievement-completion",
            "eventSourceId": "<string>",
            "tags": [
              "<string>"
            ]
          },
          "isCommunityScoped": true
        }
      ],
      "queryDescriptions": {},
      "status": "archived",
      "featured": true,
      "availableAsTemplateForOrganisations": [
        "<string>"
      ],
      "isGlobalTemplate": true,
      "startsAt": "<string>",
      "expiresAt": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "userState": {
        "status": "completed",
        "completedAt": "<string>",
        "timesCompleted": 1,
        "isClaimable": true,
        "isClaimed": true,
        "updatedAt": "<string>",
        "earnedPoints": 1,
        "earnedRewardAssets": [
          {
            "id": "<string>",
            "organisationId": "<string>",
            "communityId": "<string>",
            "rewardId": "<string>",
            "allocationId": "<string>",
            "userId": "<string>",
            "details": {
              "title": "<any>",
              "description": "<any>",
              "light": "<any>",
              "dark": "<any>"
            },
            "redeemable": {
              "instructions": "<any>",
              "instructionsImageUrl": "<any>",
              "supportEmail": "<any>",
              "supportPhoneNumber": "<any>",
              "supportUrl": "<any>",
              "type": "<any>",
              "additionalInformation": "<any>",
              "redeemByDate": "<any>",
              "content": "<any>"
            },
            "eventCategory": "achievement",
            "eventSubCategory": "achievement-completion",
            "eventSourceId": "<string>",
            "tags": [
              "<any>"
            ],
            "campaigns": [
              "<any>"
            ],
            "metadata": {},
            "claimedAt": "<string>",
            "redeemedAt": "<string>",
            "expiresAt": "<string>",
            "createdAt": "<string>",
            "updatedAt": "<string>",
            "additionalCommunityIds": [
              "<any>"
            ]
          }
        ],
        "earnedRewardEntries": [
          {
            "id": "<string>",
            "organisationId": "<string>",
            "communityId": "<string>",
            "rewardId": "<string>",
            "userId": "<string>",
            "rewardAssetIds": [
              "<string>"
            ],
            "details": {
              "title": "<any>",
              "description": "<any>",
              "light": "<any>",
              "dark": "<any>"
            },
            "totalEntries": 123,
            "entries": [
              {
                "allocationId": "<string>",
                "amount": 123,
                "createdAt": "<string>"
              }
            ],
            "tags": [
              "<string>"
            ],
            "campaigns": [
              "<string>"
            ],
            "checkByDate": "<string>",
            "checkedAt": "<string>",
            "drawnAt": "<string>",
            "createdAt": "<string>",
            "updatedAt": "<string>",
            "additionalCommunityIds": [
              "<string>"
            ],
            "status": "pending",
            "rewardAssets": [
              {
                "id": "<string>",
                "organisationId": "<string>",
                "communityId": "<string>",
                "rewardId": "<string>",
                "allocationId": "<string>",
                "userId": "<string>",
                "details": {
                  "title": "<any>",
                  "description": "<any>",
                  "light": "<any>",
                  "dark": "<any>"
                },
                "redeemable": {
                  "instructions": "<any>",
                  "instructionsImageUrl": "<any>",
                  "supportEmail": "<any>",
                  "supportPhoneNumber": "<any>",
                  "supportUrl": "<any>",
                  "type": "<any>",
                  "additionalInformation": "<any>",
                  "redeemByDate": "<any>",
                  "content": "<any>"
                },
                "eventCategory": "achievement",
                "eventSubCategory": "achievement-completion",
                "eventSourceId": "<string>",
                "tags": [
                  "<any>"
                ],
                "campaigns": [
                  "<any>"
                ],
                "metadata": {},
                "claimedAt": "<string>",
                "redeemedAt": "<string>",
                "expiresAt": "<string>",
                "createdAt": "<string>",
                "updatedAt": "<string>",
                "additionalCommunityIds": [
                  "<any>"
                ]
              }
            ]
          }
        ],
        "earnedXp": 1,
        "progressResetsAt": "<string>",
        "type": "sum",
        "isComplete": true,
        "currentValue": 123,
        "targetValue": 123,
        "conditions": [
          {}
        ]
      },
      "stats": {
        "completedCount": 1
      },
      "reward": {
        "points": 1,
        "completionXp": 1,
        "items": [
          {
            "id": "<string>",
            "details": {
              "title": "<string>",
              "description": "<string>",
              "light": {},
              "dark": {}
            },
            "type": "assets",
            "amountToDistribute": 1,
            "totalSupply": 1,
            "remainingSupply": 1
          }
        ],
        "rewardSelectionMethod": "all",
        "numberOfRewardsToReceive": 1,
        "distributionEventId": "<string>"
      }
    }
  ],
  "initialAssetSupply": 1,
  "initialEntrySupply": 1,
  "distributedAssetCount": 1,
  "distributedEntryCount": 1,
  "remainingAssetSupply": 1,
  "remainingEntrySupply": 1,
  "remainingShopAssetSupply": 1,
  "remainingShopEntrySupply": 1,
  "userEntryCount": 0,
  "userAssetCount": 0
}

Authorizations

x-api-token
string
header
required

Headers

x-language
string

The language to return the reward in. If not provided, the default language for the organisation will be used.

Path Parameters

rewardId
string
required

Response

Successful response

A reward

id
string
required

The unique identifier of the reward

organisationId
string
required

The organisation this reward belongs to

communityId
string
required

The community this reward belongs to

additionalCommunityIds
string[]
required

The additional communities this reward is available in

details
object
required

Used to describe an entity

assetPointsPrice
number
required

The points cost to acquire one asset of this reward. Must be > 0 if allocationsType is assets-only or assets-and-entries.

Required range: x >= 0
assetPointsSwapValue
number
required

[Not yet implemented] The points value received when swapping this reward asset back. If 0, asset cannot be swapped.

Required range: x >= 0
entryPointsPrice
number
required

The points cost to acquire one entry for this reward. Must be > 0 if allocationsType is entries-only or assets-and-entries.

Required range: x >= 0
assetsSupply
required

The total supply of assets available for this reward. Must be > 0 if allocationsType is assets-only or assets-and-entries.

Required range: x >= 0
entriesSupply
required

The total supply of entries available for this reward. Must be > 0 if allocationsType is entries-only or assets-and-entries.

Required range: x >= 0
maxAssetsPerUser
required

Maximum number of assets a single user can acquire through any distribution. Must be > 0 if allocationsType is assets-only or assets-and-entries.

Required range: x >= 1
maxEntriesPerUser
required

Maximum number of entries a single user can acquire through any distribution. Must be > 0 if allocationsType is entries-only or assets-and-entries.

Required range: x >= 1
allocationsType
enum<string>
required

The type of allocations for this reward. assets-only means only assets are allocable, entries-only means only entries are allocable, and assets-and-entries means both assets and entries are allocable.

Available options:
assets-only,
entries-only,
assets-and-entries
isSharedAssetsSupply
boolean
required

Whether the assets supply is shared across allocations. If true, the total supply of assets across all allocations will be capped at the value set here. If false, each allocation will use its own supply value.

isSharedEntriesSupply
boolean
required

Whether the entries supply is shared across allocations. If true, the total supply of entries across all allocations will be capped at the value set here. If false, each allocation will use its own supply value.

allocations
RewardAllocation · object[]
required

The allocations configured for this reward

redemptionConfig
object
required

A reward redemption config A reward redemption config rich text

  • RewardRedemptionConfigRichText
  • RewardRedemptionConfigCode
  • Reward Redemption Config Badge
tags
Tag · object[]
required

The tags the reward is linked to

campaigns
Campaign · object[]
required

The campaigns the reward is linked to

status
enum<string>
required

The current status of this reward

Available options:
archived,
draft,
expired,
live,
scheduled
isManualGiveaway
boolean
required

Whether the giveaway should be manual (true) or automatic (false)

availableAsTemplateForOrganisations
string[]
required

The organisations that the reward is available as a template for

isGlobalTemplate
boolean
required

Whether the reward is a global template

metadata
object
required

Additional metadata for the reward

createdAt
string
required

When this reward was created

updatedAt
string
required

When this reward was last updated

challenges
Challenge · object[]
required

Array of challenges associated with this reward

achievements
Achievement · object[]
required

Array of achievements associated with this reward

initialAssetSupply
required

Initial total supply of assets configured for this reward when created

Required range: x >= 0
initialEntrySupply
required

Initial total supply of entries configured for this reward when created

Required range: x >= 0
distributedAssetCount
number
required

Number of assets that have been distributed for this reward

Required range: x >= 0
distributedEntryCount
number
required

Number of entries that have been distributed for this reward

Required range: x >= 0
remainingAssetSupply
required

Number of assets still available for distribution

Required range: x >= 0
remainingEntrySupply
required

Number of entries still available for distribution

Required range: x >= 0
remainingShopAssetSupply
required

Number of assets still available for purchase through the shop

Required range: x >= 0
remainingShopEntrySupply
required

Number of entries still available for purchase through the shop

Required range: x >= 0
userEntryCount
number
default:0
required

Number of entries the current user has for this reward

Required range: x >= 0
userAssetCount
number
default:0
required

Number of assets the current user has for this reward

Required range: x >= 0

Whether this reward is featured

drawsAt
string | null

When this reward giveaway will be drawn

startsAt
string | null

When this reward becomes available

expiresAt
string | null

When this reward expires (or giveaway takes place)

I