swagger: '2.0' info: title: Hang Partner API (params in:formData) Activities Quests API description: '
The Partner API allows you to request various resources that can power your loyalty program.
© 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: Quests paths: /v2/program-memberships/{program_membership_id}/quests/opt-ins: get: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: get_v2_program-memberships_program_membership_id_quests_opt-ins summary: Endpoint to retrieve all optIns for a program membership parameters: - name: program_membership_id type: string in: path required: true description: the program membership id responses: '200': description: Successful response schema: type: object properties: opt_ins: type: array items: type: object properties: id: type: string description: Unique identifier for the OptIn object. quest_id: type: string description: Unique identifier for the Quest object associated with this OptIn. created_at: type: number description: When the OptIn was created, in epoch seconds. updated_at: type: number description: When the OptIn was updated, in epoch seconds. expires_at: type: number description: When the OptIn expires, in epoch seconds. status: type: string enum: - opted_in - all_requirements_completed - prize_claimed - non_redeemable description: The current status of the OptIn. progress: type: array items: type: object properties: activity_id: type: string description: Unique identifier for the Activity object. value: type: number description: "Count of \"how far along\" the user is, depending on the activity,\n e.g. a value of 4 could represent $4 spent or 4 referrals" updated_at: type: number description: When progress was last made for this activity, in epoch seconds fulfilled_at: type: number description: When the value surpasssed the required amount for the activity, in epoch seconds prize_claimed_at: type: number description: When the prize for the activity was claimed, in epoch seconds additionalProperties: false required: - activity_id - value - updated_at - fulfilled_at - prize_claimed_at additionalProperties: false required: - id - quest_id - created_at - updated_at - expires_at - status - progress additionalProperties: false required: - opt_ins description: OptIns are user initiated and represent the acceptance of a Quest. /v2/admin/quests: get: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: get_v2_admin_quests summary: Get all quests for program. parameters: - name: limit type: number in: query description: Amount of quests to return (max 20). - name: offset type: number in: query description: Index to start at. responses: '200': description: Successful response schema: type: object properties: quests: type: array items: type: string total_records: type: number additionalProperties: false required: - quests - total_records description: '' /v2/program-memberships/{program_membership_id}/quests/{quest_id}/opt-in: post: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: post_v2_program-memberships_program_membership_id_quests_quest_id_opt-in summary: Opt a user into a quest. parameters: - name: program_membership_id type: string in: path required: true description: the user's program membership id - name: quest_id type: string in: path required: true description: the ID for the quest being opted into responses: '200': description: Successful response schema: type: object properties: opt_in: type: object properties: id: type: string description: Unique identifier for the OptIn object. quest_id: type: string description: Unique identifier for the Quest object associated with this OptIn. created_at: type: number description: When the OptIn was created, in epoch seconds. updated_at: type: number description: When the OptIn was updated, in epoch seconds. expires_at: type: number description: When the OptIn expires, in epoch seconds. status: type: string enum: - opted_in - all_requirements_completed - prize_claimed - non_redeemable description: The current status of the OptIn. progress: type: array items: type: object properties: activity_id: type: string description: Unique identifier for the Activity object. value: type: number description: "Count of \"how far along\" the user is, depending on the activity,\n e.g. a value of 4 could represent $4 spent or 4 referrals" updated_at: type: number description: When progress was last made for this activity, in epoch seconds fulfilled_at: type: number description: When the value surpasssed the required amount for the activity, in epoch seconds prize_claimed_at: type: number description: When the prize for the activity was claimed, in epoch seconds additionalProperties: false required: - activity_id - value - updated_at - fulfilled_at - prize_claimed_at additionalProperties: false required: - id - quest_id - created_at - updated_at - expires_at - status - progress additionalProperties: false required: - opt_in description: OptIns are generally user initiated and represent the acceptance of a Quest. /opt-ins/{opt_in_id}/claim-quest-prize: post: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: post_opt-ins_opt_in_id_claim-quest-prize summary: Claim the prize(s) associated with a Quest. parameters: - name: opt_in_id type: string in: path required: true description: the id of the OptIn whose Quest's prize(s) is ready to be claimed. responses: '200': description: Successful response schema: type: object properties: prize: type: object properties: point_reward_value: type: number description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize. sponsor_name: type: string description: Quest sponsor name. lootbox: type: object properties: id: type: string description: Unique identifier for the Lootbox object. name: type: string description: Lootbox name. description: type: string description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users. background_gradient_start_color: type: string background_gradient_stop_color: type: string container_images: type: object properties: box_together: type: string box_top: type: string box_bottom: type: string additionalProperties: false required: - box_together - box_top - box_bottom lootbox_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_uuid: type: string description: Reward UUID for lootbox reward choice. image: type: string description: Image for lootbox reward choice. probability: type: number description: Probability for lootbox reward choice. reward: 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_uuid - image - probability - reward metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format. additionalProperties: false required: - id - name - description - background_gradient_start_color - background_gradient_stop_color - container_images - lootbox_reward_choices - metadata reward: 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. additionalProperties: false required: - uuid - name - description - image_url - terms_and_conditions additionalProperties: false required: - point_reward_value - sponsor_name - lootbox - reward additionalProperties: false required: - prize description: Prizes can exist on both the Quest and Activity levels. Invoke this endpoint to claim the prizes at the Quest level. /opt-ins/{opt_in_id}/claim-activity-prize: post: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: post_opt-ins_opt_in_id_claim-activity-prize summary: Claim the prize(s) associated with an Activity. parameters: - name: activity_id type: string in: formData required: true description: the id of the Activity whose prize(s) you wish to claim - name: opt_in_id type: string in: path required: true description: the id of the OptIn whose Activity's prize(s) is ready to be claimed. responses: '200': description: Successful response schema: type: object properties: prize: type: object properties: point_reward_value: type: number description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize. sponsor_name: type: string description: Quest sponsor name. lootbox: type: object properties: id: type: string description: Unique identifier for the Lootbox object. name: type: string description: Lootbox name. description: type: string description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users. background_gradient_start_color: type: string background_gradient_stop_color: type: string container_images: type: object properties: box_together: type: string box_top: type: string box_bottom: type: string additionalProperties: false required: - box_together - box_top - box_bottom lootbox_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_uuid: type: string description: Reward UUID for lootbox reward choice. image: type: string description: Image for lootbox reward choice. probability: type: number description: Probability for lootbox reward choice. reward: 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_uuid - image - probability - reward metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format. additionalProperties: false required: - id - name - description - background_gradient_start_color - background_gradient_stop_color - container_images - lootbox_reward_choices - metadata reward: 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. additionalProperties: false required: - uuid - name - description - image_url - terms_and_conditions additionalProperties: false required: - point_reward_value - sponsor_name - lootbox - reward additionalProperties: false required: - prize description: Prizes can exist on both the Quest and Activity levels. Invoke this endpoint to claim the prizes at the Activity level. /v2/admin/quests/{quest_id}/quest-requirements: post: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: post_v2_admin_quests_quest_id_quest-requirements summary: Create a new quest requirement. parameters: - name: value_threshold type: number in: formData required: true description: the ActivityType value threshold needed to satisfy the QuestRequirement - name: description type: string in: formData required: true description: a description of the quest requirement - name: activity_type_id type: string in: formData required: true description: the ID of the ActivityType that satisfies the QuestRequirement - name: quest_id type: string in: path required: true description: the ID of the quest having a requirement added - name: prize_point_reward_value type: number in: formData description: the amount of points to reward for completing the QuestRequirement - name: prize_loot_box_id type: string in: formData description: the ID of a lootbox to reward for completing the QuestRequirement - name: prize_nft_loyalty_reward_id type: string in: formData description: the ID of a reward to reward for completing the QuestRequirement - name: auto_claim_prize type: boolean in: formData description: a boolean indicating if the prize should be automatically claimed when the QuestRequirement is completed - name: activity_type_subtypes type: array items: type: string in: formData description: an array of ActivityTypeSubtype IDs that can be used to fulfill the QuestRequirement - name: check_in_interval_days type: number in: formData description: If present, the cadence at which the user must perform the activity (e.g. a value of 3, with a value_threshold of 50 equates to spend $50 every 3 days). - name: cta_text type: string in: formData description: Call to action description text. - name: cta_url type: string in: formData description: Call to action URL. - name: order type: number in: formData description: If present, the order in which the requirement must be completed. - name: restricted_to_ids type: array items: type: string in: formData description: a list containing IDs that are allowed to fulfill the QuestRequirement responses: '200': description: Successful response schema: type: object properties: quest_requirement: type: object properties: id: type: string description: Unique identifier for the QuestRequirement object. quest_id: type: string description: Unique identifier for the Quest object associated with this QuestRequirement. created_at: type: number description: When the QuestRequirement was created, in epoch seconds. description: type: string description: A description of the QuestRequirement. value_threshold: type: string description: The Activity threshold (e.g. a value of 50 dollars spent) that customers need to meet in order to unlock the activity's prize. order: type: number description: If present, the order in which the requirement must be completed. check_in_interval_days: type: number description: If present, the cadence at which the user must perform the activity (e.g. a value of 3, with a value_threshold of 50 equates to spend $50 every 3 days). image_url: type: string description: An absolute URL of the activity's image. prize: type: object properties: point_reward_value: type: number description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize. sponsor_name: type: string description: Quest sponsor name. lootbox: type: object properties: id: type: string description: Unique identifier for the Lootbox object. name: type: string description: Lootbox name. description: type: string description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users. background_gradient_start_color: type: string background_gradient_stop_color: type: string image_box_together_url: type: string 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 metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format. additionalProperties: false required: - id - name - description - background_gradient_start_color - background_gradient_stop_color - image_box_together_url - reward_choices - metadata reward: 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. additionalProperties: false required: - uuid - name - description - image_url - terms_and_conditions additionalProperties: false required: - point_reward_value - sponsor_name - lootbox - reward cta_url: type: string description: Call to action URL. cta_text: type: string description: Call to action description text. restricted_to_ids: items: type: string type: array description: A list of IDs that are allowed to fulfill the requirement. activity_type_id: type: string description: Unique identifier for the ActivityType object associated with this QuestRequirement. activity_type_name: type: string description: Name for the activity required to complete the quest requirement. activity_type_subtypes: items: type: string type: array description: A list of ActivityTypeSubtype IDs that can be used to fulfill the requirement. 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. prize_nft_loyalty_reward_id: type: string description: the ID of a reward to reward for completing the requirement. prize_point_reward_value: type: number description: The amount of points to reward for completing the requirement. prize_loot_box_id: type: string description: The ID of a lootbox to reward for completing the requirement. auto_claim_prize: type: boolean description: A boolean indicating if the prize should be automatically claimed when the requirement is completed. additionalProperties: false required: - id - quest_id - created_at - description - value_threshold - order - check_in_interval_days - image_url - prize - cta_url - cta_text - restricted_to_ids - activity_type_id - activity_type_name - activity_type_subtypes - partner_metadata - prize_nft_loyalty_reward_id - prize_point_reward_value - prize_loot_box_id - auto_claim_prize additionalProperties: false required: - quest_requirement description: Invoke this endpoint to add a new requirement to a quest. /v2/admin/quests/{quest_id}: get: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: get_v2_admin_quests_quest_id summary: Get quest by Id. parameters: - name: quest_id type: string in: path required: true description: The Id of the quest. responses: '200': description: Successful response schema: type: object properties: quest: type: object properties: id: type: string description: The Id of the quest. name: type: string description: The name of the quest. priority: type: number description: The display priority of the quest. description: type: string description: A description of the quest. sponsor_name: type: string description: The name of the quest sponsor. image_url: type: string description: The url of the image for the quest. point_threshold_requirement: type: number description: The threshhold for required number of points. opt_in_text: type: string description: The text to display when opting in to a quest. time_to_complete_minutes: type: number description: The amount of time a user has to complete the quest. starts_at: type: number description: When the quest starts, in epoch seconds. ends_at: type: number description: When the quest ends, in epoch seconds. status: type: string enum: - draft - published - archived description: The status of the quest. max_num_of_completions_per_user: type: number description: The maximum number of times a user can complete the quest. max_num_of_completions_for_program: type: number description: The maximum number of times the quest can be completed for the program. quest_type: type: string description: The type of quest. auto_opt_in_at_signup: type: boolean description: Whether users should be automatically opted in to the quest at sign up. partner_metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a quest. This can be useful for storing additional information about the quest in a structured format. created_at: type: number description: When the quest was created, in epoch seconds. terms_and_conditions: type: string description: The terms and conditions of the quest. auto_claim_prize: type: boolean description: Whether to automatically claim the prize when user completes the quest. enforce_order: type: boolean description: Whether the steps of the quest need to be completed in order. claim_prize_header_text: type: string description: Header text for claiming prize screen. claim_prize_message: type: string description: Message text for claiming prize screen. claim_prize_cta: type: string description: Call to action text for claiming prize remaining_num_of_completions_for_program: type: number description: The number of quest completions remaining for the program. quest_requirements: type: array items: type: string prize: type: object properties: point_reward_value: type: number description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize. sponsor_name: type: string description: Quest sponsor name. lootbox: type: object properties: id: type: string description: Unique identifier for the Lootbox object. name: type: string description: Lootbox name. description: type: string description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users. background_gradient_start_color: type: string background_gradient_stop_color: type: string image_box_together_url: type: string 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 metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format. additionalProperties: false required: - id - name - description - background_gradient_start_color - background_gradient_stop_color - image_box_together_url - reward_choices - metadata reward: 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. additionalProperties: false required: - uuid - name - description - image_url - terms_and_conditions additionalProperties: false required: - point_reward_value - sponsor_name - lootbox - reward additionalProperties: false required: - id additionalProperties: false required: - quest description: '' patch: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: patch_v2_admin_quests_quest_id summary: Updates the quest with the provided fields. parameters: - name: quest_id type: string in: path required: true description: The Id of the quest. - name: name type: string in: formData description: The name of the quest. - name: opt_in_text type: string in: formData description: The text to display when opting in to a quest. - name: quest_type type: string in: formData description: The type of quest. - name: sponsor_name type: string in: formData description: The name of the quest sponsor. - name: starts_at type: number in: formData description: When the quest starts, in epoch seconds. - name: ends_at type: number in: formData description: When the quest ends, in epoch seconds. - name: description type: string in: formData description: A description of the quest. - name: point_threshold_requirement type: number in: formData description: The threshhold for required number of points. - name: max_num_of_completions_per_user type: number in: formData description: The maximum number of times a user can complete the quest. - name: max_num_of_completions_for_program type: number in: formData description: The maximum number of times the quest can be completed for the program. - name: terms_and_conditions type: string in: formData description: The terms and conditions of the quest. - name: auto_opt_in_at_signup type: boolean in: formData description: Whether users should be automatically opted in to the quest at sign up. - name: claim_prize_header_text type: string in: formData description: Header text for claiming prize screen. - name: claim_prize_message type: string in: formData description: Message text for claiming prize screen. - name: claim_prize_cta type: string in: formData description: Call to action text for claiming prize - name: prize_nft_loyalty_reward_id type: string in: formData description: The id of the Loyalty Reward for completing quest. - name: prize_point_reward_value type: number in: formData description: The point value for completing the quest. - name: prize_loot_box_id type: string in: formData description: The id of the Loot Box for completing quest. - name: image_url type: string in: formData description: The url of the image for the quest. - name: status type: string enum: - draft - published - archived in: formData description: The status of the quest. - name: quest_requirements type: array items: type: string in: formData description: An array of quest requirements responses: '200': description: Successful response schema: type: object properties: quest: type: object properties: id: type: string description: The Id of the quest. name: type: string description: The name of the quest. priority: type: number description: The display priority of the quest. description: type: string description: A description of the quest. sponsor_name: type: string description: The name of the quest sponsor. image_url: type: string description: The url of the image for the quest. point_threshold_requirement: type: number description: The threshhold for required number of points. opt_in_text: type: string description: The text to display when opting in to a quest. time_to_complete_minutes: type: number description: The amount of time a user has to complete the quest. starts_at: type: number description: When the quest starts, in epoch seconds. ends_at: type: number description: When the quest ends, in epoch seconds. status: type: string enum: - draft - published - archived description: The status of the quest. max_num_of_completions_per_user: type: number description: The maximum number of times a user can complete the quest. max_num_of_completions_for_program: type: number description: The maximum number of times the quest can be completed for the program. quest_type: type: string description: The type of quest. auto_opt_in_at_signup: type: boolean description: Whether users should be automatically opted in to the quest at sign up. partner_metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a quest. This can be useful for storing additional information about the quest in a structured format. created_at: type: number description: When the quest was created, in epoch seconds. terms_and_conditions: type: string description: The terms and conditions of the quest. auto_claim_prize: type: boolean description: Whether to automatically claim the prize when user completes the quest. enforce_order: type: boolean description: Whether the steps of the quest need to be completed in order. claim_prize_header_text: type: string description: Header text for claiming prize screen. claim_prize_message: type: string description: Message text for claiming prize screen. claim_prize_cta: type: string description: Call to action text for claiming prize remaining_num_of_completions_for_program: type: number description: The number of quest completions remaining for the program. quest_requirements: type: array items: type: string prize: type: object properties: point_reward_value: type: number description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize. sponsor_name: type: string description: Quest sponsor name. lootbox: type: object properties: id: type: string description: Unique identifier for the Lootbox object. name: type: string description: Lootbox name. description: type: string description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users. background_gradient_start_color: type: string background_gradient_stop_color: type: string image_box_together_url: type: string 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 metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format. additionalProperties: false required: - id - name - description - background_gradient_start_color - background_gradient_stop_color - image_box_together_url - reward_choices - metadata reward: 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. additionalProperties: false required: - uuid - name - description - image_url - terms_and_conditions additionalProperties: false required: - point_reward_value - sponsor_name - lootbox - reward additionalProperties: false required: - id additionalProperties: false required: - quest description: 'Quests are a group of activity-thresholds (ordered or unordered) that customers need to meet in order to either unlock rewards/points for each activity-threshold, and/or rewards/points for completing the quest. ' /v2/admin/quest-requirements/{quest_requirement_id}: patch: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: patch_v2_admin_quest-requirements_quest_requirement_id summary: Update a quest requirement. parameters: - name: quest_requirement_id type: string in: path required: true description: The ID of the quest requirement. - name: quest_id type: string in: formData description: The ID of the associated quest. - name: activity_type_id type: string in: formData description: The ID of the activity type that satisfies the quest requirement. - name: description type: string in: formData description: A description of the quest requirement. - name: value_threshold type: number in: formData description: The activity type value threshold needed to satisfy the quest requirement. - name: prize_point_reward_value type: number in: formData description: The amount of points earned by completing the quest requirement. - name: prize_loot_box_id type: string in: formData description: The ID of the lootbox earned by completing the quest requirement. - name: prize_nft_loyalty_reward_id type: string in: formData description: The ID of the reward earned by completing the quest requirement. - name: auto_claim_prize type: boolean in: formData description: A boolean indicating if the prize should automatically be claimed when the quest requirement is completed. - name: activity_type_subtypes type: array items: type: string in: formData description: An array of activity type subtype IDs that can be used to fulfill the quest requirement. - name: check_in_interval_days type: number in: formData description: If present, the cadence at which the user must perform the activity (e.g. a value of 3, with a value_threshold of 50 equates to spend $50 every 3 days). - name: image_url type: string in: formData description: The url of the image for the quest requirement. - name: cta_text type: string in: formData description: Call to action description text. - name: cta_url type: string in: formData description: Call to action URL. - name: order type: number in: formData description: If present, the order in which the requirement must be completed. - name: restricted_to_ids type: array items: type: string in: formData description: A list containing IDs that are allowed to fulfill the quest requirement. responses: '200': description: Successful response schema: type: object properties: quest_requirement: type: object properties: id: type: string description: Unique identifier for the QuestRequirement object. quest_id: type: string description: Unique identifier for the Quest object associated with this QuestRequirement. created_at: type: number description: When the QuestRequirement was created, in epoch seconds. description: type: string description: A description of the QuestRequirement. value_threshold: type: string description: The Activity threshold (e.g. a value of 50 dollars spent) that customers need to meet in order to unlock the activity's prize. order: type: number description: If present, the order in which the requirement must be completed. check_in_interval_days: type: number description: If present, the cadence at which the user must perform the activity (e.g. a value of 3, with a value_threshold of 50 equates to spend $50 every 3 days). image_url: type: string description: An absolute URL of the activity's image. prize: type: object properties: point_reward_value: type: number description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize. sponsor_name: type: string description: Quest sponsor name. lootbox: type: object properties: id: type: string description: Unique identifier for the Lootbox object. name: type: string description: Lootbox name. description: type: string description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users. background_gradient_start_color: type: string background_gradient_stop_color: type: string image_box_together_url: type: string 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 metadata: type: object additionalProperties: true description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format. additionalProperties: false required: - id - name - description - background_gradient_start_color - background_gradient_stop_color - image_box_together_url - reward_choices - metadata reward: 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. additionalProperties: false required: - uuid - name - description - image_url - terms_and_conditions additionalProperties: false required: - point_reward_value - sponsor_name - lootbox - reward cta_url: type: string description: Call to action URL. cta_text: type: string description: Call to action description text. restricted_to_ids: items: type: string type: array description: A list of IDs that are allowed to fulfill the requirement. activity_type_id: type: string description: Unique identifier for the ActivityType object associated with this QuestRequirement. activity_type_name: type: string description: Name for the activity required to complete the quest requirement. activity_type_subtypes: items: type: string type: array description: A list of ActivityTypeSubtype IDs that can be used to fulfill the requirement. 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. prize_nft_loyalty_reward_id: type: string description: the ID of a reward to reward for completing the requirement. prize_point_reward_value: type: number description: The amount of points to reward for completing the requirement. prize_loot_box_id: type: string description: The ID of a lootbox to reward for completing the requirement. auto_claim_prize: type: boolean description: A boolean indicating if the prize should be automatically claimed when the requirement is completed. additionalProperties: false required: - id - quest_id - created_at - description - value_threshold - order - check_in_interval_days - image_url - prize - cta_url - cta_text - restricted_to_ids - activity_type_id - activity_type_name - activity_type_subtypes - partner_metadata - prize_nft_loyalty_reward_id - prize_point_reward_value - prize_loot_box_id - auto_claim_prize additionalProperties: false required: - quest_requirement description: Invoke this endpoint to update a quest requirement. /v2/program-memberships/{program_membership_id}/opt-ins/{opt_in_id}: delete: tags: - Quests consumes: - application/x-www-form-urlencoded - multipart/form-data operationId: delete_v2_program-memberships_program_membership_id_opt-ins_opt_in_id summary: 'ONLY WORKS IN DEV/STAGING: Clear the Quest Status of a given Opt-In ID.' parameters: - name: program_membership_id type: string in: path required: true description: the user's program membership id - name: opt_in_id type: string in: path required: true responses: '200': description: Successful response description: Deletes the Quest Opt In and Quest Activity Aggregates securityDefinitions: ApiKeyAuth: type: apiKey in: header name: X-API-Key