dambel

دمبل

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

API Docs / gyms / working-periods / update



PUT /api/v1/gyms/{gym-id}/working-periods/{working-period-id}

Updates a specific working period for a gym.


Permissions

PermissionDescription
gym_working_periods.updateUpdate working periods for your own gyms
gym_working_periods.update_anyUpdate working periods for any gym

URL Parameters

NameTypeRequiredDescriptionExample
gym-idintYesID of the gym123
working-period-idintYesID of the working period55

Request Body Parameters

NameTypeRequiredDescriptionExample
daystringNoDay of the week (saturday-friday)"monday"
genderstringNomen, women, or genderless"women"
opens_atstringNoOpening time (HH:mm)"07:00"
closes_atstringNoClosing time (HH:mm)"23:30"
descriptionstringNoDescription (max 2000 chars, optional)"Some desc"
is_exceptionboolNoWhether this is for an exceptional datefalse
exception_start_datestringNoStart date of the exception (YYYY-MM-DD)null
exception_end_datestringNoEnd date of the exception (YYYY-MM-DD)null

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


Request Example

{
  "day": "monday",
  "gender": "women",
  "opens_at": "07:00",
  "closes_at": "23:30",
  "description": "Some desc",
  "is_exception": false
}

Response

200 OK

Returns the updated working period resource.

Example

{ /* working period resource */ }

For a full schema, see Working Period Resource.


Error Responses

StatusDescriptionReference
422Validation errorValidation error
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
footer wave
logo

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

LinkedinInstagramXYoutube