goals

Record the athlete's answer to "which comes first?", and answer with the new order.

wonderland goals.md: "the athlete names which comes first and the coach plans around it." The answer used to live only in a chat turn the app sent, so the plan could not read it back and a reinstall lost it. Now it is a fact on the goal, and the plan, the coach and Home all read the order through :meth:StoredGoal.for_user.

Idempotent, so an app that never saw the answer may send it again. A goal that is not one of this account's readable settled goals is a 404, the same one an invented id gets, so the status cannot tell anyone whose goal an id is.

A new first goal regenerates the plan, in the background like every other change of objective (POST /user_events, the coach's event tools): the plan's brief names the goal that comes first, and a plan built around the previous one would coach the old objective under the new title until it rolled over. The same goal named again changes nothing, so it replans nothing. The plan is deliberately not marked invalidated_at first: the board's tail roll steps aside for an invalidated plan because it expects this eager replan to own it, so a replan that failed would leave the plan stuck.

put/goals/{goal_id}/first

Request

  • Base URL
    https://api.imperfect.co (the document declares no server; this is the origin it was published from)
  • URL
    https://api.imperfect.co/goals/{goal_id}/first
  • Auth
    HTTP bearer

Path parameters

goal_idstring required

Query parameters

user_idstring nullable

Response

Successful Response

Changes

    • warning

      removed the optional property //// from the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property // to the response with the status