Partner API Endpoints

The Partner APIs provide comprehensive business management tools for loyalty program partners, agencies, and multi-store operations. These endpoints enable advanced analytics, staff management, and white-label solutions.
Partner API endpoints require partner-level authentication and are designed for business management use cases. All endpoints are automatically documented from the OpenAPI specification.

Base URL

  • Staging: https://staging-api.loyalty.lt/{locale}/partners/
  • Production: https://api.loyalty.lt/{locale}/partners/
Where {locale} is the language code (e.g., en, lt).

Partner Management

Core Partner Operations

Direct partner information and management:
  • GET /{locale}/partners/{id} - Get partner details and configuration
  • Partner profile information, settings, and capabilities
  • Integration status and API limits
  • Business verification and compliance status

Customer Management for Partners

Partner-specific customer views and management:
  • GET /{locale}/partners/customers - List customers associated with partner
  • Customer segmentation and analytics
  • Partner-specific customer interactions
  • Cross-store customer tracking

Transaction Management

Partner transaction oversight and analytics:
  • GET /{locale}/partners/transactions - Partner transaction history
  • Multi-store transaction aggregation
  • Revenue and commission tracking
  • Transaction categorization and filtering

Games & Engagement

Partner game management and customization:
  • GET /{locale}/partners/games - Partner-specific games
  • Game performance analytics
  • Custom game configurations
  • Partner branding and themes

Admin Partner Management

Advanced partner management for administrators:

Partner Statistics & Analytics

  • GET /{locale}/admin/partners/stats - System-wide partner statistics
  • Partner performance metrics
  • Revenue and growth analytics
  • Partner tier and status reporting

Commission Management

Automated commission calculation and management:
  • GET /{locale}/admin/partners/{id}/commission/rates - Commission rate configuration
  • POST /{locale}/admin/partners/{id}/commission/force-sync - Force commission sync
  • POST /{locale}/admin/partners/{id}/commission/lock - Lock commission period
  • GET /{locale}/admin/partners/{id}/commission/lock-status - Check lock status
  • POST /{locale}/admin/partners/{id}/commission/unlock - Unlock commission period

Communication Management

Partner communication and support systems:
  • GET /{locale}/admin/partners/{id}/messages - Partner message history
  • POST /{locale}/admin/partners/{id}/send-email - Send email to partner
  • GET /{locale}/admin/partners/{id}/messages/{messageId}/attachment/{attachmentId} - Download message attachments

SMS Account Management

Partner SMS service configuration:
  • GET /{locale}/admin/partners/{id}/sms-accounts - SMS account settings
  • SMS provider configuration
  • Message template management
  • SMS usage analytics

Authentication Methods

Endpoint TypeAuthenticationAccess Level
Partner APIsPartner JWT TokenPartner-specific data
Admin Partner APIsAdmin JWT TokenSystem-wide access
API IntegrationPartner API CredentialsServer-to-server

Partner Authentication

Partners authenticate using their partner portal credentials:
# Partner authentication
curl -X POST "https://staging-api.loyalty.lt/en/partners/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "partner@example.com",
    "password": "secure_password"
  }'

Admin Authentication

System administrators have elevated access:
# Admin authentication for partner management
curl -X GET "https://staging-api.loyalty.lt/en/admin/partners/stats" \
  -H "Authorization: Bearer admin_jwt_token"

Key Features

Multi-Store Operations

  • Centralized Management: Manage multiple store locations from one dashboard
  • Unified Analytics: Aggregated reporting across all locations
  • Staff Management: Role-based access for different store staff
  • Inventory Sync: Coordinated loyalty campaigns across stores

Advanced Analytics

  • Revenue Analytics: Detailed revenue attribution and tracking
  • Customer Insights: Advanced customer behavior analytics
  • Performance Metrics: KPI tracking and benchmarking
  • Predictive Analytics: Customer lifetime value and churn prediction

White-Label Solutions

  • Custom Branding: Partner-specific branding and themes
  • Custom Domains: White-label partner portals
  • API Customization: Partner-specific API configurations
  • Integration Support: Dedicated integration assistance

Enterprise Features

  • Commission Management: Automated commission calculation and payments
  • Compliance Reporting: Regulatory compliance and reporting tools
  • Audit Trails: Complete activity logging and auditing
  • Data Export: Comprehensive data export capabilities

Common Use Cases

Multi-Store Chain Management

Scenario: Restaurant chain with 50+ locations
# Get all partner locations and performance
GET /{locale}/partners/{partnerId}

# View aggregated customer base
GET /{locale}/partners/customers?store_location=all

# Analyze transaction patterns across stores
GET /{locale}/partners/transactions?date_range=last_30_days&group_by=store

Franchise Operations

Scenario: Franchise owner managing multiple franchises
# View franchise-specific analytics
GET /{locale}/admin/partners/{franchiseId}/commission/rates

# Send communication to franchise owners
POST /{locale}/admin/partners/{franchiseId}/send-email

# Monitor franchise performance
GET /{locale}/admin/partners/stats?filter=franchise_network

White-Label Partner Portal

Scenario: Agency providing loyalty solutions to clients
# Configure partner-specific branding
PUT /{locale}/partners/{partnerId}/branding

# Set up custom games and campaigns
GET /{locale}/partners/games?customizable=true

# Export client data for reporting
POST /{locale}/partners/transactions/export?format=csv

Error Handling

Common Partner API errors:
Error CodeDescriptionSolution
PARTNER_NOT_FOUNDPartner ID doesn’t existVerify partner ID
INSUFFICIENT_PARTNER_PERMISSIONSLimited partner accessCheck partner role/permissions
COMMISSION_LOCKEDCommission period is lockedWait for unlock or contact admin
QUOTA_EXCEEDEDPartner API quota exceededUpgrade plan or wait for reset
STORE_ACCESS_DENIEDNo access to specific storeVerify store permissions

Rate Limits

Partner API rate limits are higher than standard Shop APIs:
Authentication TypeRequests/HourBurst LimitNotes
Partner JWT5,000200/minStandard partner access
Admin JWT10,000500/minAdministrative operations
Partner API Credentials8,000300/minServer-to-server integration

Data Export & Import

Export Capabilities

Partners can export comprehensive data for external analysis:
  • Customer Data: Complete customer profiles and preferences
  • Transaction History: Detailed transaction records with metadata
  • Analytics Reports: Pre-built business intelligence reports
  • Commission Reports: Detailed commission calculations and payments

Import Capabilities

  • Customer Migration: Bulk customer import from existing systems
  • Transaction History: Historical transaction data import
  • Product Catalogs: Bulk product and offer imports
  • Staff Data: Employee and permission imports

Next Steps

Partner Access Required: All Partner API endpoints require active partner status and appropriate permissions. Contact support to set up partner access.