dambel

دمبل

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

API Docs / gyms / gym resource



Gym Resource

Represents a gym entity with all its attributes, relationships, and status information.


Schema

FieldTypeDescription
idintUnique identifier for the gym
namestringName of the gym
addressstringAddress of the gym
location_latfloatLatitude coordinate
location_lngfloatLongitude coordinate
is_activeboolWhether the gym is active
descriptionstringDescription of the gym
created_atstring (datetime)Creation timestamp
updated_atstring (datetime)Last update timestamp
show_crowdboolWhether crowd information is displayed
crowdint|nullCurrent crowd count (null if show_crowd is false)
cityCity ResourceCity where the gym is located (see here)
majorsMajor Resource[]List of majors associated with the gym (see here)
working_periodsWorking Period[]List of working periods (see here)
working_statusobject|nullCurrent working status (see below)
boostobject|nullMarketing boost info (see here)
mediaMedia Resource[]List of media items (see here)
rating_countintNumber of ratings
rating_averagefloatAverage rating

Example

{
  "id": 123,
  "name": "Iron Paradise",
  "address": "123 Main St",
  "location_lat": 35.6892,
  "location_lng": 51.3890,
  "is_active": true,
  "description": "A premium gym with modern equipment.",
  "created_at": "2023-01-01 10:00:00",
  "updated_at": "2023-01-01 10:00:00",
  "show_crowd": false,
  "crowd": null,
  "city": {
    "id": 5,
    "name": "Tehran",
    "state": {
      "id": 1,
      "name": "Tehran Province"
    }
  },
  "majors": [
    { "id": 1, "title": "Bodybuilding" },
    { "id": 2, "title": "Crossfit" }
  ],
  "working_periods": [
    {
      "id": 1,
      "gym_id": 123,
      "day": "monday",
      "gender": "women",
      "opens_at": "07:00",
      "closes_at": "23:30",
      "description": "Morning shift",
      "is_exception": false,
      "exception_start_date": null,
      "exception_end_date": null
    }
  ],
  "working_status": {
    "current": {
      "gender": "genderless",
      "opens_at": "08:30",
      "closes_at": "23:00"
    }
  },
  "boost": null,
  "media": [
    {
      "id": 10,
      "attachable_type": "App\\Models\\Gyms\\Gym",
      "attachable_id": 123,
      "link": "https://example.com/media/10.jpg"
    }
  ],
  "rating_count": 12,
  "rating_average": 4.5
}

Field Details

working_status

The working_status field provides information about the gym's current operational status for the day. It can be:

  • null: The gym is closed for the day.
  • An object with one of the following keys:
    • current: The gym is currently open.
    • next: The gym is currently closed but will open later today.
    • last: The gym was open earlier but is now closed for the day.

Each status object contains:

{
  "gender": "genderless",
  "opens_at": "08:30",
  "closes_at": "23:00"
}

crowd

The crowd field shows the current number of people checked in at the gym, calculated from subscription check-ins/outs. If show_crowd is false, this value will be null.


Related Resources

footer wave
logo

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

LinkedinInstagramXYoutube