Quick Start Guide
This guide will help you integrate with Loyalty.lt APIs and start building loyalty features into your application within minutes.Prerequisites
Before you begin, ensure you have:
- A Loyalty.lt partner account
- API credentials (API Key and Secret)
- Basic knowledge of REST APIs
Step 1: Choose Your Integration Path
Select the most appropriate API layer for your needs:Best for: Direct store integration, simple loyalty features
- Basic loyalty card management
- Points earning and redemption
- Offer creation and redemption
- Customer management
https://staging-api.loyalty.lt/api/
Step 2: Authentication Setup
All Loyalty.lt APIs use API credentials for authentication. You’ll need both an API Key and API Secret.1
Get your credentials
Visit the Partners Portal and navigate to API settings to generate your credentials.
Keep your API credentials secure. Never expose them in client-side code.
2
Test authentication
Make a test request to verify your credentials work:
cURL
You should receive a
200 OK
response with system status information.Step 3: Make Your First API Call
Let’s create a simple loyalty card to test the integration:Step 4: Award Points
Now let’s award some points to the loyalty card we just created:Step 5: Check Points Balance
Verify the points were awarded correctly:Next Steps
Explore Shop APIs
Learn about all available shop API endpoints for loyalty card management.
SDK Integration
Use our SDKs for easier integration with built-in error handling and utilities.
Partner Portal
Set up analytics dashboards and manage multiple shops.
E-commerce Plugins
Integrate with popular e-commerce platforms using our plugins.
Common Integration Patterns
E-commerce Store Integration
E-commerce Store Integration
Use case: Add loyalty features to an online store
- Customer Registration: Create loyalty cards when customers sign up
- Purchase Rewards: Award points for each purchase based on amount spent
- Redemption: Allow customers to redeem points for discounts or rewards
- Offers: Create targeted offers based on customer behavior
Mobile App Integration
Mobile App Integration
Use case: Build loyalty features into a mobile app
- SDK Authentication: Use JWT tokens for secure API access
- Real-time Updates: WebSocket connections for live point updates
- Gamification: Integrate games and challenges
- Push Notifications: Notify users of new offers and rewards
Multi-location Business
Multi-location Business
Use case: Manage loyalty across multiple store locations
- Partner Account: Set up partner-level management
- Multiple Shops: Create separate shops for each location
- Unified Cards: Customers can use cards across all locations
- Centralized Analytics: View performance across all locations
Error Handling
Always implement proper error handling in your integration. All API endpoints return standardized error responses.
Common HTTP Status Codes
Status | Description | Action |
---|---|---|
200 | Success | Continue processing |
400 | Bad Request | Check request parameters |
401 | Unauthorized | Verify API credentials |
403 | Forbidden | Check permissions |
429 | Rate Limited | Implement retry logic |
500 | Server Error | Contact support |
Error Response Format
Rate Limiting
All API endpoints are subject to rate limiting. Monitor the response headers for rate limit information.
Rate Limit Headers
Handling Rate Limits
Implement exponential backoff when you receive a429
status code:
Need Help?
If you encounter any issues during integration, our support team is here to help.
- Documentation: API Reference
- Email Support: support@loyalty.lt
- Partner Portal: partners.loyalty.lt
- GitHub Issues: github.com/loyalty-lt