/api/v1/training/services/{user-id}Create a new training service for a user.
| Permission | Description |
|---|---|
training_services.create | Create training services for yourself |
training_services.create_any | Create training services for any user |
| Name | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Title of the training service (max 255) |
description | string | No | Description (max 2000, optional) |
price | int | Yes | Price of the training service |
discount | float | No | Discount percentage (nullable, default 0) |
category | string | No | Category of training service: diet_plan, workout_plan, other (default: other) |
major_ids | array | No | Array of major IDs that this training service covers |
The user ID is specified in the route parameter.
<training service resource>
| Status | Error Type | Reference |
|---|---|---|
| 422 | Validation Error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden | Permission error |