OpenGym API

Version 1.0

  • Get Gym Details
  • Get Gym Reviews
  • Get Upcoming Events
  • Get Event Details

GET /gyms/:gymId

Retrieve your registered gym details by its ID.

GET

https://api.opengym.club/api/v1/public/gyms/:gymId

x-api-key: YOUR_API_KEY

This endpoint returns a registered gym object, including their ID, name, description, address, hours, and more.

https://api.opengym.club/api/v1/public/gyms/1234a0b1c2d3e4f5


{
  gym: {
    id: "1234a0b1c2d3e4f5",
    address: {
      street: "20 W 34th St.",
      city: "New York",
      state: "NY",
      country: "US",
      zip_code: "10118",
    },
    hours_open: {
      monday: {
        open: "09:00",
        close: "18:00",
      },
      tuesday: {
        open: "09:00",
        close: "18:00",
      },
      wednesday: {
        open: "09:00",
        close: "18:00",
      },
      thursday: {
        open: "24HOURS",
        close: "24HOURS",
      },
      friday: {
        open: "CLOSED",
        close: "CLOSED",
      },
      saturday: {
        open: "09:00",
        close: "18:00",
      },
      sunday: {
        open: "09:00",
        close: "18:00",
      },
    },
    thumbnail:
      "https://images.dog.ceo/breeds/ridgeback-rhodesian/n02087394_8456.jpg",
    media: [
      "https://images.dog.ceo/breeds/ridgeback-rhodesian/n02087394_8456.jpg",
      "https://images.dog.ceo/breeds/ridgeback-rhodesian/n02087394_8456.jpg",
    ],
    phone_number: "234-567-8901",
    days_closed: [
      "2024-04-15T12:00:00.000Z",
      "2024-04-16T12:00:00.000Z",
      "2024-04-17T12:00:00.000Z",
      "2024-04-18T12:00:00.000Z",
    ],
    sport: ["soccer", "volleyball"],
    description: {
      raw: "This gym provides top-of-the-line soccer fields for the New York athletic community!\n\n\nAffordable prices and brand new turf set in this season, you and your friends can come in and enjoy a great 5v5 or 6v6 soccer game.\n\n\nPickup sessions are hosted every night at 8pm.\nJoin our leagues starting in March and take place on Saturdays at 8pm for youth teams U9-U19. \n",
      html: "<p>This gym provides top-of-the-line soccer fields for the New York athletic community!</p><p><br></p><p>Affordable prices and brand new turf set in this season, you and your friends can come in and enjoy a great 5v5 or 6v6 soccer game.</p><p><br></p><p>Pickup sessions are hosted every night at 8pm.</p><p>Join our leagues starting in March and take place on Saturdays at 8pm for youth teams U9-U19. </p>",
    },
    email: "info@gym.com",
    fields: [
      {
        id: "7897713a02e1b94ed8990556",
        price_per_hour: 50,
        type: "3v3 Sport",
        sport: ["soccer", "volleyball"],
        name: "Field A",
      },
      {
        id: "7897713a02e1b94ed8990557",
        price_per_hour: 75,
        type: "5v5 Sport",
        sport: ["soccer", "volleyball"],
        name: "Field B",
      },
    ],
    rules: ["No cleats allowed.", "Please wear proper athletic attire."],
    website: "randomgym.com",
    cancellation_fee: 50,
    cancellation_policy: "partial-refund",
    allow_cancellations: true,
  },
}
                    

GET /reviews/gym/:gymId

Retrieve your registered gym's customer reviews.

GET

https://api.opengym.club/api/v1/public/reviews/gym/:gymId

x-api-key: YOUR_API_KEY

This endpoint returns a list of gym reviews, including their ID, name, rating, review, and date of creation.

https://api.opengym.club/api/v1/public/reviews/gym/1234a0b1c2d3e4f5


{
  reviews: [
    {
      id: "78e66e191710a605f873cf8d",
      rating: 5,
      review: "Great facility!",
      createdAt: "2022-08-12T15:13:29.414Z",
    },
    {
      id: "78e670bc1710a605f873cf9c",
      rating: 2,
      review: "Didn't enjoy my time here.",
      createdAt: "2022-08-12T15:24:44.790Z",
    },
    {
      id: "78e8f941cd3aca09b8f6d28a",
      rating: 4,
      review: "Incredibly helpful staff!",
      createdAt: "2022-09-07T20:04:17.837Z",
    },
  ],
  next: { 
    page: 2, 
    limit: 10
  },
}
                    

GET /events/:gymId/upcoming

Retrieve a list of upcoming events at your gym.

GET

https://api.opengym.club/api/v1/public/events/:gymId/upcoming

x-api-key: YOUR_API_KEY

This endpoint returns a list of events, including their ID, name, description, dates, hours, and registration deadline.

https://api.opengym.club/api/v1/public/events/1234a0b1c2d3e4f5/upcoming


{
  events: [
    {
      id: "78e670bc1710a605f873cf9c",
      type: "tournament",
      thumbnail: "https://images.dog.ceo/breeds/ridgeback-rhodesian/n02087394_8456.jpg",
      description: {
        raw: "This is the coolest tournament in New York athletic community!\n",
        html: "<p>This is the coolest tournament in New York athletic community!</p>",
      },
      sport: "soccer",
      cost: 100,
      number_of_guests: 18,
      maximum_guests: 25,
      start_time: "2022-08-12T15:00:00.000Z",
      end_time: "2022-10-07T18:00:00.000Z",
      title: "Fall Kickoff Soccer Tournament",
      level: "Elite",
      group: "Adult Co-Ed",
      team_size: 12,
      cash_prize: 500,
      registration_deadline: "2022-08-12T12:00:00.000Z",
      days: [
        "2022-08-12T12:00:00.000Z",
        "2022-08-26T12:00:00.000Z",
        "2022-09-09T12:00:00.000Z",
        "2022-09-23T12:00:00.000Z",
        "2022-10-07T12:00:00.000Z"
      ],
      required_reservation_forms: [],
    },
    {
      id: "78e670bc1710a605f873cf9c",
      type: "league",
      thumbnail: "https://images.dog.ceo/breeds/ridgeback-rhodesian/n02087394_8456.jpg",
      description: {
        raw: "This is the coolest league in New York athletic community!\n",
        html: "<p>This is the coolest league in New York athletic community!</p>",
      },
      sport: "basketball",
      cost: 0,
      number_of_guests: 75,
      maximum_guests: 100,
      start_time: "2022-08-12T15:00:00.000Z",
      end_time: "2022-10-07T18:00:00.000Z",
      title: "Fall Kickoff Basketball League",
      level: "Open",
      group: "Open",
      team_size: 9,
      cash_prize: 0,
      registration_deadline: "2022-08-12T12:00:00.000Z",
      days: [
        "2022-08-12T12:00:00.000Z",
        "2022-08-26T12:00:00.000Z",
        "2022-09-09T12:00:00.000Z",
        "2022-09-23T12:00:00.000Z",
        "2022-10-07T12:00:00.000Z"
      ],
      required_reservation_forms: [],
    },
  ],
  next: { 
    page: 2, 
    limit: 10
  },
}
                    

GET /events/gym/:eventId

Retrieve your event details by its ID.

GET

https://api.opengym.club/api/v1/public/events/gym/:eventId

x-api-key: YOUR_API_KEY

This endpoint returns an event object, including its ID, name, description, dates, hours, and more.

https://api.opengym.club/api/v1/public/events/gym/1234a0b1c2d3e4f5


{
  event: {
    id: "1234a0b1c2d3e4f5",
    type: "tournament",
    thumbnail: "https://images.dog.ceo/breeds/ridgeback-rhodesian/n02087394_8456.jpg",
    description: {
      raw: "This is the coolest tournament in New York athletic community!\n",
      html: "<p>This is the coolest tournament in New York athletic community!</p>",
    },
    sport: "soccer",
    cost: 100,
    number_of_guests: 18,
    maximum_guests: 25,
    start_time: "2022-08-12T15:00:00.000Z",
    end_time: "2022-10-07T18:00:00.000Z",
    title: "Fall Kickoff Soccer Tournament",
    level: "Elite",
    group: "Adult Co-Ed",
    team_size: 12,
    cash_prize: 500,
    registration_deadline: "2022-08-12T12:00:00.000Z",
    days: [
      "2022-08-12T12:00:00.000Z",
      "2022-08-26T12:00:00.000Z",
      "2022-09-09T12:00:00.000Z",
      "2022-09-23T12:00:00.000Z",
      "2022-10-07T12:00:00.000Z"
    ],
    required_reservation_forms: [],
  }
}
                    
opengym logo

OpenGym

facebook icon
instagram icon
tiktok icon
twitter icon

Join our mailing list

Get insider information on feature updates, new gyms, and more