Base: https://api.sajilosport.com/api

Indoor Games

Base paths:

  • /api/venues/{venueId}/indoor-games — public catalog
  • /api/indoor-games/{indoorGame}/availability — slot checker
  • /api/indoor-game-bookings — customer booking CRUD

Indoor games are non-court activities offered at a venue, such as PlayStation, chess, carrom, table tennis, etc.


Game Types

ValueLabel
playstationPlayStation / Gaming Console
chessChess
ludoLudo
cardsCards
unoUno
table_tennisTable Tennis
carromCarrom
otherOther

Indoor Game Booking Statuses

StatusDescription
pendingBooking created, not yet paid
confirmedPaid and confirmed
playingSession in progress
completedSession finished
cancelledCancelled

Endpoints

GET /api/venues/{venueId}/indoor-games

Browse available indoor games at a venue.

Auth: Not required

Query parameters:

ParameterTypeDescription
game_typestringFilter by game type (see table above)

Response 200:

{
  "data": [
    {
      "id": 1,
      "tenant_id": 3,
      "venue_id": 1,
      "name": "PS5 - Station 1",
      "game_type": "playstation",
      "description": "Sony PlayStation 5 with FIFA 25 and more",
      "capacity": 2,
      "slot_minutes": 60,
      "price_per_hour": "150.00",
      "is_active": true,
      "sort_order": 1,
      "venue": { "id": 1, "name": "Champions Futsal", "slug": "champions-futsal" },
      "created_at": "2025-01-10 10:00:00",
      "updated_at": "2025-01-10 10:00:00"
    }
  ]
}

GET /api/indoor-games/{indoorGame}/availability

Get available time slots for an indoor game on a date.

Auth: Not required

Query parameters:

ParameterTypeRequiredDescription
datedateYesYYYY-MM-DD

Response 200:

{
  "date": "2025-06-15",
  "slot_minutes": 60,
  "slots": [
    {
      "start_time": "09:00",
      "end_time": "10:00",
      "is_available": true
    },
    {
      "start_time": "10:00",
      "end_time": "11:00",
      "is_available": false
    }
  ]
}

GET /api/indoor-game-bookings [Auth required]

List all indoor game bookings for the authenticated user.

Response 200:

{
  "data": [
    {
      "id": 5,
      "booking_number": "IGB-2025-0005",
      "tenant_id": 3,
      "indoor_game_id": 1,
      "user_id": 12,
      "type": "online",
      "customer_name": "Jane Doe",
      "customer_phone": "9800000000",
      "date": "2025-06-15",
      "start_time": "09:00",
      "end_time": "10:00",
      "duration_hours": "1.00",
      "players_count": 2,
      "base_amount": "150.00",
      "discount_amount": 0,
      "total_amount": "150.00",
      "paid_amount": 0,
      "balance_due": 150.00,
      "is_paid": false,
      "status": "pending",
      "cancel_reason": null,
      "notes": null,
      "indoor_game": { ...IndoorGameResource... },
      "user": { ...UserResource... },
      "charges": [],
      "payments": [],
      "created_at": "2025-06-10 09:00:00"
    }
  ]
}

POST /api/indoor-game-bookings [Auth required]

Book an indoor game slot.

Request body:

{
  "indoor_game_id": 1,
  "date": "2025-06-15",
  "start_time": "09:00",
  "end_time": "10:00",
  "players_count": 2,
  "customer_phone": "9800000000",
  "notes": "First time, need introduction"
}
FieldTypeRequiredDescription
indoor_game_idintegerYesID of the indoor game to book
datedateYesYYYY-MM-DD, must be today or future
start_timetimeYesHH:mm (24-hour)
end_timetimeYesHH:mm, after start_time
players_countintegerNoNumber of players (max 20)
customer_phonestringNoContact phone
notesstringNoOptional note for staff

Response 201: IndoorGameBookingResource

Response 409 — slot already taken:

{ "message": "The selected slot is not available." }

GET /api/indoor-game-bookings/{indoorGameBooking} [Auth required]

Get details of a specific indoor game booking.

Response 200: Full IndoorGameBookingResource including indoor_game, user, payments.


PATCH /api/indoor-game-bookings/{indoorGameBooking}/cancel [Auth required]

Cancel an indoor game booking.

Request body:

{
  "cancel_reason": "Schedule conflict"
}

Response 200: Updated IndoorGameBookingResource with status: "cancelled".


IndoorGameResource — Field Reference

FieldTypeNotes
idinteger
tenant_idinteger
venue_idinteger
namestringe.g. "PS5 - Station 1"
game_typestringSee game types table
descriptionstring or null
capacityintegerMax players simultaneously
slot_minutesintegerBooking slot duration in minutes (e.g. 60)
price_per_hourdecimal stringPrice in NPR
is_activebooleanOnly show active games
sort_orderintegerFor display ordering
venueobjectParent venue summary
created_atdatetime string

IndoorGameBookingResource — Field Reference

FieldTypeNotes
idinteger
booking_numberstringe.g. "IGB-2025-0005"
indoor_game_idinteger
typestringonline, offline, walkin
customer_namestring
customer_phonestring or null
datedate string
start_timestringHH:mm
end_timestringHH:mm
duration_hoursdecimal string
players_countinteger or null
base_amountdecimal string
discount_amountdecimal string
total_amountdecimal string
paid_amountdecimal string
balance_duedecimal number
is_paidboolean
statusstringSee statuses table
cancel_reasonstring or null
notesstring or null
indoor_gameobjectWhen loaded
userobjectWhen loaded
chargesarrayExtra session charges
paymentsarrayPayment history
created_atdatetime string

Indoor Game Booking Flow

1. GET  /api/venues/{venueId}/indoor-games?game_type=playstation  → pick game
2. GET  /api/indoor-games/{id}/availability?date=YYYY-MM-DD       → pick slot
3. POST /api/indoor-game-bookings                                  → create booking
4. POST /api/payments/initiate (booking_type: "indoor")           → pay
5. GET  /api/indoor-game-bookings/{id}                            → show confirmation