Skip to content

Planned workout create

Alexandre Bouquet edited this page May 5, 2022 · 4 revisions

Create planned training

Endpoint:

  • /create/planned/training/
  • HTTP Method: POST

Example:

Production:
https://www.nolio.io/api/create/planned_training/

Parameters :

  • id_partner: integer, required.
  • sport_id: integer, required. The id of the Nolio sport
  • name: string, required.
  • date_start: string, required. date of the workout. YYYY-MM-DD format
  • description: string, optional. additional comment to understand what to do during this workout
  • duration: integer, optional. Duration of training in seconds.
  • rpe : integer, optional. Nolio rpe
  • distance : integer, optional. distance in km
  • elevation_gain : integer, optional. elevation gain in m
  • structured_workout : Array, optional. see Structured workout

Example:

  {
    "id_partner": 1,
    "sport_id": 23,
    "name": "my planned training",
    "date_start": "2022-08-01",
    "duration": 36000,
    "rpe": 5,
    "distance": 50,
    "elevation_gain": 150
  }

Response

A JSON containing the training data that was created

Specific status code

  • 400 Bad request

    • Training already exists

Clone this wiki locally