Beta endpoint examples
POST /api/auth.php?action=register
POST /api/auth.php?action=login
GET /api/auth.php?action=me
POST /api/auth.php?action=create-token
POST /api/auth.php?action=sync-profile
POST /api/activities.php?action=start
POST /api/activities.php
POST /api/activities.php?action=recalculate
POST /api/workouts.php?action=create
POST /api/workouts.php?action=start
POST /api/workouts.php?action=append-step
POST /api/workouts.php?action=save-effort
POST /api/workouts.php?action=upload-samples
POST /api/workouts.php?action=upload-events
POST /api/workouts.php?action=finish
GET /api/workouts.php?action=list
GET /api/workouts.php?action=detail&id=<uuid>
GET /api/messages.php?action=list
GET /api/messages.php?action=thread&conversation_id=<uuid>
POST /api/messages.php?action=send
POST /api/messages.php?action=mark-read
POST /api/messages.php?action=open
POST /api/social.php?action=wallet-transfer
POST /api/social.php?action=create-post
GET /api/social.php?action=feed
GET /api/social.php?action=list-groups
POST /api/social.php?action=create-group
GET /api/strava.php?action=status
GET /api/strava.php?action=connect
POST /api/strava.php?action=import
curl -X POST https://shadou.top/api/activities.php \
-H 'Authorization: Bearer shd_xxx' \
-H 'Content-Type: application/json' \
-d '{
"sport_type":"walk",
"started_at":"2026-04-12T06:00:00Z",
"ended_at":"2026-04-12T06:42:16Z",
"duration_seconds":2536,
"distance_meters":8420,
"step_count":10240,
"source_app":"Partner App",
"source_mode":"immerse",
"profile_sync":{
"display_name":"DenisZ",
"primary_sport":"walk",
"country_code":"SI"
}
}'
The activity ingest endpoint now scores uploads immediately, stores the backend verified scoring version, and in immerse mode can sync profile fields in the same request. For immersive activity social flow, call action=start when recording begins to create the live start post, then upload the completed activity to create the linked completion post. The Android app should show a local Projected Score from SHADOU_ACTIVITY_ALGORITHM.md; the backend Verified Score uses the same formulas after verification.
Workout ingest is now the durable model for ERG, mixed sessions, and future planned training. Use a stable client_workout_id, stable client_step_id for planned steps or repeat groups, stable client_effort_id for actual blocks, and monotonic sample seq values. Finishing a workout links meaningful efforts back to legacy activity rows so existing scoring, feed, and wallet behavior stays compatible.
Walking rules: tracked GPS walking uses 5 SADO / km at 10:00/km before factors. General pedometer-style steps are separate at 1 SADO / 1k steps, capped at 15,000 steps/day. Send step_count when available and use source_mode=general-steps for background daily step sync with a stable external_id per user + UTC day. Same-day background rewards are net of steps already rewarded through tracked activities so the same walking is not paid twice.
For create-post, send a stable client_post_id per submit attempt so double taps and timeout retries return the same post.
Reward policy: manual GPX uploads and Strava imports can still be imported and scored, but Ĺ ADO wallet rewards are only credited for direct ShadoU app uploads received within 24 hours of the activity.