Quests

Get all quests for program.

GET/partner-api/v2/admin/quests
Query parameters
Response

Successful response

Body
quests*array of string
total_records*number
Request
const response = await fetch('/partner-api/v2/admin/quests', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "quests": [
    "text"
  ],
  "total_records": 0
}

Creates the quest with the provided fields.

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.

POST/partner-api/v2/admin/quests
Body
quest_requirements*array of string

An array of quest requirements

point_threshold_requirement*number

The threshold for required number of points.

description*string

A description of the quest.

ends_at*number

When the quest ends, in epoch seconds.

starts_at*number

When the quest starts, in epoch seconds.

opt_in_text*string

The text to display when opting in to a quest.

name*string

The name of the quest.

prioritynumber

The display priority of the quest.

quest_typestring

The type of quest.

sponsor_namestring

The name of the quest sponsor.

calendar_intervalstring

When the quest cycle ends. Values are daily, weekly, monthly, bimonthly, quarterly, yearly and unset.

max_num_of_completions_per_usernumber

The maximum number of times a user can complete the quest.

max_num_of_completions_for_programnumber

The maximum number of times the quest can be completed for the program.

terms_and_conditionsstring

The terms and conditions of the quest.

auto_opt_in_at_signupboolean

Whether users should be automatically opted in to the quest at sign up.

auto_claim_prizeboolean

Whether users should automatically receive the prize

claim_prize_header_textstring

Header text for claiming prize screen.

claim_prize_messagestring

Message text for claiming prize screen.

claim_prize_ctastring

Call to action text for claiming prize

prize_nft_loyalty_reward_idstring

The id of the Loyalty Reward for completing quest.

prize_point_reward_valuenumber

The point value for completing the quest.

prize_loot_box_idstring

The id of the Loot Box for completing quest.

image_urlstring

The url of the image for the quest.

statusenum

The status of the quest.

draftpublishedarchived
time_to_complete_minutesnumber

The amount of time a user has to complete the quest.

Response

Successful response

Body
quest*object
Request
const response = await fetch('/partner-api/v2/admin/quests', {
    method: 'POST',
    headers: {
      "Content-Type": "multipart/form-data"
    },
    body: JSON.stringify({
      "quest_requirements": [
        "text"
      ],
      "point_threshold_requirement": 0,
      "description": "text",
      "ends_at": 0,
      "starts_at": 0,
      "opt_in_text": "text",
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "quest": {
    "id": "text",
    "name": "text",
    "priority": 0,
    "description": "text",
    "sponsor_name": "text",
    "image_url": "text",
    "point_threshold_requirement": 0,
    "opt_in_text": "text",
    "time_to_complete_minutes": 0,
    "starts_at": 0,
    "ends_at": 0,
    "status": "draft",
    "max_num_of_completions_per_user": 0,
    "max_num_of_completions_for_program": 0,
    "quest_type": "text",
    "auto_opt_in_at_signup": false,
    "created_at": 0,
    "terms_and_conditions": "text",
    "auto_claim_prize": false,
    "enforce_order": false,
    "claim_prize_header_text": "text",
    "claim_prize_message": "text",
    "claim_prize_cta": "text",
    "remaining_num_of_completions_for_program": 0,
    "quest_requirements": [
      "text"
    ],
    "prize": {
      "point_reward_value": 0,
      "sponsor_name": "text",
      "lootbox": {
        "id": "text",
        "name": "text",
        "description": "text",
        "background_gradient_start_color": "text",
        "background_gradient_stop_color": "text",
        "image_box_together_url": "text",
        "reward_choices": [
          {
            "id": "text",
            "title": "text",
            "subtitle": "text",
            "category": "text",
            "point_reward_value": 0,
            "reward_uuids": [
              "text"
            ],
            "quantity": 0,
            "image": "text",
            "video": "text",
            "probability": 0,
            "current_tier_id": "text",
            "rewards": [
              {
                "uuid": "text",
                "name": "text",
                "description": "text",
                "image_url": "text",
                "terms_and_conditions": "text"
              }
            ]
          }
        ]
      },
      "reward": {
        "uuid": "text",
        "name": "text",
        "description": "text",
        "image_url": "text",
        "terms_and_conditions": "text"
      }
    }
  }
}

Get quest by Id.

GET/partner-api/v2/admin/quests/{quest_id}
Path parameters
quest_id*string

The Id of the quest.

Response

Successful response

Body
quest*object
Request
const response = await fetch('/partner-api/v2/admin/quests/{quest_id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "quest": {
    "id": "text",
    "name": "text",
    "priority": 0,
    "description": "text",
    "sponsor_name": "text",
    "image_url": "text",
    "point_threshold_requirement": 0,
    "opt_in_text": "text",
    "time_to_complete_minutes": 0,
    "starts_at": 0,
    "ends_at": 0,
    "status": "draft",
    "max_num_of_completions_per_user": 0,
    "max_num_of_completions_for_program": 0,
    "quest_type": "text",
    "auto_opt_in_at_signup": false,
    "created_at": 0,
    "terms_and_conditions": "text",
    "auto_claim_prize": false,
    "enforce_order": false,
    "claim_prize_header_text": "text",
    "claim_prize_message": "text",
    "claim_prize_cta": "text",
    "remaining_num_of_completions_for_program": 0,
    "quest_requirements": [
      "text"
    ],
    "prize": {
      "point_reward_value": 0,
      "sponsor_name": "text",
      "lootbox": {
        "id": "text",
        "name": "text",
        "description": "text",
        "background_gradient_start_color": "text",
        "background_gradient_stop_color": "text",
        "image_box_together_url": "text",
        "reward_choices": [
          {
            "id": "text",
            "title": "text",
            "subtitle": "text",
            "category": "text",
            "point_reward_value": 0,
            "reward_uuids": [
              "text"
            ],
            "quantity": 0,
            "image": "text",
            "video": "text",
            "probability": 0,
            "current_tier_id": "text",
            "rewards": [
              {
                "uuid": "text",
                "name": "text",
                "description": "text",
                "image_url": "text",
                "terms_and_conditions": "text"
              }
            ]
          }
        ]
      },
      "reward": {
        "uuid": "text",
        "name": "text",
        "description": "text",
        "image_url": "text",
        "terms_and_conditions": "text"
      }
    }
  }
}

Updates the quest with the provided fields.

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.

PATCH/partner-api/v2/admin/quests/{quest_id}
Path parameters
quest_id*string

The Id of the quest.

Body
namestring

The name of the quest.

prioritynumber

The display priority of the quest.

opt_in_textstring

The text to display when opting in to a quest.

quest_typestring

The type of quest.

sponsor_namestring

The name of the quest sponsor.

starts_atnumber

When the quest starts, in epoch seconds.

ends_atnumber

When the quest ends, in epoch seconds.

calendar_intervalstring

When the quest cycle ends. Values are daily, weekly, monthly, bimonthly, quarterly, yearly and unset.

descriptionstring

A description of the quest.

point_threshold_requirementnumber

The threshold for required number of points.

max_num_of_completions_per_usernumber

The maximum number of times a user can complete the quest.

max_num_of_completions_for_programnumber

The maximum number of times the quest can be completed for the program.

terms_and_conditionsstring

The terms and conditions of the quest.

auto_opt_in_at_signupboolean

Whether users should be automatically opted in to the quest at sign up.

auto_claim_prizeboolean

Whether users should automatically receive the prize

claim_prize_header_textstring

Header text for claiming prize screen.

claim_prize_messagestring

Message text for claiming prize screen.

claim_prize_ctastring

Call to action text for claiming prize

prize_nft_loyalty_reward_idstring

The id of the Loyalty Reward for completing quest.

prize_point_reward_valuenumber

The point value for completing the quest.

prize_loot_box_idstring

The id of the Loot Box for completing quest.

image_urlstring

The url of the image for the quest.

statusenum

The status of the quest.

draftpublishedarchived
time_to_complete_minutesnumber

The amount of time a user has to complete the quest.

quest_requirementsarray of string

An array of quest requirements

Response

Successful response

Body
quest*object
Request
const response = await fetch('/partner-api/v2/admin/quests/{quest_id}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "multipart/form-data"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "quest": {
    "id": "text",
    "name": "text",
    "priority": 0,
    "description": "text",
    "sponsor_name": "text",
    "image_url": "text",
    "point_threshold_requirement": 0,
    "opt_in_text": "text",
    "time_to_complete_minutes": 0,
    "starts_at": 0,
    "ends_at": 0,
    "status": "draft",
    "max_num_of_completions_per_user": 0,
    "max_num_of_completions_for_program": 0,
    "quest_type": "text",
    "auto_opt_in_at_signup": false,
    "created_at": 0,
    "terms_and_conditions": "text",
    "auto_claim_prize": false,
    "enforce_order": false,
    "claim_prize_header_text": "text",
    "claim_prize_message": "text",
    "claim_prize_cta": "text",
    "remaining_num_of_completions_for_program": 0,
    "quest_requirements": [
      "text"
    ],
    "prize": {
      "point_reward_value": 0,
      "sponsor_name": "text",
      "lootbox": {
        "id": "text",
        "name": "text",
        "description": "text",
        "background_gradient_start_color": "text",
        "background_gradient_stop_color": "text",
        "image_box_together_url": "text",
        "reward_choices": [
          {
            "id": "text",
            "title": "text",
            "subtitle": "text",
            "category": "text",
            "point_reward_value": 0,
            "reward_uuids": [
              "text"
            ],
            "quantity": 0,
            "image": "text",
            "video": "text",
            "probability": 0,
            "current_tier_id": "text",
            "rewards": [
              {
                "uuid": "text",
                "name": "text",
                "description": "text",
                "image_url": "text",
                "terms_and_conditions": "text"
              }
            ]
          }
        ]
      },
      "reward": {
        "uuid": "text",
        "name": "text",
        "description": "text",
        "image_url": "text",
        "terms_and_conditions": "text"
      }
    }
  }
}