{
  "$schema": "https://www.check-mcc.sg/docs/api-manifest.json",
  "name": "CheckMCC Singapore API",
  "description": "MCC code lookup and credit card rewards eligibility API",
  "base_url": "https://www.check-mcc.sg",
  "version": "1.0",
  "auth": {
    "public": "No authentication required. Rate-limited.",
    "admin": "Requires authenticated session (admin role).",
    "user": "Requires authenticated session."
  },
  "endpoints": [
    {
      "slug": "store-by-domain",
      "method": "GET",
      "path": "/api/store-by-domain",
      "summary": "Get MCC code and credit card eligibility for a domain (e.g., shopee.sg)",
      "auth": "public",
      "params": {
        "domain": { "type": "string", "required": true, "description": "Domain name with or without protocol/www" }
      },
      "example_request": "GET /api/store-by-domain?domain=shopee.sg",
      "example_response": {
        "id": "store-id",
        "Store": "Shopee",
        "MCC": "5311",
        "Country": "Singapore",
        "Category": "Department Stores",
        "type": "online",
        "url": "https://shopee.sg",
        "eligibleCards": [
          { "name": "Citi Rewards Card", "shortName": "CRMC", "eligible": true, "mpd": "4 MPD" }
        ]
      }
    },
    {
      "slug": "mcc-lookup",
      "method": "GET",
      "path": "/api/mcc",
      "summary": "Get MCC code description and card eligibility by code",
      "auth": "public",
      "params": {
        "code": { "type": "string", "required": true, "description": "4-digit MCC code" }
      },
      "example_request": "GET /api/mcc?code=5812",
      "example_response": {
        "code": "5812",
        "description": "Eating Places, Restaurants",
        "cards": [
          { "name": "HSBC Revolution", "shortName": "HSBC_REVO", "eligible": true, "mpd": "4 MPD" }
        ]
      }
    },
    {
      "slug": "merchant-search",
      "method": "GET",
      "path": "/api/merchants/search",
      "summary": "Search merchants by name. Returns MCC code and card eligibility.",
      "auth": "public",
      "params": {
        "q": { "type": "string", "required": true, "description": "Search query (merchant name)" }
      },
      "example_request": "GET /api/merchants/search?q=grab",
      "example_response": [
        {
          "Store": "Grab",
          "MCC": "4121",
          "type": "online",
          "Country": "Singapore"
        }
      ]
    },
    {
      "slug": "mcc-codes",
      "method": "GET",
      "path": "/api/mcc/codes",
      "summary": "List all MCC codes with descriptions",
      "auth": "public",
      "params": {},
      "example_request": "GET /api/mcc/codes",
      "example_response": [
        { "code": "0742", "description": "Veterinary Services" },
        { "code": "5812", "description": "Eating Places, Restaurants" }
      ]
    },
    {
      "slug": "latest-stores",
      "method": "GET",
      "path": "/api/store/latest",
      "summary": "Latest community merchant submissions",
      "auth": "public",
      "params": {
        "limit": { "type": "number", "required": false, "default": 20, "description": "Number of results" }
      },
      "example_request": "GET /api/store/latest?limit=10"
    },
    {
      "slug": "cards",
      "method": "GET",
      "path": "/api/cards",
      "summary": "Credit card rewards data (earn rates, caps, whitelist/blacklist MCCs)",
      "auth": "public",
      "params": {},
      "example_request": "GET /api/cards"
    }
  ],
  "tools": [
    {
      "slug": "mcc-lookup",
      "path": "/mcc",
      "summary": "Search merchants by name, see MCC codes and card eligibility",
      "ssg": true
    },
    {
      "slug": "mcc-code-list",
      "path": "/tools/mcc-code-list",
      "summary": "Full searchable list of all MCC codes",
      "ssg": true
    },
    {
      "slug": "cashback-calculator",
      "path": "/tools/cashback-calculator",
      "summary": "Calculate cashback rewards for spend amounts",
      "ssg": true
    },
    {
      "slug": "points-to-miles",
      "path": "/tools/points-to-miles",
      "summary": "Convert bank rewards points to KrisFlyer, Asia Miles, and Avios",
      "ssg": true
    },
    {
      "slug": "balance-transfer-calculator",
      "path": "/tools/balance-transfer-calculator",
      "summary": "Calculate balance transfer costs and savings",
      "ssg": true
    },
    {
      "slug": "bank-statement-parser",
      "path": "/tools/bank-statement-parser",
      "summary": "Parse bank statements to extract transactions",
      "ssg": false
    },
    {
      "slug": "japan-shinkansen-pass-calculator",
      "path": "/tools/japan-shinkansen-pass-calculator",
      "summary": "Plan Japan rail pass combos for Shinkansen trips",
      "ssg": true
    }
  ]
}
