Walk15 Connect V1
Activity data
Forward-only access, calendar dates, steps and cycling semantics, pagination and corrections.
This guide explains what the activity endpoints return and how to keep a correct copy on your side.
Fetch GET /connect-walk15/v1/summary for a complete day-by-day view and GET /connect-walk15/v1/activities for paginated rides. Summary omits unauthorized fields, fills eligible empty days with zero or [], and reads authorized data from one snapshot. One request consumes one shared budget unit.
Forward-only access
A new connection can read data from the user's authorization calendar day onward, never before it.
- The access start date is returned as
history_fromin every token response and shown to the user on the consent screen. - It is the whole calendar day: activity recorded earlier that day, before the user approved, is included.
- The day is determined in the timezone last stored on the user's Walk15 account (UTC if none is known).
- There is no historical backfill. Requesting any earlier date returns
400 invalid_date_range; ranges are rejected, not trimmed. - Reads use a rolling 31-day lookback:
frommay be at most 30 days before today in UTC. Older dates return400 invalid_date_rangeeven while the connection is authorized, so store what you need.
| Event | history_from |
|---|---|
| Token refresh | Unchanged |
| Re-authorization with the same scopes while still connected | Unchanged |
| Re-authorization after the connection expired through inactivity (not revoked) | Unchanged |
| Disconnect, then reconnect | New: the reconnection day. Earlier dates, including ones you could read before, are no longer accessible. |
Calendar dates
Summary dates combine two calendars:
- Steps use the date Walk15 recorded for the daily total. Connect does not re-bucket them by timezone.
- Cycling uses the UTC date of each trustworthy
started_atinstant. A ride that crosses midnight counts entirely on its UTC start date./activitiesreportsdate_basis: "utc".
Request rules for both activity endpoints:
fromandtoare required, real calendar dates inYYYY-MM-DDform, withfrom≤to.- At most 31 dates per request (
tomay be at most 30 days afterfrom). frommay not precedehistory_fromor be more than 30 days before today in UTC (rolling 31-day lookback).tomay not be later than tomorrow in UTC, so users ahead of UTC can be queried for their current local day.
Dates older than the lookback cannot be read; keep your own copy of anything you need longer.
Steps
summary.days returns one row for every eligible requested date:
stepsis the adjusted Walk15 daily total: the recorded total plus any correction applied by Walk15 support, floored at zero. It is not a raw wearable reading.walking_activity_minutesisround(steps / 100). For example, 9,750 steps is 98 minutes.- A date with no recorded steps returns
steps: 0andwalking_activity_minutes: 0when the scope is authorized.
Cycling activities
summary.days[].cycling_activities | activities.data | |
|---|---|---|
| Granularity | Rides grouped by UTC start date | Individual rides |
| Fields | ID, UTC start/end, kilometres, elapsed minutes | Same ride mapping |
| Pagination | No (at most 31 days) | Cursor, up to 500 rides per page |
A day without qualifying rides has cycling_activities: [] when the scope is authorized. Ride distance is distance_km; 18.24 means 18.24 km.
Connect includes cycling activities imported from linked providers, excluding manually entered rides. Both start and end times must have verified UTC timestamps. Eligible earlier rides remain available after the user changes providers, subject to the access window. Legacy activities with unverified timezones are omitted from Connect but remain stored in Walk15.
Timestamps
| Field | Meaning |
|---|---|
started_at, ended_at | Trustworthy UTC instants with six fractional digits (microseconds) and a Z suffix. Rides without both reliable timestamps are omitted. |
cycling_activity_minutes | Elapsed start-to-end duration rounded to the nearest whole minute; pauses are included. |
meta.snapshot_at | When Walk15 generated an activities response (UTC). It is retrieval time, not when the user's device synced. |
Empty results
Summary returns every eligible requested date with zero or an empty ride array for missing authorized data. Activities may return data: []. Neither proves the user was inactive; data may not have synced. Errors are non-2xx responses and must not be treated as an empty or deleted result.
Corrections and deletions
Walk15 data can change after you first read it: late syncs, support corrections, deleted activities, or records moved to another date. Connect has no change feed and no deletion tombstones, so keep your copy correct by replacing snapshots:
- Fetch the date window with
/summary. Each request reads all authorized data from one consistent snapshot. - Only after the entire fetch succeeds, replace only the authorized datasets whose fields are present, for exactly those dates in one transaction. Zero step values and
cycling_activities: []replace stored data. Remove absent ride IDs only whencycling_activitiesis included; if it is omitted, leave stored rides unchanged. - If any request fails, keep all previous data unchanged. Retry only documented transient errors (
429,5xx, or network errors) and a401 invalid_access_tokenonce after refreshing the access token, following the retry and authentication guidance. Correct permanent request errors such as400 invalid_date_rangeinstead of retrying the same request unchanged. Split eligible windows into requests of at most 31 dates. Retain successful chunks without applying replacements until every request for the full window succeeds, then apply step 2 to the full window in one transaction. This makes the local replacement atomic; separate requests do not share a server snapshot.
Run every fetch and write for a user, including /activities upserts, under the same shared per-user lock the webhook worker uses, from the first request through the final write, so an overlapping poll or webhook cannot replace newer data with an older snapshot. Inside the lock, get tokens with getAccessTokenLocked; getAccessToken takes the lock itself.
Do not delete missing rides based on a paginated /activities traversal. Pages read live data: an insertion or correction behind the cursor can be missed even when next_cursor becomes null. Use those pages for upserts, and /summary for deletion reconciliation.
If you use webhooks, activity.updated tells you which date to re-fetch. If you poll, re-read the recent windows where changes are likely. Both are valid choices.
Pagination
activities returns at most limit activities (default 100, maximum 500), ordered by UTC start time. When more exist, meta.next_cursor is set:
- Send the cursor unchanged with the same
from,toandlimit. - Cursors are opaque, bound to your connection version and the query, and expire 15 minutes after the first page. Do not store, decode or log them.
- A refresh does not invalidate an in-progress traversal; a new connection version does.
- On
400 invalid_cursor, restart the window from the first page. - Pages reflect live data. Upsert activities by
id;next_cursor: nullends traversal but does not prove a complete snapshot. Never infer deletion from a missing ride; reconcile with/summary.
TypeScript client
A small client for summary and activities with cursor traversal and Retry-After handling:
import { Walk15Error, type Walk15Config } from "./walk15-config";
type Meta = { from: string; to: string; date_basis: "utc"; snapshot_at: string };
export type CyclingActivity = {
id: string;
started_at: string;
ended_at: string;
distance_km: number;
cycling_activity_minutes: number;
};
export type CyclingActivities = {
data: CyclingActivity[];
meta: Meta & { time_basis: "utc"; next_cursor: string | null };
};
export type Summary = {
start_date: string;
end_date: string;
days: { date: string; steps?: number; walking_activity_minutes?: number; cycling_activities?: CyclingActivity[] }[];
};
type Responses = { summary: Summary; activities: CyclingActivities };
export type Metric = keyof Responses;
export const getActivity = async <M extends Metric>(
config: Walk15Config,
accessToken: string,
metric: M,
query: { from: string; to: string; limit?: string; cursor?: string },
): Promise<Responses[M]> => {
const url = new URL(`/connect-walk15/v1/${metric}`, config.issuer);
const params = new URLSearchParams();
for (const [key, value] of Object.entries(query)) {
if (value !== undefined) params.set(key, value);
}
url.search = params.toString();
const response = await fetch(url, {
headers: { Authorization: `Bearer ${accessToken}` },
redirect: "error",
signal: AbortSignal.timeout(10_000),
});
const body = await response.json().catch(() => ({}));
if (!response.ok) {
const retryAfter = Number(response.headers.get("retry-after"));
throw new Walk15Error(response.status, body.error?.code ?? "unknown_error", retryAfter > 0 ? retryAfter : undefined);
}
return body as Responses[M];
};
/** Retries only 429 responses, waiting the advertised Retry-After seconds. */
export const withRateLimitRetry = async <T>(request: () => Promise<T>, maxAttempts = 3): Promise<T> => {
for (let attempt = 1; ; attempt++) {
try {
return await request();
} catch (error) {
if (!(error instanceof Walk15Error) || error.status !== 429 || attempt >= maxAttempts) throw error;
await new Promise((resolve) => setTimeout(resolve, (error.retryAfterSeconds ?? 1) * 1000));
}
}
};
/** Reads every page of a window. `accessToken` is called per page so a refresh can happen in between. */
export const fetchAllCyclingActivities = async (
config: Walk15Config,
accessToken: () => Promise<string>,
from: string,
to: string,
): Promise<CyclingActivity[]> => {
for (let attempt = 1; ; attempt++) {
const activities: CyclingActivity[] = [];
let cursor: string | null = null;
try {
do {
const page: CyclingActivities = await withRateLimitRetry(async () =>
getActivity(config, await accessToken(), "activities", {
from,
to,
limit: "500",
...(cursor ? { cursor } : {}),
}),
);
activities.push(...page.data);
cursor = page.meta.next_cursor;
} while (cursor);
return activities;
} catch (error) {
// The traversal expired (15 minutes) or the connection version changed: restart once.
if (!(error instanceof Walk15Error && error.code === "invalid_cursor" && attempt === 1)) throw error;
}
}
};Combine it with the token manager so accessToken always returns a fresh token:
const summary = await withRateLimitRetry(async () =>
getActivity(config, await getAccessToken(config, connectionStore, applicationUserId), "summary", {
from: "2026-10-10", to: "2026-10-16",
}),
);
// Only access fields granted to this connection.
const days = summary.days;
const walkingMinutes = days.map((day) => day.walking_activity_minutes);
const rides = await fetchAllCyclingActivities(
config,
() => getAccessToken(config, connectionStore, applicationUserId),
"2026-10-10",
"2026-10-16",
);