Escorts

POST /api/public/escorts

Changed on

Start a new coaching period (escort) for a trainee. The plan ids required depend on escortType: "Training" needs trainingPlanId, "Nutrition" needs nutritionMenuId, "Nutrition and training" needs both, and "Other" needs neither. Create the plan or menu first (POST /training-plans, POST /nutrition-menus) and pass its id here. A trainee may only have one active escort at a time.

Request

  • Base URL
    https://api.coach-platform.com
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate.

Request body

traineeIdstring required
escortType'Nutrition' | 'Training' | 'Nutrition and training' | 'Other' required

Determines which plan ids are required: Training -> trainingPlanId, Nutrition -> nutritionMenuId, Nutrition and training -> both, Other -> none.

startDatestring required

ISO date.

endDatestring

ISO date. Provide this or months.

monthsnumber

Duration in months. Provide this or endDate.

goalstring
pricenumber
paymentDatestring
paymentMethod'Cash' | 'Credit card' | 'Bank transfer' | 'Other'
paymentNumbernumber
escortMeetingType'Online' | 'In person'
onlineEscortstring
inPersonEscortstring
notesstring

Optional first note on the coaching period.

cardioDaysnumber
cardioTimenumber
trainingDaysnumber
dailyStepsTargetnumber
trainingWeekdaysinteger[]

Fixed training weekdays, 0 = Sunday to 6 = Saturday. On these days the trainee gets the training-day meals of the menu automatically. On update, send an empty array or null to clear them.

trainingPlanIdstring

Assign an existing training plan. Required when escortType is "Training" or "Nutrition and training".

nutritionMenuIdstring

Assign an existing nutrition menu. Required when escortType is "Nutrition" or "Nutrition and training".

skipRegistrationFormsboolean

true: the trainee is not asked to fill registration forms in the app during this coaching period. false: the app asks the trainee to fill every active registration form aimed at them that they have not filled yet. Defaults to true when omitted on create. This is the same switch as the registration-forms toggle on the trainee profile. It belongs to this coaching period only, and a link to a specific form sent to the trainee keeps working either way.

Response

Created

Changes

    • info

      added the new optional request property

    • info

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

    • info

      added the new optional request property

    1 more change in this revision