> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learnway.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Badges & On-Chain NFTs

> View user badge progression, track milestone completions, and claim NFT badges on Lisk L2.

# Badges & On-Chain NFTs

LearnWay issues soulbound/transferable NFT badges to recognize user achievements (such as streaks, quiz mastery, course completions, and battle victories).

***

## Get Badge Progress for User

Returns progress metrics across all badge categories for the user.

### Endpoint

```http theme={null}
GET /api/v2/badges/progress/:userId
```

### Headers

```http theme={null}
Authorization: Bearer <jwt_access_token>
```

### Response (200 OK)

```json theme={null}
{
  "success": true,
  "data": [
    {
      "badgeType": "QUIZ_MASTER",
      "name": "Quiz Master Tier 1",
      "description": "Win 10 Quiz Battles",
      "currentProgress": 7,
      "requiredProgress": 10,
      "isCompleted": false,
      "progressPercentage": 70,
      "imageUrl": "https://ik.imagekit.io/learnway/badges/quiz_master.png"
    },
    {
      "badgeType": "SEVEN_DAY_STREAK",
      "name": "Consistency Champion",
      "description": "Maintain a 7-day learning streak",
      "currentProgress": 7,
      "requiredProgress": 7,
      "isCompleted": true,
      "progressPercentage": 100,
      "isMintedOnChain": true,
      "tokenId": "42",
      "contractAddress": "0x1234567890abcdef..."
    }
  ]
}
```

***

## Get Near-Completion Badges

Returns badges where the user has achieved 90%+ of the milestone criteria.

### Endpoint

```http theme={null}
GET /api/v2/badges/near-completion/:userId
```

### Response (200 OK)

```json theme={null}
{
  "success": true,
  "data": [
    {
      "badgeType": "COURSE_EXPLORER",
      "currentProgress": 9,
      "requiredProgress": 10,
      "progressPercentage": 90
    }
  ]
}
```
