Overview
The Space API provides access to space information and loyalty points leaderboards.
Core Queries
Get Loyalty Points Rankings
Variables :
Alternative: Direct Rankings Query
Field Reference
Key Fields
LoyaltyPointsRank Fields
Integration Patterns
Basic Leaderboard Query
Sprint-Specific Rankings
To get rankings for a specific sprint period, include the sprintId parameter:
Start with cursorAfter: null
Use pageInfo.endCursor from response as next cursorAfter
Continue until pageInfo.hasNextPage is false
User Position Lookup
No Direct User Lookup : The B2B API does not provide a direct user position lookup field like addressLoyaltyPoints. To find a specific user’s rank, you must paginate through the leaderboard pages.
Search Strategy
Limited Search : Search first 10-20 pages for UI responsiveness
Background Search : Comprehensive search for analytics
Cache Results : Store user positions to reduce future searches
Pagination Required : Use cursorAfter/cursorBefore for efficient traversal
Best Practices
Pagination : Use cursor-based pagination (cursorAfter/cursorBefore)
Rate Limiting : Add 200-500ms delays between pagination requests
Caching : Cache leaderboard data for 30-60 seconds
Search Limits : Limit user searches to reasonable page counts (50-100 pages)
Sprint Context : Use sprintId for time-limited competitions
Common Errors
Next Steps