curl -X GET "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/template/{templateId}/weeks" \
-H "Authorization: Bearer <access_token>"const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/template/{templateId}/weeks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/template/{templateId}/weeks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"templateId": "67f1234567890abcdef1234",
"templateName": "12-week block",
"scheduleMode": "multi_week",
"totalWeeks": 12,
"weeks": [
{
"weekNumber": 1,
"isSkipWeek": false,
"summary": {
"totalDays": 6,
"workouts": 5,
"activities": 7,
"restDays": 1,
"totalTimeMinutes": 240
},
"days": [
{
"weekday": 1,
"isRestDay": false,
"isSkipDay": false,
"itemCount": 3,
"workoutCount": 2,
"activityCount": 1,
"items": [
{
"_id": "67f1234567890abcdef1234",
"type": "workout",
"order": 1,
"name": "Peak Performance",
"planMomentId": "67f1234567890abcdef1234",
"activityType": null,
"targetDistanceMeters": null,
"startTime": "",
"plannedDurationMinutes": 60
}
]
}
]
}
]
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 400,
"key": "request.invalid",
"message": "The request is invalid."
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 403,
"key": "scopes.insufficient",
"message": "The access token does not include the required scope.",
"details": {
"requiredScopes": [
"required:scope"
]
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 404,
"key": "resource.not_found",
"message": "The requested Public API resource was not found."
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 500,
"key": "server.internal_error",
"message": "An unexpected Public API server error occurred."
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}List every week of the client's own multi-week programme (reorder screen)
The “Reorder Weeks” screen: EVERY week of the client’s own multi-week plan, each with its four count chips (days / workouts / activities / rest days) and an expandable day-by-day breakdown. A day lists its scheduled items by name — a workout by its plan-moment name, an activity by its own — plus the type so the row shows the right icon and can open the right screen (a workout carries its planMomentId).
Lightweight on purpose: it returns item NAMES and counts, NOT the full exercises[] each workout holds — that is the per-week detail screen’s job (GET /app/v1/workout/client/library/template/{templateId}/week/{weekNumber}) — so the whole plan’s weeks load in one call.
Only AUTHORED days are returned (schedule.weeks[].days[] is stored sparsely), a rest day included (isRestDay: true, no items). Multi-week only; pinned to the caller’s own ASSIGNED, non-archived plan.
Requires the workout_client_plans:read scope. This operation maps to /app/v1/workout/plans/client/template/:templateId/weeks and retains its Workout V2 permission, feature-flag, and resource-scope checks.
The clientId path parameter identifies the client represented by the request context.
curl -X GET "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/template/{templateId}/weeks" \
-H "Authorization: Bearer <access_token>"const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/template/{templateId}/weeks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/template/{templateId}/weeks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"templateId": "67f1234567890abcdef1234",
"templateName": "12-week block",
"scheduleMode": "multi_week",
"totalWeeks": 12,
"weeks": [
{
"weekNumber": 1,
"isSkipWeek": false,
"summary": {
"totalDays": 6,
"workouts": 5,
"activities": 7,
"restDays": 1,
"totalTimeMinutes": 240
},
"days": [
{
"weekday": 1,
"isRestDay": false,
"isSkipDay": false,
"itemCount": 3,
"workoutCount": 2,
"activityCount": 1,
"items": [
{
"_id": "67f1234567890abcdef1234",
"type": "workout",
"order": 1,
"name": "Peak Performance",
"planMomentId": "67f1234567890abcdef1234",
"activityType": null,
"targetDistanceMeters": null,
"startTime": "",
"plannedDurationMinutes": 60
}
]
}
]
}
]
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 400,
"key": "request.invalid",
"message": "The request is invalid."
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 403,
"key": "scopes.insufficient",
"message": "The access token does not include the required scope.",
"details": {
"requiredScopes": [
"required:scope"
]
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 404,
"key": "resource.not_found",
"message": "The requested Public API resource was not found."
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}{
"error": {
"code": 500,
"key": "server.internal_error",
"message": "An unexpected Public API server error occurred."
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1
}
}
}Authorizations
Public API access token issued by /public/v1/oauth/token. Example: Authorization: Bearer fspt_.... Each resource request rechecks the token company's current provider access. Disabling access blocks existing tokens with 403 auth.provider_unavailable.
Path Parameters
The client's own assigned multi-week calendar plan.
"67f1234567890abcdef1234"
Client in the company bound to the Public API token.
^[a-fA-F0-9]{24}$