Skip to content

Training Mark As View

François Dupont edited this page Jun 21, 2026 · 1 revision

Mark a training as viewed by the coach

Endpoint:

  • /mark_as_view/training/
  • HTTP Method: POST

Example:

Production:
https://www.nolio.io/api/mark_as_view/training/

Records that the authenticated coach has viewed an athlete's training. Idempotent: calling again on an already-viewed training is a no-op and still returns 200.

Parameters :

  • id_training: integer, optional. The Nolio training ID. Either id_training or id_partner must be provided.
  • id_partner: string, optional. The partner/external training ID (from your application). Either id_training or id_partner must be provided. The training must have been originally created by your OAuth application.
  • athlete_id: integer, optional. If provided, marks a training belonging to the specified athlete (you must be their coach). You can retrieve athlete ids with the Get Athletes route.

Example:

  {
    "id_training": 456,
    "athlete_id": 123
  }

Response

A JSON containing the internal id of the marked training:

  {
    "id": 456
  }
  • id: integer. The internal Nolio pk of the training.

Specific status code

  • 400 Bad request

    • "json needed" - request body is missing
    • "only coaches can mark a training as viewed" - the token owner is not a coach
    • "coach cannot mark their own training as viewed" - coach and athlete are the same user
    • "id_partner or id_training is required" - neither training identifier provided
    • "Invalid id_training" - id_training is not a valid integer
    • "Training does not exist" - no training found for the given ID
    • "athlete is archived" - the athlete's account is archived

Clone this wiki locally