Promotion System API - Main App
The Promotion System in the Main GraphQL API provides comprehensive functionality for managing and displaying promotional content including promotions, sliders, popups, and video sliders. This unified system allows for flexible content management with multilingual support, user targeting, and dynamic content delivery.
Overview
The promotion system is designed around a central Promotion
entity that can contain multiple content types:
- Promotions: Core promotional offers with detailed information
- Sliders: Image-based promotional content for carousels
- Popups: Modal promotional content with various layouts
- Video Sliders: Video-based promotional content
Key Features
🌍 Multilingual Support
- All text content supports multiple languages through
LanguageKeyVal
objects - Automatic language resolution based on user preferences
- Fallback to English when specific language content is unavailable
🎯 User Targeting
- Access policy-based filtering for different user segments
- Device-specific content (mobile/desktop)
- Geographic targeting support
- User role-based content delivery
🔄 Dynamic Content Resolution
- Real-time translation of multilingual fields
- User-specific button states (logged in/out, claimed/unclaimed)
- Personalized content based on user context
📊 Analytics Integration
- Click tracking and engagement metrics
- User interaction history
- Performance analytics for promotional content
Authentication
All promotion queries use optional authentication, allowing both authenticated and anonymous access:
# Authenticated access provides personalized content
query {
promotions {
data {
id
name
isClaimed # Only available for authenticated users
primaryButton {
text # Shows personalized button text
}
}
}
}
Content Types
Promotions
Core promotional entities with comprehensive metadata, SEO information, and user interaction tracking.
Sliders
Image-based promotional content optimized for carousel displays with configurable actions and targeting.
Popups
Modal promotional content with multiple layout options and user interaction capabilities.
Video Sliders
Video-based promotional content for engaging multimedia experiences.
Query Categories
Content Queries
promotion(slug: String!)
- Get single promotion by slugpromotions(...)
- Get paginated list of promotionssliders(...)
- Get paginated list of slider contentpopups(...)
- Get paginated list of popup contentvideoSliders(...)
- Get paginated list of video slider content
User Interaction
claimBonus(bonusId: String!)
- Claim bonus associated with promotionincreasePromotionClicks(id: String!)
- Track promotion clicks (deprecated)
Response Structure
All content queries return paginated responses with consistent structure:
type PromotionPaginationResponse {
count: Int!
data: [Promotion!]!
limit: Int!
offset: Int!
}
Error Handling
The API uses standard GraphQL error handling with specific error codes for:
- Invalid promotion slugs
- Access policy violations
- Authentication requirements
- Bonus claiming restrictions
Rate Limiting
Promotion queries are optimized for high-frequency access with appropriate caching strategies. No specific rate limits are applied to read operations.
Next Steps
- Operations - Detailed query and mutation documentation