Strength

Put a strength routine on a date

One date, one routine. On that date it is the day's session: Body Lab prescribes nothing beside it unless another session is also put on that date. Stored as a commitment, so it's withdrawn with POST /commitments/{id}/withdraw, counts toward the same limits — no more than 180 days ahead or a day back (OUT_OF_HORIZON, 400), three sessions on a date (DATE_OCCUPIED, 409), 750 standing (SCHEDULE_FULL, 409) — and a connected app is held to the same rolling quota (QUOTA_EXCEEDED, 429). Sending the same routine twice — the same date, name, duration and exercises in the same order — stores one and answers with the first one's id; a routine that differs in any of those, a corrected rep count included, is stored as a new one. Every exercise must be in the catalogue: an unknown id refuses the whole routine (UNKNOWN_EXERCISE, 422, with suggestions for each), and so does a negative weight on an exercise that can't take assistance (ASSISTANCE_NOT_POSSIBLE, 422) or a unit the exercise isn't counted in (UNIT_MISMATCH, 422). A stated weight is stored as given.

post/strength-routines

Request

  • Base URL: https://bodylab.lol/api/v1
  • URL: https://bodylab.lol/api/v1/strength-routines
  • Auth: HTTP bearer

Headers

X-Client-Platformstring

The native client's platform, e.g. ios. Server-side and non-native callers omit it.

X-Client-Versionstring

The native client's own semver version. With X-Client-Platform, a version below that platform's minimum is refused with CLIENT_UPGRADE_REQUIRED (426).

Request body

forDatestring date required

A day on the athlete's own calendar: YYYY-MM-DD, no time zone.

namestring required

What to call the session: "Upper day", "Week 3, day 2".

durationSinteger

How long it takes. Left out, it's estimated from the sets, reps and rests, which is what the week counts as load before the session is logged.

Response

OK

idstring required

Opaque identifier.

Changes

No recorded changes to this operation across all 1 revision of this API.