#
Lootbox API
#
Endpoint list
#
Get lootbox list
Get full list of available lootboxes to open
{}
{
"modpack_id": 1,
// May be omitted. Provide to get next N items.
"last_id": 0,
}
{}
{
"lootboxes": [
// <Lootbox>
],
}
{
"id": 1,
"modpack_id": 1,
// MaxLength=64
"name": "Kaedahara Kazuha",
// Can be empty string
"description": "Increased chance to get Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️. It is 50% now!",
// Can be <=0 for not purchasable
"price": 160,
// gold
// May contain empty string
"currency": "gold",
// May be null
"valid_until": "2022-07-23",
// May be null
"icon": "https://ru-1.s3.cifrazia.com/lootbox/icons/1.png",
// May be null
"banner": "https://ru-1.s3.cifrazia.com/lootbox/banner/1.png",
"prizes": [
// <RecordPrize>
],
// How many prizes to choose from
"choices_show": 9,
// How many prizes user can choose
"choices_select": 3,
// Chance for rare prizes
"tier_2_chance": 25.0,
// Chance for epic prizes
"tier_3_chance": 5.0,
// Chance for legendary prizes
"tier_4_chance": 0.5,
// Max. increased chance for legendary prizes
"tier_4_chance_max": 2.0,
// How many non-legendary prizes it takes to increase legendary chance to max
"tier_4_chance_stop": 45,
// How many -epic prizes it takes to set epic+ chance to 100%
"tier_3_guarantee": 10,
// How many non-legendary prizes it takes to set legendary chance to 100%
"tier_4_guarantee": 50,
// Chance to get rate-up item among legendary ones
"rate_up_chance": 50.0
}
{
// Prize ID in database
"id": 1,
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// Prize ID in database
"id": 3,
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Open lootbox
Open lootbox and get list of prizes to choose from.
If prize list contains rate-up item, it will choose prizes automatically and add them to "chosen_prizes"
list.
{}
{
"server_id": 1,
"lootbox_id": 1,
// UUID4, idempotency token. Use same value to "retry" request.
"r": "abcdef1234567890abcdef1234567890",
}
{}
{
"lootbox": {
// <OpenedLootbox>
}
}
{
"id": 1,
// opened - just opened, no prizes chosen
// chosen - prizes are chosen, but not yet dusted | given
// pending - in process of dusting | giving prizes
// resolved - all prizes were dusted and given
"status": "opened",
"shown_prizes": {
"prizes": [
// List of prizes.
{
// ID is different from LootboxPrize.id in DB
"prize_id": "abcdef1234567890abcdef1234567890",
"rarity": "tier_4",
}
],
},
"chosen_prizes": {
"prizes": [
// <StoredPrize>
],
},
"dusted_prizes": {
"prizes": [
// <StoredPrize>
],
},
"given_prizes": {
"prizes": [
// <StoredPrize>
],
},
"created_at": 123123123.0
}
{
// Prize ID in database
"id": 1,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}",
}
}
{
// Prize ID in database
"id": 3,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
NotFound
- Lootbox has no prizesForbidden
- Insufficient amount of goldInternalServerErrorException
- Server internal fault
#
Choose prize
Once lootbox is opened, user will only see rarity and have to choose which prizes to get.
Here is where it happens.
{}
{
// ID of opened lootbox
"open_id": 1,
// Prize UUIDs user 've chosen
"prize": "abcdef1234567890abcdef1234567890",
}
{}
{
"lootbox": {
// <OpenedLootbox>
}
}
{
"id": 1,
// opened - just opened, no prizes chosen
// chosen - prizes are chosen, but not yet dusted | given
// pending - in process of dusting | giving prizes
// resolved - all prizes were dusted and given
"status": "opened",
"shown_prizes": {
"prizes": [
// List of prizes.
{
// ID is different from LootboxPrize.id in DB
"prize_id": "abcdef1234567890abcdef1234567890",
"rarity": "tier_4",
}
],
},
"chosen_prizes": {
"prizes": [
// <StoredPrize>
],
},
"dusted_prizes": {
"prizes": [
// <StoredPrize>
],
},
"given_prizes": {
"prizes": [
// <StoredPrize>
],
},
"created_at": 123123123.0
}
{
// Prize ID in database
"id": 1,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}",
}
}
{
// Prize ID in database
"id": 3,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Take or Dust prize
Once prizes were chosen, user can now see exactly what they got.
Now is a time to decide whether to dust or take a prize.
{}
{
// ID of opened lootbox
"open_id": 1,
// Prize UUIDs to take or dust
"prize": "abcdef1234567890abcdef1234567890",
// Take - false, Dust - true.
"dust": false,
}
{}
{
"lootbox": {
// <OpenedLootbox>
}
}
{
"id": 1,
// opened - just opened, no prizes chosen
// chosen - prizes are chosen, but not yet dusted | given
// pending - in process of dusting | giving prizes
// resolved - all prizes were dusted and given
"status": "opened",
"shown_prizes": {
"prizes": [
// List of prizes.
{
// ID is different from LootboxPrize.id in DB
"prize_id": "abcdef1234567890abcdef1234567890",
"rarity": "tier_4",
}
],
},
"chosen_prizes": {
"prizes": [
// <StoredPrize>
],
},
"dusted_prizes": {
"prizes": [
// <StoredPrize>
],
},
"given_prizes": {
"prizes": [
// <StoredPrize>
],
},
"created_at": 123123123.0
}
{
// Prize ID in database
"id": 1,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}",
}
}
{
// Prize ID in database
"id": 3,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Get opened lootboxes
If process was interrupted, client may request opened lootboxes, that are in states different from resolved.
{}
{
"server_id": 1,
// May be omitted. Provide to get next N items.
"last_id": 0,
}
{}
{
"lootboxes": [
// <OpenedLootbox>
]
}
{
"id": 1,
// opened - just opened, no prizes chosen
// chosen - prizes are chosen, but not yet dusted | given
// pending - in process of dusting | giving prizes
// resolved - all prizes were dusted and given
"status": "opened",
"shown_prizes": {
"prizes": [
// List of prizes.
{
// ID is different from LootboxPrize.id in DB
"prize_id": "abcdef1234567890abcdef1234567890",
"rarity": "tier_4",
}
],
},
"chosen_prizes": {
"prizes": [
// <StoredPrize>
],
},
"dusted_prizes": {
"prizes": [
// <StoredPrize>
],
},
"given_prizes": {
"prizes": [
// <StoredPrize>
],
},
"created_at": 123123123.0
}
{
// Prize ID in database
"id": 1,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}",
}
}
{
// Prize ID in database
"id": 3,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
// ID of user's prize, used to choose|dust|take prize
"prize_id": "abcdef1234567890abcdef1234567890",
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Select lootboxes
Admin specific request. List entire lootbox list, even those not available or expired.
{}
{
// May be omitted. Provide to filter out only modpack-related lootboxes.
"modpack_id": 1,
// May be omitted. Provide to get next N items.
"last_id": 0,
}
{}
{
"lootboxes": [
// <FullLootbox>
]
}
{
"id": 1,
"modpack_id": 1,
// MaxLength=64
"name": "Kaedahara Kazuha",
// Can be empty string
"description": "Increased chance to get Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️. It is 50% now!",
// Can be <=0 for not purchasable
"price": 160,
// gold
// May contain empty string
"currency": "gold",
// If false, lootbox won't be available for regular users
"available": false,
// May be null
"valid_until": "2022-07-23",
// May be null
"icon": "https://ru-1.s3.cifrazia.com/lootbox/icons/1.png",
// May be null
"banner": "https://ru-1.s3.cifrazia.com/lootbox/banner/1.png",
"prizes": [
// <RecordPrize>
],
// How many prizes to choose from
"choices_show": 9,
// How many prizes user can choose
"choices_select": 3,
// Chance for rare prizes
"tier_2_chance": 25.0,
// Chance for epic prizes
"tier_3_chance": 5.0,
// Chance for legendary prizes
"tier_4_chance": 0.5,
// Max. increased chance for legendary prizes
"tier_4_chance_max": 2.0,
// How many non-legendary prizes it takes to increase legendary chance to max
"tier_4_chance_stop": 45,
// How many -epic prizes it takes to set epic+ chance to 100%
"tier_3_guarantee": 10,
// How many non-legendary prizes it takes to set legendary chance to 100%
"tier_4_guarantee": 50,
// Chance to get rate-up item among legendary ones
"rate_up_chance": 50.0
}
{
// Prize ID in database
"id": 1,
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// Prize ID in database
"id": 3,
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Create lootbox
Admin specific request. Create new lootbox
{}
::code source="../schemes/lootbox/CreateLootbox.json5" :::
{}
{
"lootbox": {
// <FullLootbox>
}
}
{
"id": 1,
"modpack_id": 1,
// MaxLength=64
"name": "Kaedahara Kazuha",
// Can be empty string
"description": "Increased chance to get Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️. It is 50% now!",
// Can be <=0 for not purchasable
"price": 160,
// gold
// May contain empty string
"currency": "gold",
// If false, lootbox won't be available for regular users
"available": false,
// May be null
"valid_until": "2022-07-23",
// May be null
"icon": "https://ru-1.s3.cifrazia.com/lootbox/icons/1.png",
// May be null
"banner": "https://ru-1.s3.cifrazia.com/lootbox/banner/1.png",
"prizes": [
// <RecordPrize>
],
// How many prizes to choose from
"choices_show": 9,
// How many prizes user can choose
"choices_select": 3,
// Chance for rare prizes
"tier_2_chance": 25.0,
// Chance for epic prizes
"tier_3_chance": 5.0,
// Chance for legendary prizes
"tier_4_chance": 0.5,
// Max. increased chance for legendary prizes
"tier_4_chance_max": 2.0,
// How many non-legendary prizes it takes to increase legendary chance to max
"tier_4_chance_stop": 45,
// How many -epic prizes it takes to set epic+ chance to 100%
"tier_3_guarantee": 10,
// How many non-legendary prizes it takes to set legendary chance to 100%
"tier_4_guarantee": 50,
// Chance to get rate-up item among legendary ones
"rate_up_chance": 50.0
}
{
// Prize ID in database
"id": 1,
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// Prize ID in database
"id": 3,
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Edit lootbox
Admin specific request. Patch lootbox. Any field except "id" can be omitted, their values won't change.
{}
{
// ID of a lootbox to be changed
"id": 1,
// ==== Following fields can be omitted
"modpack_id": 1,
"name": "Kaedahara Kazuha",
// Can be empty string
"description": "Increased chance to get Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️. It is 50% now!",
// Can be <=0 for not purchasable
"price": 160,
// gold
// May contain empty string
"currency": "gold",
// If false, lootbox won't be available for regular users
"available": false,
// May be null
"valid_until": "2022-07-23",
// How many prizes to choose from
"choices_show": 9,
// How many prizes user can choose
"choices_select": 3,
// Chance for rare prizes
"tier_2_chance": 25.0,
// Chance for epic prizes
"tier_3_chance": 5.0,
// Chance for legendary prizes
"tier_4_chance": 0.5,
// Max. increased chance for legendary prizes
"tier_4_chance_max": 2.0,
// How many non-legendary prizes it takes to increase legendary chance to max
"tier_4_chance_stop": 45,
// How many -epic prizes it takes to set epic+ chance to 100%
"tier_3_guarantee": 10,
// How many non-legendary prizes it takes to set legendary chance to 100%
"tier_4_guarantee": 50,
// Chance to get rate-up item among legendary ones
"rate_up_chance": 50.0
}
{}
{
"lootbox": {
// <FullLootbox>
}
}
{
"id": 1,
"modpack_id": 1,
// MaxLength=64
"name": "Kaedahara Kazuha",
// Can be empty string
"description": "Increased chance to get Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️. It is 50% now!",
// Can be <=0 for not purchasable
"price": 160,
// gold
// May contain empty string
"currency": "gold",
// If false, lootbox won't be available for regular users
"available": false,
// May be null
"valid_until": "2022-07-23",
// May be null
"icon": "https://ru-1.s3.cifrazia.com/lootbox/icons/1.png",
// May be null
"banner": "https://ru-1.s3.cifrazia.com/lootbox/banner/1.png",
"prizes": [
// <RecordPrize>
],
// How many prizes to choose from
"choices_show": 9,
// How many prizes user can choose
"choices_select": 3,
// Chance for rare prizes
"tier_2_chance": 25.0,
// Chance for epic prizes
"tier_3_chance": 5.0,
// Chance for legendary prizes
"tier_4_chance": 0.5,
// Max. increased chance for legendary prizes
"tier_4_chance_max": 2.0,
// How many non-legendary prizes it takes to increase legendary chance to max
"tier_4_chance_stop": 45,
// How many -epic prizes it takes to set epic+ chance to 100%
"tier_3_guarantee": 10,
// How many non-legendary prizes it takes to set legendary chance to 100%
"tier_4_guarantee": 50,
// Chance to get rate-up item among legendary ones
"rate_up_chance": 50.0
}
{
// Prize ID in database
"id": 1,
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// Prize ID in database
"id": 3,
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Delete lootbox
Admin specific request. Delete lootbox.
Unlike prizes, lootbox itself will be soft-removed, e.g. marked as deleted, but not removed from DB. You can restore it from Admin panel.
{}
{
// Lootbox id
"lootbox_id": 1,
// Sanity check
"delete": true,
}
{}
{
// Always be, except for errors
"ok": true,
}
InternalServerErrorException
- Server internal fault
#
Create lootbox prize
Admin specific request. There are 3 supported prize types and one misc. type:
- Currency: gold; once gained, will be deposited to user's wallet automatically.
- Item: minecraft item; once gained, will be stored in user's stash automatically.
- Role: minecraft role; once gained, will be granted to user automatically.
- Misc.: something else, only server will know; once gained server must handle it manually.
{}
{
"lootbox_id": 1,
// MaxLength=32
"name": "Some cash in ya pocket",
// May be empty string
// MaxLength=512
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
"lootbox_id": 1,
// MaxLength=32
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
// MaxLength=512
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
"lootbox_id": 1,
// MaxLength=32
"name": "Immortal role",
// May be empty string
// MaxLength=512
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
"lootbox_id": 1,
// MaxLength=32
"name": "Something server-side",
// May be empty string
// MaxLength=512
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
{}
{
// Prize ID in database
"id": 1,
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// Prize ID in database
"id": 3,
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Edit lootbox prize
Admin specific request.
{}
{
// ID of lootbox, prize belongs to
"lootbox_id": 1,
// ID of prize to be changed.
"id": 4,
// ==== Following fields can be omitted
// MaxLength=32
"name": "Some cash in ya pocket",
// May be empty string
// MaxLength=512
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
// meta field can be patched, meta values can only be replaced
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// ID of lootbox, prize belongs to
"lootbox_id": 1,
// ID of prize to be changed.
"id": 3,
// ==== Following fields can be omitted
// MaxLength=32
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
// MaxLength=512
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
// meta field can be patched, meta values can only be replaced
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// ID of lootbox, prize belongs to
"lootbox_id": 1,
// ID of prize to be changed.
"id": 1,
// ==== Following fields can be omitted
// MaxLength=32
"name": "Immortal role",
// May be empty string
// MaxLength=512
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
// meta field can be patched, meta values can only be replaced
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// ID of lootbox, prize belongs to
"lootbox_id": 1,
// ID of prize to be changed.
"id": 2,
// ==== Following fields can be omitted
// MaxLength=32
"name": "Something server-side",
// May be empty string
// MaxLength=512
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
// meta field can be patched, meta values can only be replaced
"meta": {}
}
{}
{
// Prize ID in database
"id": 1,
"name": "Some cash in ya pocket",
// May be empty string
"description": "There's a money for ya",
"rate_up": false,
"rarity": "tier_1",
// If <= 0, disable dust
"dust_price": 0,
"prize_type": "currency",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Currency settings
"meta": {
"currency": "gold",
"amount": 20
}
}
{
// Prize ID in database
"id": 4,
"name": "Kaedahara Kazuha 🍃⭐️⭐️⭐️⭐️",
// May be empty string
"description": "Modern super-hero for girls 14+",
"rate_up": true,
"rarity": "tier_4",
// If <= 0, disable dust
"dust_price": 2,
"prize_type": "item",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Minecraft Item data
"meta": {
"id": 0,
"material_name": "genshin:char_kaedahara_kazuha",
"damage": 0,
"count": 1,
// Some custom NBT string
"nbt": "{\"lvl\": 0}"
}
}
{
// Prize ID in database
"id": 3,
"name": "Immortal role",
// May be empty string
"description": "For real adventurers",
"rate_up": false,
"rarity": "tier_3",
// If <= 0, disable dust
"dust_price": 100,
"prize_type": "role",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Role data
"meta": {
"role_id": 2,
"months": 4,
}
}
{
// Prize ID in database
"id": 2,
"name": "Something server-side",
// May be empty string
"description": "Something server should implement support of",
"rate_up": false,
"rarity": "tier_2",
// If <= 0, disable dust
"dust_price": 20,
"prize_type": "other",
// Base64 of PNG | JPG | WEBP, optional, nullable
"icon": "base64 of png|jpg|webp",
// Custom data
"meta": {}
}
InternalServerErrorException
- Server internal fault
#
Delete lootbox prize
Admin specific request.
WARNING! This action ACTUALLY DELETE item from database, this action can not be reverted!
{}
{
// Lootbox ID, where item is bound (sanity check)
"lootbox_id": 1,
// Item ID to delete
"item_id": 2,
// Sanity check
"delete": true,
}
{}
{
// Always be, except for errors.
"ok": true,
}
InternalServerErrorException
- Server internal fault