Login | Sign Up
  • 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

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
footer wave
logo

Dambel, the smart world of fitness and nutrition

LinkedinInstagramXYoutubeTelegramGitHub