ورود | ثبت نام
  • FA
  • EN

API Docs

POST /api/v1/training/services/{user-id}

Create a new training service for a user.


Permissions

PermissionDescription
training_services.createCreate training services for yourself
training_services.create_anyCreate training services for any user

Approved trainer license required. Creating a service for yourself with training_services.create also requires trainer_license_approved to be true on your user record — a missing, pending, or rejected license gets 403. See Trainer license for the review flow. Holders of training_services.create_any (operators) are exempt, since they create services on a trainer's behalf.


URL Parameters

NameTypeRequiredDescriptionExample
user-idintYesID of the user to create the service for42

Request Body Parameters

NameTypeRequiredDescription
titlestringYesTitle of the training service (max 255)
descriptionstringNoDescription (max 2000, optional)
priceintYesPrice of the training service
discountfloatNoDiscount percentage (nullable, default 0)
categorystringNoCategory: diet_plan, workout_plan, other (default: other)
major_idsarrayNoArray of major IDs that this training service covers

Response

201 Created

Returns the created training service resource.

{ /* training service resource */ }

See Training Service Resource.


Error Responses

StatusDescriptionReference
422Validation errorValidation error
401UnauthorizedAuthentication error
403ForbiddenPermission error
Dambel

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutubeTelegramGitHub