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

Authorizations

x-api-token
string
header
required

Path Parameters

gameConfigId
string
required

The id of the game config to assign distribution details to

Body

application/json

The input required to assign distribution details to a game config

distributions
object[]
required

Array of distribution configurations (prizes) for the game

Response

Successful response

gameConfigId
string
required

The id of the game config with assigned distribution details

distributions
object[]
required