Back to Home
GLOOOP
API Docs

API Reference

Complete reference for all Glooop Public API endpoints. All endpoints require an API key in the X-API-Key header.

Base URL

https://api.glooop.fun/api/v1/public/v1

All endpoints are prefixed with this base URL.

Deals

GET/deals

Retrieve all active deals with optional filtering and pagination.

Query Parameters

ParameterTypeDescription
categorystringFilter by category (FOOD, FASHION, etc.)
merchantIdstringFilter by merchant ID
minDiscountnumberMinimum discount percentage
maxPricenumberMaximum price in SOL
pagenumberPage number (default: 1)
limitnumberResults per page (default: 10, max: 100)

Example Request

curl -X GET "https://api.glooop.fun/api/v1/public/v1/deals?category=FOOD&minDiscount=30" \
  -H "X-API-Key: glp_sk_YOUR_API_KEY"

Example Response

{
  "success": true,
  "message": "Deals retrieved successfully",
  "data": {
    "deals": [
      {
        "id": "deal_123",
        "title": "50% Off Pizza",
        "description": "Get half off any large pizza",
        "category": "FOOD",
        "discountPercentage": 50,
        "price": 0.05,
        "totalSupply": 100,
        "availableSupply": 75,
        "mintedCount": 25,
        "redeemedCount": 10,
        "merchant": {
          "id": "merchant_456",
          "businessName": "Pizza Palace",
          "walletAddress": "BrGJZh6AaJbRWu9qLVJ8L8vJXzVhqHQRvVLhUg2qPump"
        },
        "expiryDate": "2025-12-31T23:59:59Z",
        "createdAt": "2025-01-15T10:00:00Z",
        "updatedAt": "2025-01-20T14:30:00Z"
      }
    ],
    "total": 15,
    "page": 1,
    "limit": 10,
    "totalPages": 2
  },
  "statusCode": 200
}
GET/deals/:id

Get detailed information about a specific deal.

Path Parameters

id - The unique identifier of the deal

Example Request

curl -X GET "https://api.glooop.fun/api/v1/public/v1/deals/deal_123" \
  -H "X-API-Key: glp_sk_YOUR_API_KEY"
GET/deals/:id/stats

Get statistics and analytics for a specific deal.

Example Response

{
  "success": true,
  "message": "Deal stats retrieved successfully",
  "data": {
    "stats": {
      "totalMinted": 25,
      "totalRedeemed": 10,
      "redemptionRate": 40,
      "averageRating": 4.5,
      "totalReviews": 8,
      "revenue": 1.25,
      "popularityScore": 85
    }
  },
  "statusCode": 200
}

Marketplace

GET/marketplace/listings

Get all active marketplace listings where users are selling their deal NFTs.

Query Parameters

ParameterTypeDescription
dealIdstringFilter by deal ID
minPricenumberMinimum listing price
maxPricenumberMaximum listing price
pagenumberPage number
limitnumberResults per page

Example Response

{
  "success": true,
  "message": "Marketplace listings retrieved successfully",
  "data": {
    "listings": [
      {
        "id": "listing_789",
        "dealNFT": {
          "id": "nft_101",
          "dealId": "deal_123",
          "dealTitle": "50% Off Pizza",
          "tokenId": "ABC123XYZ"
        },
        "seller": {
          "id": "user_202",
          "walletAddress": "9xQeWv..."
        },
        "price": 0.08,
        "status": "ACTIVE",
        "createdAt": "2025-01-18T12:00:00Z"
      }
    ],
    "total": 42,
    "page": 1,
    "limit": 10
  },
  "statusCode": 200
}
GET/marketplace/listings/:id

Get detailed information about a specific marketplace listing.

Merchants

GET/merchants

Get list of all verified merchants on the platform.

Example Response

{
  "success": true,
  "message": "Merchants retrieved successfully",
  "data": {
    "merchants": [
      {
        "id": "merchant_456",
        "businessName": "Pizza Palace",
        "category": "FOOD",
        "walletAddress": "BrGJZh6AaJbRWu9qLVJ8L8vJXzVhqHQRvVLhUg2qPump",
        "verified": true,
        "activeDealsCount": 5,
        "totalSales": 150,
        "rating": 4.7,
        "createdAt": "2025-01-01T00:00:00Z"
      }
    ],
    "total": 23,
    "page": 1,
    "limit": 10
  },
  "statusCode": 200
}
GET/merchants/:id

Get detailed information about a specific merchant, including their deals and statistics.

Platform Statistics

GET/stats

Get platform-wide statistics including total deals, merchants, NFTs minted, and more.

Example Request

curl -X GET "https://api.glooop.fun/api/v1/public/v1/stats" \
  -H "X-API-Key: glp_sk_YOUR_API_KEY"

Example Response

{
  "success": true,
  "message": "Platform stats retrieved successfully",
  "data": {
    "stats": {
      "totalDeals": 156,
      "activeDeals": 89,
      "totalMerchants": 23,
      "verifiedMerchants": 18,
      "totalNFTsMinted": 3420,
      "totalNFTsRedeemed": 1890,
      "totalMarketplaceListings": 42,
      "totalRevenue": 171.5,
      "averageDealPrice": 0.05,
      "topCategory": "FOOD",
      "lastUpdated": "2025-01-28T12:00:00Z"
    }
  },
  "statusCode": 200
}

Error Responses

All error responses follow a consistent format:

401 Unauthorized (Missing/Invalid API Key)

{
  "success": false,
  "message": "API key is required. Please provide a valid API key in the X-API-Key header.",
  "statusCode": 401
}

429 Rate Limit Exceeded

{
  "success": false,
  "message": "Rate limit exceeded. Limit: 100 requests per minute.",
  "statusCode": 429
}

404 Not Found

{
  "success": false,
  "message": "Deal not found",
  "statusCode": 404
}

500 Internal Server Error

{
  "success": false,
  "message": "An unexpected error occurred",
  "statusCode": 500
}