dambel

دمبل

shevron
ورود | ثبت نام

API Docs / gyms / subscriptions / manage / create



POST /api/v1/gyms/{gym-id}/subscriptions/manage

Creates a new subscription for a user in a specific gym.


Permissions

PermissionDescription
gym_subscriptions.createCreate subscriptions for your own gyms
gym_subscriptions.create_anyCreate subscriptions for any gym

URL Parameters

NameTypeRequiredDescriptionExample
gym-idintYesID of the gym123

Request Body Parameters

NameTypeRequiredDescriptionExample
gym_plan_idintYesID of the gym plan10
user_idintYesID of the user789

Request Example

{
  "gym_plan_id": 10,
  "user_id": 789
}

Response

201 Created

Returns the created gym subscription resource.

Example

{ /* gym subscription resource */ }

For a full schema, see Gym Subscription Resource.


Error Responses

StatusDescriptionReference
404Not found (invalid gym or plan)
422Validation errorValidation error
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
footer wave
logo

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

LinkedinInstagramXYoutube