Mobile App API

Complete API reference and prompt builder for Gymfinity mobile app development

API Overview

Base URL: https://gymfinity.co/api

Authentication: Bearer token in Authorization header

Content-Type: application/json

Response Format: JSON with {success, data, error} structure

Auth & Profile
POST
/auth/login

Authenticate user

Public
POST
/auth/register

Register new user

Public
GET
/auth/me

Get current user profile

Auth Required
PUT
/auth/me

Update user profile

Auth Required
Coaches
GET
/coaches/search

Search coaches by skill/location

Auth Required
GET
/coaches/:id

Get coach profile details

Auth Required
GET
/coaches/:id/availability

Get coach availability calendar

Auth Required
GET
/coaches/:id/reviews

Get coach reviews

Auth Required
Bookings
POST
/bookings

Create lesson booking

Auth Required
GET
/bookings

Get user bookings

Auth Required
GET
/bookings/:id

Get booking details

Auth Required
PUT
/bookings/:id

Update booking (reschedule)

Auth Required
DELETE
/bookings/:id

Cancel booking

Auth Required
Payments
POST
/payments/checkout

Create payment session

Auth Required
GET
/payments/:id

Get payment details

Auth Required
GET
/payments/:id/receipt

Get payment receipt

Auth Required
Gyms
GET
/gyms/search

Search nearby gyms

Auth Required
GET
/gyms/:id

Get gym details

Auth Required
GET
/gyms/:id/locations

Get gym locations

Auth Required
GET
/gyms/:id/availability

Get available time slots

Auth Required
Students & Family
GET
/students

Get my children

Auth Required
POST
/students

Add child

Auth Required
PUT
/students/:id

Update child info

Auth Required
GET
/students/:id/progress

Get child progress notes

Auth Required
Messages
GET
/messages

Get message threads

Auth Required
POST
/messages

Send message

Auth Required
GET
/messages/:threadId

Get message thread

Auth Required
Reviews
POST
/reviews

Submit lesson review

Auth Required
GET
/reviews/:coachId

Get coach reviews

Auth Required
Integration Guide

Step 1: Authentication

POST /auth/login
{
  "email": "user@example.com",
  "password": "password"
}

Response: { "token": "...", "user": {...} }

Step 2: Use Token for Requests

Headers: {
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
}

Step 3: Handle Responses

{
  "success": true,
  "data": { /* response data */ },
  "error": null
}