Skip to main content
GET
/
achievements
/
{achievementId}
Get achievement by ID
curl --request GET \
  --url https://{subdomain}.nudj.cx/api/v2/integration/achievements/{achievementId} \
  --header 'x-api-token: <api-key>'
{
  "id": "<string>",
  "organisationId": "<string>",
  "communityId": "<string>",
  "details": {
    "title": "<string>",
    "description": "<string>",
    "light": {
      "primaryImageUrl": "<any>",
      "secondaryImageUrl": "<any>"
    },
    "dark": {
      "primaryImageUrl": "<any>",
      "secondaryImageUrl": "<any>"
    }
  },
  "progressPeriod": "daily",
  "displayMode": "default",
  "tags": [
    "<string>"
  ],
  "campaigns": [
    "<string>"
  ],
  "criteria": {
    "type": "sum",
    "parameters": {
      "query": "<string>",
      "operator": "==",
      "attribute": "<string>",
      "value": 123
    }
  },
  "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": "<string>",
          "description": "<string>",
          "light": {
            "primaryImageUrl": "<any>",
            "secondaryImageUrl": "<any>"
          },
          "dark": {
            "primaryImageUrl": "<any>",
            "secondaryImageUrl": "<any>"
          }
        },
        "redeemable": {
          "instructions": "<string>",
          "instructionsImageUrl": "<string>",
          "supportEmail": "jsmith@example.com",
          "supportPhoneNumber": "<string>",
          "supportUrl": "<string>",
          "type": "rich-text",
          "additionalInformation": [
            "<any>"
          ],
          "redeemByDate": "<string>",
          "content": "<string>"
        },
        "eventCategory": "achievement",
        "eventSubCategory": "achievement-completion",
        "eventSourceId": "<string>",
        "tags": [
          "<string>"
        ],
        "campaigns": [
          "<string>"
        ],
        "metadata": {},
        "claimedAt": "<string>",
        "redeemedAt": "<string>",
        "expiresAt": "<string>",
        "createdAt": "<string>",
        "updatedAt": "<string>",
        "additionalCommunityIds": [
          "<string>"
        ]
      }
    ],
    "earnedRewardEntries": [
      {
        "id": "<string>",
        "organisationId": "<string>",
        "communityId": "<string>",
        "rewardId": "<string>",
        "userId": "<string>",
        "rewardAssetIds": [
          "<string>"
        ],
        "details": {
          "title": "<string>",
          "description": "<string>",
          "light": {
            "primaryImageUrl": "<any>",
            "secondaryImageUrl": "<any>"
          },
          "dark": {
            "primaryImageUrl": "<any>",
            "secondaryImageUrl": "<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": "<string>",
              "description": "<string>",
              "light": {
                "primaryImageUrl": "<any>",
                "secondaryImageUrl": "<any>"
              },
              "dark": {
                "primaryImageUrl": "<any>",
                "secondaryImageUrl": "<any>"
              }
            },
            "redeemable": {
              "instructions": "<string>",
              "instructionsImageUrl": "<string>",
              "supportEmail": "jsmith@example.com",
              "supportPhoneNumber": "<string>",
              "supportUrl": "<string>",
              "type": "rich-text",
              "additionalInformation": [
                "<any>"
              ],
              "redeemByDate": "<string>",
              "content": "<string>"
            },
            "eventCategory": "achievement",
            "eventSubCategory": "achievement-completion",
            "eventSourceId": "<string>",
            "tags": [
              "<string>"
            ],
            "campaigns": [
              "<string>"
            ],
            "metadata": {},
            "claimedAt": "<string>",
            "redeemedAt": "<string>",
            "expiresAt": "<string>",
            "createdAt": "<string>",
            "updatedAt": "<string>",
            "additionalCommunityIds": [
              "<string>"
            ]
          }
        ]
      }
    ],
    "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": {
            "primaryImageUrl": "<any>",
            "secondaryImageUrl": "<any>"
          },
          "dark": {
            "primaryImageUrl": "<any>",
            "secondaryImageUrl": "<any>"
          }
        },
        "type": "assets",
        "amountToDistribute": 1,
        "totalSupply": 1,
        "remainingSupply": 1
      }
    ],
    "rewardSelectionMethod": "all",
    "numberOfRewardsToReceive": 1,
    "distributionEventId": "<string>"
  }
}

Authorizations

x-api-token
string
header
required

Headers

x-language
string

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

Path Parameters

achievementId
string
required

Response

Successful response

An achievement

id
string
required

The id of the achievement

organisationId
string
required

The id of the organisation this achievement belongs to

details
object
required

Used to describe an entity

progressPeriod
enum<string>
required

The period over which progress is tracked/reset

Available options:
daily,
weekly,
monthly,
yearly,
open
displayMode
enum<string>
required

The display mode for the achievement. Useful to make the distinction between normal user achievments and achievments designed for implementing custom app functionality.

Available options:
default,
custom
tags
string[]
required

The ids of the tags on the achievement

campaigns
string[]
required

The ids of the campaigns on the achievement

criteria
object
required

This represents a condition that must be met by a user for the achievement to be completed Node that sums values from a specific event attribute and compares against a threshold

  • Sum Condition Node
  • Count Condition Node
  • Logical Condition Node
queries
Event Query Node · object[]
required

The event queries used to measure progress against this achievement's criteria

queryDescriptions
object
required

A map of query alias to user-readable descriptions, useful for displaying in the UI. Can be localised across additional languages.

status
enum<string>
required

The status of the achievement

Available options:
archived,
draft,
expired,
live,
scheduled
availableAsTemplateForOrganisations
string[]
required

The organisations that the achievement is available as a template for

isGlobalTemplate
boolean
required

Whether the achievement is a global template

createdAt
string
required

When this achievement was created

updatedAt
string
required

When this achievement was last updated

userState
object
required

The current user's progress on this achievement A user's progress of a specific achievement criteria node. These can be nested in a tree structure to represent a user's progress of an achievement, and the structure is defined by the achievement's criteria conditions.

stats
object
required

Statistics about this achievement

reward
object
required

A reward distribution for an entity

communityId
string | null

The id of the community this achievement belongs to

Whether the achievement is featured

startsAt
string | null

When this achievement becomes available to the user

expiresAt
string | null

When this achievement expires

I