# Promo

Handler ID Name Auth* 2FA** Description
0x007A UserGetDailyPlaytime Get daily bonus stat for user
0x0080 UserApplyPromo Apply playtime promo code
0x0081 UserGetAppliedPromos Get applied promo codes

# Get Daily playtime

{}
{
  // User UUID
  "uuid": "abcdef1234567890abcdef1234567890",
}
{}
{
  // Goal playtime in seconds
  "goal_time": 18000.0,
  // Goal prize in gold coins
  "goal_bonus": 3,
  // Total playtime seconds for current day
  "playtime": 20.2,
  // true - if daily playtime bonus is given
  "given": false,
}
  • InternalServerErrorException - Server internal fault

# User Apply Promo

{}
{
  // Promo Code (case in-sensitive)
  "code": "Cifrazia23",
}
{}
{
  // true - if applied successfully, otherwise - false
  "result": true
}
  • InternalServerErrorException - Server internal fault

# User Get Applied Promos

{}
{}
{}
{
  "promo_codes": [
    // <UsedPromoCode>
  ]
}
{
  "code": {
    "code": "Cifrazia23",
    "name": "Cifrazia 2023 holidays",
    "description": "Hero role or 300 gold after 72 hours of playtime",
    "server": {
      "id": 1,
      "name": "Fuji",
    },
    // Total playtime in seconds for prize to activate
    // If server wasn't provided, playtime will be calculated from entire project
    "delay": 259200.0,
    "gold_prize": 300,
    "role_prize": {
      // <ComputedRole>
    }
  },
  // true if bonus already given
  "given": false,
  // Played seconds after promo code was applied
  "playtime": 1800.0,
}
{
  "id": 1,
  "code_name": "heaven.hero",
  "display_name": "Hero",
  "description": "hero role",
  "prefix": "",
  "suffix": "",
  "prefix_short": "",
  "suffix_short": "",
  "color": "",
  "icon": "",
  "priority": 10,
  "is_staff": false,
  "price": 199,
  "currency": "gold",
  "inherit_role": {
    // Inherited role
  },
  "perms": [
    // Lite permissions
  ],
  "modpacks": [
    {
      "id": 1,
      "name": "Heaven",
    }
  ],
  "mode": true,
}
  • InternalServerErrorException - Server internal fault