Fasttrack Rewards GraphQL API Documentation
This document provides a complete technical reference for integrating with the Fasttrack Rewards GraphQL API. It covers authentication using JWT tokens, available queries and mutations for accessing and managing rewards, bonuses, challenges, shop items, and user data, as well as real-time subscriptions. Developers can use this guide to understand the schema, build API requests, and implement the rewards features.
🌟 Playground:
Playground: <brand-name>.ft-crm.com/rewards-graphql-api/
🔒 Authentication
To access the API:
- You must pass a JWT token with the following claims:
- iat (Issued At): Unix timestamp
- exp (Expiration): Unix timestamp
- user_id: String or integer
- The JWT must be signed with the JWT-secret provided to Fasttrack.
In the Playground:
- Go to the Headers section.
- Add:
📜 GraphQL Schema Overview
The schema provides root types for:
- Queries
- Mutations
- Subscriptions
🔎 Queries
Query | Return Type | Description |
---|---|---|
Fetch user bonuses. | ||
Get a user calendar by ID. | ||
Retrieve the menu structure. | ||
Get brand configuration settings. | ||
Fetch user profile information. | ||
List challenges for the user. | ||
Retrieve reward program info. | ||
Get a shop page by ID. |
✍️ Mutations
Mutation | Description |
---|---|
Claim a prize from a wheel spin. | |
Spin the reward wheel. | |
Initialize the wheel for spinning. | |
Consume a user bonus. | |
Open a door on a calendar. | |
Purchase an item from the shop. |
🔔 Subscriptions
Real-time updates over WebSocket:
Subscription | Return Type | Description |
---|---|---|
Receive live status updates. |
🧹 Type Definitions
UserBonusV2
BonusV2
📆 Calendar Types
GetUserCalendarByIDRequest:
GetUserCalendarByIDResponse
UserCalendar
CalendarDoor
📋 Menu
GetMenuResponse
MenuItem
⚙️ Configuration
Configuration
🛡️ Other Important Types
Level:
VirtualCurrency:
Branding:
Reward
👤 User
User
LoyaltyBalance
UserWallet
WheelToken
🌟 Challenges
Challenge
Task
ChallengeAppearence
🛒 Shop
GetShopPageByIDResponse
ShopPage
ShopItem
🏆 Wheel & Prizes
Wheel
ClaimWheelPrizeInput
SpinWheelResponse
Prize
PrizeOption
Path
PathPrize
InitializeWheelResponse
UnclaimedPrize
📈 Status Update
StatusUpdate
✅ Notes
- Always use Bearer tokens correctly in authentication headers.
- Fields and types are strictly typed; incorrect input formats may lead to errors.