Skip to main content
POST
/
leaderboards
/
{leaderboardConfigId}
/
distribution
Assign distribution details to a leaderboard config
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/{leaderboardConfigId}/distribution \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "rewards": [
    {
      "pointsToDistribute": 1,
      "bonusXpToDistribute": 1,
      "rewardsConfig": {
        "mechanism": "all",
        "amountToDistribute": 1,
        "allocations": [
          {
            "id": "<string>",
            "allocationType": "assets",
            "supply": 1,
            "amountToDistribute": 2,
            "distributed": 1,
            "isLive": true,
            "rewardId": "<string>"
          }
        ]
      },
      "startRank": 123,
      "endRank": 123
    }
  ]
}'
{
  "leaderboardConfigId": "<string>",
  "rewards": [
    {
      "pointsToDistribute": 1,
      "bonusXpToDistribute": 1,
      "rewardsConfig": {
        "mechanism": "all",
        "amountToDistribute": 1,
        "allocations": [
          {
            "id": "<string>",
            "allocationType": "assets",
            "supply": 1,
            "amountToDistribute": 2,
            "distributed": 1,
            "isLive": true,
            "rewardId": "<string>"
          }
        ]
      },
      "startRank": 2,
      "endRank": 2
    }
  ]
}

Authorizations

x-api-token
string
header
required

Path Parameters

leaderboardConfigId
string
required

The id of the leaderboard config

Body

application/json
rewards
object[]
required

Response

Successful response

leaderboardConfigId
string
required

The id of the leaderboard config with assigned distribution details

rewards
object[]
required
I