Today

Estimate the altitude the athlete is at today, and whether to propose it

Send the device's or browser's location, or null to use the connection's (when the server can locate one). The location is used for this request only and is never stored or logged. Changes nothing: confirm with PUT /training/today-altitude.

post/training/today-altitude/estimate

Request

  • Base URL: https://bodylab.lol/api/v1
  • URL: https://bodylab.lol/api/v1/training/today-altitude/estimate
  • 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

Response

OK

outcomestring required

propose: worth asking the athlete (see estimate). already_confirmed: an altitude is already set for today. no_location: no location was sent and none could be found for the connection. too_coarse: the location is too rough to say. ip_disagrees_with_recordings: the connection's location contradicts where recent recordings started. no_reference: no home altitude or recent recordings to compare with. no_elevation: no altitude could be found for the location. no_difference: within 300 m of what today's targets already assume. too_uncertain: the location could be close enough to that altitude. no_power_targets: today has no watt targets for altitude to change. no_effect: different, but not enough to change a watt target. Known values: propose, already_confirmed, no_location, too_coarse, ip_disagrees_with_recordings, no_reference, no_elevation, no_difference, too_uncertain, no_power_targets, no_effect. Treat unknown values as "other".

homeAltitudeMinteger nullable required

Changes

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