Hang Loot Boxes API
The Loot Boxes API from Hang — 4 operation(s) for loot boxes.
The Loot Boxes API from Hang — 4 operation(s) for loot boxes.
swagger: '2.0'
info:
title: Hang Partner API (params in:formData) Activities Loot Boxes API
description: '
<p>The Partner API allows you to request various resources that can power your loyalty program.</p>
© Hang 2023'
version: 2023.09.07
x-copyright: '© Hang 2023'
basePath: /partner-api
schemes:
- https
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
security:
- ApiKeyAuth: []
tags:
- name: Loot Boxes
paths:
/v2/admin/loot-boxes:
get:
tags:
- Loot Boxes
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
operationId: get_v2_admin_loot-boxes
summary: Endpoint to fetch all loot boxes for a program
parameters:
- name: limit
type: number
in: query
default: 50
description: Amount of loot boxes to return (max 100).
- name: offset
type: number
in: query
default: 0
description: Index to start at.
responses:
'200':
description: Successful response
schema:
type: object
properties:
loot_boxes:
type: array
items:
type: object
properties:
id:
type: string
description: Unique identifier for the loot box object.
name:
type: string
description: Name/title of the Lootbox object.
description:
type: string
description: Description of the Lootbox object.
sponsor_name:
type: string
description: Lootbox sponsor name.
sponsor_description:
type: string
description: Lootbox sponsor description.
recurring_interval_minutes:
type: number
description: Interval indicating how often a Lootbox can be granted.
image_box_together_url:
type: string
description: URL of the combined Lootbox image.
background_gradient_start_color:
type: string
description: Hexadecimal color value for the start of the gradient.
background_gradient_stop_color:
type: string
description: Hexadecimal color value for the end of the gradient.
reward_sequence_animation_type:
type: string
enum:
- SHUFFLE
- VIDEO
description: Animation type dictating how a rewarded Lootbox is presented.
is_sign_up_reward:
type: boolean
description: Boolean flag indicating if the Lootbox should be rewarded at signup.
partner_metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a requirement. This can be useful for storing additional information about the quest requirement in a structured format.
created_at:
type: number
description: When the loot box was created, in epoch seconds.
updated_at:
type: number
description: When the loot box was updated, in epoch seconds.
loot_box_reward_choices:
type: array
items:
type: object
properties:
id:
type: string
description: ID for lootbox reward choice.
title:
type: string
description: Title for lootbox reward choice.
subtitle:
type: string
description: Subtitle for lootbox reward choice.
category:
type: string
description: Category for lootbox reward choice.
point_reward_value:
type: number
description: Points for lootbox reward choice.
reward_uuids:
items:
type: string
type: array
description: Reward UUIDs for the loot box reward choice.
quantity:
type: number
description: Max amount of this loot box reward choice to be awarded.
image:
type: string
description: Image for lootbox reward choice.
video:
type: string
description: Video for lootbox reward choice.
probability:
type: number
description: Probability for lootbox reward choice.
current_tier_id:
type: string
description: Program tier this reward choice probability applies to.
rewards:
type: array
items:
type: object
properties:
uuid:
type: string
description: Unique identifier for the Reward object.
name:
type: string
description: Reward name.
description:
type: string
description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
image_url:
type: string
description: An absolute URL of the reward's image.
terms_and_conditions:
type: string
description: Terms and condition for the rewards.
metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a reward. This can be useful for storing additional information about the quest in a structured format.
additionalProperties: false
required:
- uuid
- name
- description
- image_url
- terms_and_conditions
- metadata
additionalProperties: false
required:
- id
- title
- subtitle
- category
- point_reward_value
- reward_uuids
- quantity
- image
- video
- probability
- current_tier_id
- rewards
additionalProperties: false
required:
- id
- name
- description
- sponsor_name
- sponsor_description
- recurring_interval_minutes
- image_box_together_url
- background_gradient_start_color
- background_gradient_stop_color
- reward_sequence_animation_type
- is_sign_up_reward
- partner_metadata
- created_at
- updated_at
- loot_box_reward_choices
total_records:
type: number
additionalProperties: false
required:
- loot_boxes
- total_records
description: ''
post:
tags:
- Loot Boxes
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
operationId: post_v2_admin_loot-boxes
summary: Endpoint to create a loot box
parameters:
- name: description
type: string
in: formData
required: true
description: Description of the Lootbox object.
- name: name
type: string
in: formData
required: true
description: Name/title of the Lootbox object.
- name: sponsor_name
type: string
in: formData
description: Lootbox sponsor name.
- name: sponsor_description
type: string
in: formData
description: Lootbox sponsor description.
- name: recurring_interval_minutes
type: number
in: formData
description: Interval indicating how often a Lootbox can be granted.
- name: image_box_together_url
type: string
in: formData
description: URL of the combined Lootbox image.
- name: background_gradient_start_color
type: string
in: formData
description: Hexadecimal color value for the start of the gradient.
- name: background_gradient_stop_color
type: string
in: formData
description: Hexadecimal color value for the end of the gradient.
- name: reward_sequence_animation_type
type: string
enum:
- SHUFFLE
- VIDEO
in: formData
description: Animation type dictating how a rewarded Lootbox is presented.
- name: is_sign_up_reward
type: boolean
in: formData
description: Boolean flag indicating if the Lootbox should be rewarded at signup.
responses:
'200':
description: Successful response
schema:
type: object
properties:
loot_box:
type: object
properties:
id:
type: string
description: Unique identifier for the loot box object.
name:
type: string
description: Name/title of the Lootbox object.
description:
type: string
description: Description of the Lootbox object.
sponsor_name:
type: string
description: Lootbox sponsor name.
sponsor_description:
type: string
description: Lootbox sponsor description.
recurring_interval_minutes:
type: number
description: Interval indicating how often a Lootbox can be granted.
image_box_together_url:
type: string
description: URL of the combined Lootbox image.
background_gradient_start_color:
type: string
description: Hexadecimal color value for the start of the gradient.
background_gradient_stop_color:
type: string
description: Hexadecimal color value for the end of the gradient.
reward_sequence_animation_type:
type: string
enum:
- SHUFFLE
- VIDEO
description: Animation type dictating how a rewarded Lootbox is presented.
is_sign_up_reward:
type: boolean
description: Boolean flag indicating if the Lootbox should be rewarded at signup.
partner_metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a requirement. This can be useful for storing additional information about the quest requirement in a structured format.
created_at:
type: number
description: When the loot box was created, in epoch seconds.
updated_at:
type: number
description: When the loot box was updated, in epoch seconds.
loot_box_reward_choices:
type: array
items:
type: object
properties:
id:
type: string
description: ID for lootbox reward choice.
title:
type: string
description: Title for lootbox reward choice.
subtitle:
type: string
description: Subtitle for lootbox reward choice.
category:
type: string
description: Category for lootbox reward choice.
point_reward_value:
type: number
description: Points for lootbox reward choice.
reward_uuids:
items:
type: string
type: array
description: Reward UUIDs for the loot box reward choice.
quantity:
type: number
description: Max amount of this loot box reward choice to be awarded.
image:
type: string
description: Image for lootbox reward choice.
video:
type: string
description: Video for lootbox reward choice.
probability:
type: number
description: Probability for lootbox reward choice.
current_tier_id:
type: string
description: Program tier this reward choice probability applies to.
rewards:
type: array
items:
type: object
properties:
uuid:
type: string
description: Unique identifier for the Reward object.
name:
type: string
description: Reward name.
description:
type: string
description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
image_url:
type: string
description: An absolute URL of the reward's image.
terms_and_conditions:
type: string
description: Terms and condition for the rewards.
metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a reward. This can be useful for storing additional information about the quest in a structured format.
additionalProperties: false
required:
- uuid
- name
- description
- image_url
- terms_and_conditions
- metadata
additionalProperties: false
required:
- id
- title
- subtitle
- category
- point_reward_value
- reward_uuids
- quantity
- image
- video
- probability
- current_tier_id
- rewards
additionalProperties: false
required:
- id
- name
- description
- sponsor_name
- sponsor_description
- recurring_interval_minutes
- image_box_together_url
- background_gradient_start_color
- background_gradient_stop_color
- reward_sequence_animation_type
- is_sign_up_reward
- partner_metadata
- created_at
- updated_at
- loot_box_reward_choices
additionalProperties: false
required:
- loot_box
description: ''
/v2/admin/loot-boxes/{loot_box_id}:
get:
tags:
- Loot Boxes
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
operationId: get_v2_admin_loot-boxes_loot_box_id
summary: Get the Loot Box with the given ID.
parameters:
- name: loot_box_id
type: string
in: path
required: true
description: the ID of the Loot Box
responses:
'200':
description: Successful response
schema:
type: object
properties:
loot_box:
type: object
properties:
id:
type: string
description: Unique identifier for the loot box object.
name:
type: string
description: Name/title of the Lootbox object.
description:
type: string
description: Description of the Lootbox object.
sponsor_name:
type: string
description: Lootbox sponsor name.
sponsor_description:
type: string
description: Lootbox sponsor description.
recurring_interval_minutes:
type: number
description: Interval indicating how often a Lootbox can be granted.
image_box_together_url:
type: string
description: URL of the combined Lootbox image.
background_gradient_start_color:
type: string
description: Hexadecimal color value for the start of the gradient.
background_gradient_stop_color:
type: string
description: Hexadecimal color value for the end of the gradient.
reward_sequence_animation_type:
type: string
enum:
- SHUFFLE
- VIDEO
description: Animation type dictating how a rewarded Lootbox is presented.
is_sign_up_reward:
type: boolean
description: Boolean flag indicating if the Lootbox should be rewarded at signup.
partner_metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a requirement. This can be useful for storing additional information about the quest requirement in a structured format.
created_at:
type: number
description: When the loot box was created, in epoch seconds.
updated_at:
type: number
description: When the loot box was updated, in epoch seconds.
loot_box_reward_choices:
type: array
items:
type: object
properties:
id:
type: string
description: ID for lootbox reward choice.
title:
type: string
description: Title for lootbox reward choice.
subtitle:
type: string
description: Subtitle for lootbox reward choice.
category:
type: string
description: Category for lootbox reward choice.
point_reward_value:
type: number
description: Points for lootbox reward choice.
reward_uuids:
items:
type: string
type: array
description: Reward UUIDs for the loot box reward choice.
quantity:
type: number
description: Max amount of this loot box reward choice to be awarded.
image:
type: string
description: Image for lootbox reward choice.
video:
type: string
description: Video for lootbox reward choice.
probability:
type: number
description: Probability for lootbox reward choice.
current_tier_id:
type: string
description: Program tier this reward choice probability applies to.
rewards:
type: array
items:
type: object
properties:
uuid:
type: string
description: Unique identifier for the Reward object.
name:
type: string
description: Reward name.
description:
type: string
description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
image_url:
type: string
description: An absolute URL of the reward's image.
terms_and_conditions:
type: string
description: Terms and condition for the rewards.
metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a reward. This can be useful for storing additional information about the quest in a structured format.
additionalProperties: false
required:
- uuid
- name
- description
- image_url
- terms_and_conditions
- metadata
additionalProperties: false
required:
- id
- title
- subtitle
- category
- point_reward_value
- reward_uuids
- quantity
- image
- video
- probability
- current_tier_id
- rewards
additionalProperties: false
required:
- id
- name
- description
- sponsor_name
- sponsor_description
- recurring_interval_minutes
- image_box_together_url
- background_gradient_start_color
- background_gradient_stop_color
- reward_sequence_animation_type
- is_sign_up_reward
- partner_metadata
- created_at
- updated_at
- loot_box_reward_choices
additionalProperties: false
required:
- loot_box
description: ''
patch:
tags:
- Loot Boxes
consumes:
- application/x-www-form-urlencoded
- multipart/form-data
operationId: patch_v2_admin_loot-boxes_loot_box_id
summary: Updates the lootbox with the provided fields.
parameters:
- name: description
type: string
in: formData
required: true
description: Description of the Lootbox object.
- name: name
type: string
in: formData
required: true
description: Name/title of the Lootbox object.
- name: loot_box_id
type: number
in: path
required: true
- name: sponsor_name
type: string
in: formData
description: Lootbox sponsor name.
- name: sponsor_description
type: string
in: formData
description: Lootbox sponsor description.
- name: recurring_interval_minutes
type: number
in: formData
description: Interval indicating how often a Lootbox can be granted.
- name: image_box_together_url
type: string
in: formData
description: URL of the combined Lootbox image.
- name: background_gradient_start_color
type: string
in: formData
description: Hexadecimal color value for the start of the gradient.
- name: background_gradient_stop_color
type: string
in: formData
description: Hexadecimal color value for the end of the gradient.
- name: reward_sequence_animation_type
type: string
enum:
- SHUFFLE
- VIDEO
in: formData
description: Animation type dictating how a rewarded Lootbox is presented.
- name: is_sign_up_reward
type: boolean
in: formData
description: Boolean flag indicating if the Lootbox should be rewarded at signup.
responses:
'200':
description: Successful response
schema:
type: object
properties:
loot_box:
type: object
properties:
id:
type: string
description: Unique identifier for the loot box object.
name:
type: string
description: Name/title of the Lootbox object.
description:
type: string
description: Description of the Lootbox object.
sponsor_name:
type: string
description: Lootbox sponsor name.
sponsor_description:
type: string
description: Lootbox sponsor description.
recurring_interval_minutes:
type: number
description: Interval indicating how often a Lootbox can be granted.
image_box_together_url:
type: string
description: URL of the combined Lootbox image.
background_gradient_start_color:
type: string
description: Hexadecimal color value for the start of the gradient.
background_gradient_stop_color:
type: string
description: Hexadecimal color value for the end of the gradient.
reward_sequence_animation_type:
type: string
enum:
- SHUFFLE
- VIDEO
description: Animation type dictating how a rewarded Lootbox is presented.
is_sign_up_reward:
type: boolean
description: Boolean flag indicating if the Lootbox should be rewarded at signup.
partner_metadata:
type: object
additionalProperties: true
description: Set of key-value pairs that you can attach to a requirement. This can be useful for storing additional information about the quest requirement in a structured format.
created_at:
type: number
description: When the loot box was created, in epoch seconds.
updated_at:
type: number
description: When the loot box was updated, in epoch seconds.
loot_box_reward_choices:
type: array
items:
type: object
properties:
id:
type: string
description: ID for lootbox reward choice.
title:
type: string
description: Title for lootbox reward choice.
subtitle:
type: string
description: Subtitle for lootbox reward choice.
category:
type: string
description: Category for lootbox reward choice.
point_reward_value:
type: number
description: Points for lootbox reward choice.
reward_uuids:
items:
type: string
type: array
description: Reward UUIDs for the loot box reward choice.
quantity:
type: number
description: Max amount of this loot box reward choice to be awarded.
image:
type: string
description: Image for lootbox reward choice.
video:
type: string
description: Video for lootbox reward choice.
probability:
type: number
description: Probability for lootbox reward choice.
current_tier_id:
type: string
description: Program tier this reward choice probability applies to.
rewards:
type: array
items:
type: object
properties:
uuid:
type: string
description: Unique identifier for the Reward object.
name:
type: string
description: Reward name.
# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hang/refs/heads/main/openapi/hang-loot-boxes-api-openapi.yml