Skip to documentation
AdQuestDocs

Reach a target evidence

API type: event. Own-platform only. Your server reports the activity; AdQuest counts it and pays when the goal is met.

On this page

What you do

  1. Find the quest’s activity: the publisher picks it when creating the quest, and GET /server/quests lists it under activity_rules.

  2. Report each matching fact from your server as it happens, with the attributes its activity carries.

  3. That is all. AdQuest settles the quest as soon as the goal is met. There is no complete call and no Claim button.

Report a trade — using reportActivities from Report activities
await reportActivities([
  { id: "trd_9f31", type: "trade.completed", user: externalUserId, occurred_at: Math.floor(Date.now() / 1000) },
]);

How the goal is counted

Goal (metric)CountsEach fact must carry
Do it once (occurrence)One factNothing extra
Number of times (count)Facts, compared with the targetNothing extra
Number of different items (count_distinct)Different entity_id values: one order counts onceentity_id
Total amount (sum)The total of amount_minor, compared with the target in minor unitsamount_minor and currency
Reach a state (state)A state fact with the quest’s value, reached after the startstate, and occurred_at = when it was reached

Who takes part

The quest saysCounting starts
User taps Start (begin)When the participant starts the quest in the widget, or with startQuest(questId).
Starts on its own (auto)When the quest went live, for every user of your platform. Nobody presses anything; the quest list returns it with status in_progress.

The widget shows progress on its own. In your own screens, read it with getGrowthStatus(questId): progress has current and target.

Check before publishing

  • A fact from before the start does not count.
  • Sending the same id twice counts once.
  • A refund sent as a reversal lowers progress until the quest settles.
  • For a state goal, a user who reached the state before the start is not credited.

Next steps

Something unclear, missing or wrong here? Tell us