Skip to main content

Trust Score API

Endpoints for retrieving and understanding Trust Scores.

Get Trust Score

Retrieve a user’s current Trust Score.
curl -X GET "https://api.usmewe.com/v1/trust-score/{userId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Score Breakdown

Component Details

ComponentMax PointsCalculation
seniority12+1 per month of account age
repaymentHistory40+2 per on-time repayment
transactionVolume20log(totalVolume), normalized
socialNetwork15+5 per guardian (max 3)
levelBonus13Based on XP level

Get Score History

Retrieve historical Trust Score data.
curl -X GET "https://api.usmewe.com/v1/trust-score/{userId}/history?period=30d" \
  -H "Authorization: Bearer YOUR_TOKEN"

Period Options

PeriodDescription
7dLast 7 days
30dLast 30 days
90dLast 90 days
1yLast year
allAll time

Calculate Potential Score

Simulate score changes based on actions.
curl -X POST "https://api.usmewe.com/v1/trust-score/simulate" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "actions": [
      {"type": "repayment", "count": 5},
      {"type": "add_guardian", "count": 1}
    ]
  }'

Simulatable Actions

ActionImpact
repayment+2 per on-time repayment
add_guardian+5 per guardian (max 3)
level_upVariable based on level
depositAffects volume score

Get Score Requirements

Get requirements for a specific tier.
curl -X GET "https://api.usmewe.com/v1/trust-score/tiers"

Score Modifiers

Get active modifiers affecting the score.
curl -X GET "https://api.usmewe.com/v1/trust-score/{userId}/modifiers" \
  -H "Authorization: Bearer YOUR_TOKEN"

Modifier Types

TypeImpactDuration
late_payment-5% of scorePermanent
default-30% of scorePermanent
on_time_bonus+1% of scorePer repayment

Webhook Events

Subscribe to Trust Score changes:
{
  "event": "trust_score.updated",
  "data": {
    "userId": "user_abc123",
    "previousScore": 54,
    "newScore": 56,
    "change": 2,
    "reason": "on_time_repayment",
    "timestamp": "2024-01-15T12:00:00Z"
  }
}

Error Responses

CodeErrorDescription
401UNAUTHORIZEDInvalid or missing token
404USER_NOT_FOUNDUser does not exist
403SCORE_PRIVATEUser’s score is not public

Trust Score Overview

Learn how Trust Score works