dambel

دمبل

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

API Docs / gyms / subscriptions / manage / update



PUT /api/v1/gyms/{gym-id}/subscriptions/manage/{subscription-id}

Updates a subscription for a user in a specific gym.


Permissions

PermissionDescription
gym_subscriptions.updateUpdate subscriptions for your own gyms
gym_subscriptions.update_anyUpdate subscriptions for any gym

URL Parameters

NameTypeRequiredDescriptionExample
gym-idintYesID of the gym123
subscription-idintYesID of the subscription456

Request Body Parameters

NameTypeRequiredDescriptionExample
expires_atstringNoExpiration date (YYYY-MM-DD, optional)"2025-12-31"
available_sessions_countintNoNumber of available sessions (optional)10

All parameters are optional; only include fields you wish to update. You can set them to null to clear their value.


Request Example

{
  "expires_at": "2025-12-31",
  "available_sessions_count": 10
}

Response

200 OK

Returns the updated gym subscription resource.

Example

{ /* gym subscription resource */ }

For a full schema, see Gym Subscription Resource.


Error Responses

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

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

LinkedinInstagramXYoutube