API Documentation
VEX REST API v1.0
The VEX API enables developers to integrate our trust and feedback system into their applications.
Base URL
https://api.vex.network/v1
Authentication
All API requests require authentication using an API key:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.vex.network/v1/business/profile
Endpoints
Business Management
Get Business Profile
GET /business/profile
Response:
{
"id": "business_123",
"name": "TechFlow Solutions",
"trustScore": 98,
"reviewCount": 1245,
"verificationStatus": "verified",
"createdAt": "2024-01-15T10:00:00Z"
}
Update Business Information
PUT /business/profile
Request Body:
{
"description": "Updated business description",
"website": "https://example.com",
"categories": ["technology", "software"]
}
Feedback Management
Submit Feedback
POST /feedback/submit
Request Body:
{
"businessId": "business_123",
"rating": 5,
"comment": "Excellent service!",
"transactionId": "txn_456",
"verified": true
}
Response:
{
"feedbackId": "feedback_789",
"status": "pending_verification",
"rewardAmount": 25,
"timestamp": "2024-03-15T14:30:00Z"
}
Get Feedback List
GET /feedback/list?businessId={businessId}&limit={limit}&offset={offset}
Response:
{
"feedback": [
{
"id": "feedback_789",
"userId": "user_456",
"rating": 5,
"comment": "Great experience!",
"verified": true,
"timestamp": "2024-03-15T14:30:00Z"
}
],
"total": 1245,
"hasMore": true
}
Analytics
Get Analytics Dashboard
GET /analytics/dashboard
Response:
{
"period": "last_30_days",
"metrics": {
"averageRating": 4.8,
"totalReviews": 324,
"responseRate": 0.92,
"satisfactionScore": 96
},
"trends": {
"rating": "improving",
"volume": "stable",
"sentiment": "positive"
}
}
Export Reports
POST /analytics/export
Request Body:
{
"format": "csv",
"dateRange": {
"start": "2024-01-01",
"end": "2024-03-31"
},
"metrics": ["reviews", "ratings", "response_times"]
}
User Management
Get User Reputation
GET /users/{userId}/reputation
Response:
{
"userId": "user_456",
"reputationScore": 850,
"level": "expert",
"reviewCount": 234,
"helpfulVotes": 1890,
"badges": ["trusted_reviewer", "early_adopter"]
}
Token Operations
Get Token Balance
GET /tokens/balance
Response:
{
"balance": "5000.00",
"locked": "1000.00",
"available": "4000.00",
"pendingRewards": "250.00"
}
Claim Rewards
POST /tokens/claim
Response:
{
"transactionId": "tx_abc123",
"amount": "250.00",
"status": "processing",
"estimatedTime": "2-5 minutes"
}
Webhooks
Configure webhooks to receive real-time updates:
Available Events
feedback.submitted
feedback.verified
feedback.responded
business.verified
token.rewarded
Webhook Payload
{
"event": "feedback.submitted",
"timestamp": "2024-03-15T14:30:00Z",
"data": {
"feedbackId": "feedback_789",
"businessId": "business_123",
"rating": 5
}
}
Rate Limits
Plan | Requests/Hour | Burst Limit |
---|---|---|
Free | 100 | 10/second |
Standard | 1,000 | 50/second |
Enterprise | 10,000 | 200/second |
Error Handling
Error Response Format
{
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid",
"details": {
"field": "authorization",
"hint": "Check your API key in the dashboard"
}
}
}
Common Error Codes
400
- Bad Request401
- Unauthorized403
- Forbidden404
- Not Found429
- Rate Limited500
- Internal Server Error
SDKs
Official SDKs available for:
Testing
Use our sandbox environment for testing:
https://sandbox.api.vex.network/v1
Test API Key: test_key_abc123xyz