Update quest

Update quest in a community

PATCHhttps://api-v2.zealy.io/public/communities/{subdomain}/quests/{questId}
Path parameters
subdomain*string
questId*string
Header parameters
Body

Body

categoryIdstring (uuid)
namestring
publishedboolean
recurrenceenum
dailyweeklymonthlyonce
conditionOperatorenum
ANDOR
retryAfternullable one of
descriptionnullable object
conditionsarray of one of
positionnumber
claimLimitnumber
sprintIdstring (uuid)
rewardsarray of all of
tasksarray of all of
archivedboolean
isAutomaticWhenEmptyboolean
Response

200

Body
id*string (uuid)
name*string
recurrence*enum
dailyweeklymonthlyonce
description*nullable object
retryAfter*nullable number
archived*boolean
published*boolean
communityId*string (uuid)
categoryId*string (uuid)
conditionOperator*enum
ANDOR
conditions*array of one of
rewards*array of one of
tasks*array of all of
claimLimit*number
isAutomaticWhenEmptyboolean
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/quests/{questId}', {
    method: 'PATCH',
    headers: {
      "x-api-key": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "recurrence": "daily",
  "description": {},
  "retryAfter": 0,
  "archived": false,
  "published": false,
  "communityId": "123e4567-e89b-12d3-a456-426614174000",
  "categoryId": "123e4567-e89b-12d3-a456-426614174000",
  "conditionOperator": "AND",
  "conditions": [
    {
      "type": "quest",
      "operator": "isCompleted",
      "value": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "rewards": [
    {
      "type": "xp",
      "value": 0
    }
  ],
  "tasks": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "partnership",
      "settings": {
        "subdomain": "text"
      }
    }
  ],
  "claimLimit": 0,
  "isAutomaticWhenEmpty": true
}

Last updated