What you get from us
- Base URL (staging) and a Quest API key (
x-api-key
, starts withsk_
). - A Quest ID that you will allocate from.
- A small pack of staging FuturePass addresses:
- one (or more) with a RootRewards account — for success cases
- one without a RootRewards account — for error handling
Happy‑path test (allocate + verify)
1) Allocate points to a FuturePass
Endpoint2) Verify the allocation
Use the quest detail endpoint to confirm your payout is recorded. Endpoint- The latest
payouts[]
entry shows the address and amount you sent. points_remaining
reflects deductions across allocations.
Negative tests (recommended)
Use the same endpoints to validate error handling:Case | How to test | Expected status |
---|---|---|
Account not found | Allocate to the “no RR account” test address | 400 |
Quest not active | Allocate outside the quest’s start /end window | 400 |
Insufficient points | Allocate more than points_remaining | 400 |
Unauthorized | Omit or change x-api-key | 401 |
Quest not found | Use an invalid {questId} | 404 |
Public discovery endpoints (optional)
These are handy if you’re building a directory or UX around quests/campaigns:Get Public Quests
- Optional:
owner={passAddress}
- No API key required
Get Campaign Details
- No API key required
Test data & environment notes
- We’ll provide staging API access and addresses; builders don’t need admin or UI access to run API tests.
- At this stage, builders can’t self‑serve create quests on staging; testing is focused on the API routes only.
- Feature flags control visibility on the user front‑end, while the admin dashboard is not flag‑gated. API testing does not depend on these flags.
Acceptance criteria (for a successful integration)
- ✅
POST /quests/{questId}
returns200
with apayout
object for the happy‑path address. - ✅
GET /quests/{questId}
shows the payout (correctaddress
,amount
,created_at
). - ✅ Documented error cases return expected status codes (
400/401/404
) when triggered intentionally. - ✅ Production keys are never exposed in client code; all calls are made from trusted servers.
cURL snippets (copy/paste)
ReplaceAllocate{BASE_URL}
,{QUEST_ID}
,{API_KEY}
,{ADDR}
.