🚗 GreenCar API Testing Dashboard

POST Send OTP

URL: /api/endpoints/auth.php

{
  "action": "send_otp",
  "mobile_no": "7703823008"
}

POST Verify OTP

URL: /api/endpoints/auth.php

{
  "action": "verify_otp",
  "mobile_no": "7703823008",
  "otp_code": "401779"
}

POST Complete Profile

URL: /api/endpoints/auth.php

{
  "action": "complete_profile",
  "mobile_no": "7703823008",
  "name": "Test User",
  "email": "test@example.com"
}

POST Create Ride

URL: /api/endpoints/rides.php

{
  "action": "create_ride",
  "user_id": 1,
  "from_location": "Delhi",
  "from_lat": 28.6139,
  "from_lng": 77.2090,
  "to_location": "Mumbai",
  "to_lat": 19.0760,
  "to_lng": 72.8777,
  "departure_date": "2025-08-01",
  "departure_time": "09:00:00",
  "is_two_way": true,
  "return_date": "2025-08-02",
  "return_time": "18:00:00",
  "available_seats": 3,
  "price_per_seat": 500,
  "vehicle_details": "Honda City",
  "additional_info": "AC car, no smoking",
  "recurring_days": ["monday", "wednesday", "friday"]
}

GET Get All Rides

URL: /api/endpoints/rides.php?action=get_all_rides&user_id=1