Community Endpoints
Complete reference for NexCommunity endpoints.
Base URL
https://api.govalid.org/api/v1/community/
Community Feed
Get Feed
GET /api/v1/community/feed/
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number |
page_size | integer | Results per page |
filter | string | Filter by type (recent, trending, friends) |
Response
{
"count": 50,
"results": [
{
"id": "post-001",
"type": "qr_shared",
"user": {
"id": 123,
"username": "johndoe",
"avatar": "https://api.govalid.org/media/avatars/123.jpg"
},
"qr_code": {
"id": "abc123",
"title": "Product Certificate",
"trust_score": 85
},
"created_at": "2025-01-29T12:00:00Z"
}
]
}
Trust Votes
Cast Vote
POST /api/v1/community/vote/
Request Body
{
"qr_id": "abc123",
"vote": "trust"
}
Vote values: trust, distrust, neutral
Response
{
"success": true,
"qr_trust_score": 85,
"total_votes": 150
}
Comments
Add Comment
POST /api/v1/community/comments/
Request Body
{
"qr_id": "abc123",
"content": "This certificate looks legitimate!"
}
List Comments
GET /api/v1/community/comments/?qr_id=abc123
Friends
List Friends
GET /api/v1/community/friends/
Send Friend Request
POST /api/v1/community/friends/request/
Request Body
{
"user_id": 456
}
Accept/Reject Friend Request
POST /api/v1/community/friends/{id}/accept/
POST /api/v1/community/friends/{id}/reject/
Badges
List Badges
GET /api/v1/community/badges/
Response
{
"badges": [
{
"id": "early-adopter",
"name": "Early Adopter",
"description": "Joined during beta",
"icon": "https://api.govalid.org/media/badges/early-adopter.png",
"earned": true,
"earned_at": "2024-06-01T00:00:00Z"
},
{
"id": "active-scanner",
"name": "Active Scanner",
"description": "100+ scans",
"icon": "https://api.govalid.org/media/badges/active-scanner.png",
"earned": false,
"progress": 75
}
]
}
Search
Search Community
GET /api/v1/community/search/?q=query
Query Parameters
| Parameter | Type | Description |
|---|---|---|
q | string | Search query |
type | string | Filter by type (users, qr_codes, hubs) |
Companion Images
Upload Companion Image
POST /api/v1/community/companion-images/
Request Body (multipart/form-data)
| Field | Type | Description |
|---|---|---|
qr_id | string | QR code ID |
image | file | Image file |
caption | string | Optional caption |
Related
- NexCommunity Guide - User guide
- QR Endpoints - QR code management
- Authentication - API authentication