GET
/
{locale}
/
shop
/
points
curl -X GET "https://staging-api.loyalty.lt/en/shop/points?page=1&per_page=10&transaction_type=award&date_from=2024-01-01" \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json"
{
  "success": true,
  "message": "Transactions retrieved successfully",
  "data": {
    "data": [
      {
        "id": 12345,
        "transaction_type": "award",
        "points": 50,
        "balance_before": 1200,
        "balance_after": 1250,
        "description": "Purchase at Coffee Paradise",
        "status": "completed",
        "card": {
          "id": 123,
          "card_number": "LC****4567",
          "shop_name": "Coffee Paradise"
        },
        "metadata": {
          "shop_id": 45,
          "order_id": "ORD-2024-001",
          "purchase_amount": 25.99,
          "campaign_id": null
        },
        "created_at": "2024-01-15T14:30:00Z",
        "completed_at": "2024-01-15T14:30:00Z",
        "expires_at": "2025-01-15T23:59:59Z"
      },
      {
        "id": 12344,
        "transaction_type": "redeem",
        "points": -100,
        "balance_before": 1300,
        "balance_after": 1200,
        "description": "€5 discount applied",
        "status": "completed",
        "card": {
          "id": 123,
          "card_number": "LC****4567",
          "shop_name": "Coffee Paradise"
        },
        "metadata": {
          "shop_id": 45,
          "order_id": "ORD-2024-002",
          "purchase_amount": 45.50,
          "campaign_id": null
        },
        "created_at": "2024-01-14T16:20:00Z",
        "completed_at": "2024-01-14T16:20:00Z",
        "expires_at": null
      },
      {
        "id": 12343,
        "transaction_type": "bonus",
        "points": 25,
        "balance_before": 1275,
        "balance_after": 1300,
        "description": "New Year bonus points",
        "status": "completed",
        "card": {
          "id": 123,
          "card_number": "LC****4567",
          "shop_name": "Coffee Paradise"
        },
        "metadata": {
          "shop_id": 45,
          "order_id": null,
          "purchase_amount": null,
          "campaign_id": 15
        },
        "created_at": "2024-01-01T00:00:00Z",
        "completed_at": "2024-01-01T00:00:00Z",
        "expires_at": "2025-01-01T23:59:59Z"
      }
    ],
    "current_page": 1,
    "per_page": 15,
    "total": 87,
    "last_page": 6,
    "summary": {
      "total_awarded": 1250,
      "total_redeemed": 420,
      "net_change": 830,
      "transaction_count": 25
    }
  }
}

Points Transaction History

Retrieve a comprehensive history of all point transactions for the authenticated user, including awards, redemptions, and adjustments. This endpoint provides detailed transaction data with filtering and pagination options.
Transaction history includes both completed and pending transactions, with clear status indicators for each entry.

Path Parameters

locale
string
required
Language code for localized content (e.g., “en”, “lt”)

Query Parameters

page
integer
Page number for pagination (default: 1)
per_page
integer
Number of items per page (default: 15, max: 50)
card_id
integer
Filter transactions for a specific loyalty card
transaction_type
string
Filter by transaction type
  • award - Points awarded
  • redeem - Points redeemed
  • bonus - Promotional bonuses
  • adjustment - Manual adjustments
  • expired - Expired points
date_from
string
Start date filter (ISO 8601 format: YYYY-MM-DD)
date_to
string
End date filter (ISO 8601 format: YYYY-MM-DD)
status
string
Filter by transaction status
  • completed - Finalized transactions
  • pending - Processing transactions
  • cancelled - Cancelled transactions
  • all - All statuses (default)

Response

success
boolean
Indicates if the request was successful
message
string
Human-readable message about the operation
data
object
curl -X GET "https://staging-api.loyalty.lt/en/shop/points?page=1&per_page=10&transaction_type=award&date_from=2024-01-01" \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json"
{
  "success": true,
  "message": "Transactions retrieved successfully",
  "data": {
    "data": [
      {
        "id": 12345,
        "transaction_type": "award",
        "points": 50,
        "balance_before": 1200,
        "balance_after": 1250,
        "description": "Purchase at Coffee Paradise",
        "status": "completed",
        "card": {
          "id": 123,
          "card_number": "LC****4567",
          "shop_name": "Coffee Paradise"
        },
        "metadata": {
          "shop_id": 45,
          "order_id": "ORD-2024-001",
          "purchase_amount": 25.99,
          "campaign_id": null
        },
        "created_at": "2024-01-15T14:30:00Z",
        "completed_at": "2024-01-15T14:30:00Z",
        "expires_at": "2025-01-15T23:59:59Z"
      },
      {
        "id": 12344,
        "transaction_type": "redeem",
        "points": -100,
        "balance_before": 1300,
        "balance_after": 1200,
        "description": "€5 discount applied",
        "status": "completed",
        "card": {
          "id": 123,
          "card_number": "LC****4567",
          "shop_name": "Coffee Paradise"
        },
        "metadata": {
          "shop_id": 45,
          "order_id": "ORD-2024-002",
          "purchase_amount": 45.50,
          "campaign_id": null
        },
        "created_at": "2024-01-14T16:20:00Z",
        "completed_at": "2024-01-14T16:20:00Z",
        "expires_at": null
      },
      {
        "id": 12343,
        "transaction_type": "bonus",
        "points": 25,
        "balance_before": 1275,
        "balance_after": 1300,
        "description": "New Year bonus points",
        "status": "completed",
        "card": {
          "id": 123,
          "card_number": "LC****4567",
          "shop_name": "Coffee Paradise"
        },
        "metadata": {
          "shop_id": 45,
          "order_id": null,
          "purchase_amount": null,
          "campaign_id": 15
        },
        "created_at": "2024-01-01T00:00:00Z",
        "completed_at": "2024-01-01T00:00:00Z",
        "expires_at": "2025-01-01T23:59:59Z"
      }
    ],
    "current_page": 1,
    "per_page": 15,
    "total": 87,
    "last_page": 6,
    "summary": {
      "total_awarded": 1250,
      "total_redeemed": 420,
      "net_change": 830,
      "transaction_count": 25
    }
  }
}

Transaction Types

Different transaction types represent various point activities:

Advanced Filtering

Date Range Queries

// Last 7 days
const lastWeek = {
  date_from: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0],
  date_to: new Date().toISOString().split('T')[0]
};

// Specific month
const january2024 = {
  date_from: '2024-01-01',
  date_to: '2024-01-31'
};

Transaction Type Combinations

// Multiple types (awards and bonuses only)
const positiveTransactions = ['award', 'bonus'];

// Get each type separately for comparison
const awards = await fetch('/en/shop/points?transaction_type=award');
const redemptions = await fetch('/en/shop/points?transaction_type=redeem');

Performance Optimization

// Efficient pagination for large datasets
const transactions = [];
let page = 1;
let hasMore = true;

while (hasMore) {
  const response = await fetch(`/en/shop/points?page=${page}&per_page=50`);
  const data = await response.json();
  
  transactions.push(...data.data.data);
  hasMore = page < data.data.last_page;
  page++;
}

Export and Analytics

Data Export: For large-scale analytics, consider using date-based chunking to retrieve transaction history efficiently while respecting rate limits.

Summary Statistics

The response includes a summary object with aggregated data for the filtered period:
  • Total Awarded: Sum of all positive point transactions
  • Total Redeemed: Sum of all negative point transactions
  • Net Change: Overall points balance change
  • Transaction Count: Number of transactions in results

Business Intelligence

Use transaction data for:
  • 📊 Customer behavior analysis
  • 📈 Redemption pattern tracking
  • 🎯 Campaign effectiveness measurement
  • 💡 Tier progression insights
Real-time Data: Transaction history reflects real-time data. Pending transactions appear with status: "pending" until processing completes.