dambel

دمبل

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

API Docs / gyms / data / peak-hours



GET /api/v1/gyms/{gym-id}/peak-hours

Retrieves peak hours graph data for a gym on a specific weekday within a given date range.


Permissions

PermissionDescription
gyms.view_own_data_reportsView data reports for your own gym
gyms.view_all_data_reportsView data reports for all gyms

URL Parameters

NameTypeRequiredDescriptionExample
gym-idintYesID of the gym42

Query Parameters

NameTypeRequiredDescriptionExample
weekdaystringYesName of the weekday (e.g., "monday")"monday"
start_datestringYesStart date for the range (YYYY-MM-DD)"2024-01-01"
end_datestringYesEnd date for the range (YYYY-MM-DD)"2024-01-31"

Request Example

GET /api/v1/gyms/42/peak-hours?weekday=monday&start_date=2024-01-01&end_date=2024-01-31
Authorization: Bearer {token}

Response

200 OK

Returns an object with hour keys and visit counts for the specified weekday.

Example

{
  "monday": {
    "00": 15,
    "01": 15,
    "02": 15,
    "...": 15,
    "22": 15,
    "23": 15
  }
}

Error Responses

StatusDescriptionReference
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
404Not foundNot-found error
footer wave
logo

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

LinkedinInstagramXYoutube