dambel

دمبل

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

API Docs / gyms / working-periods / create



POST /api/v1/gyms/{gym-id}/working-periods

Creates a new working period for a gym.


Permissions

PermissionDescription
gym_working_periods.createCreate working periods for your own gyms
gym_working_periods.create_anyCreate working periods for any gym

URL Parameters

NameTypeRequiredDescriptionExample
gym-idintYesID of the gym123

Request Body Parameters

NameTypeRequiredDescriptionExample
daystringYesDay of the week (saturday-friday)"monday"
genderstringYesmen, women, or genderless"women"
opens_atstringYesOpening time (HH:mm)"07:00"
closes_atstringYesClosing 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

Request Example

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

Response

201 Created

Returns the created 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