Flott Trip APIs

Comprehensive documentation for the Trip Booking APIs, designed to facilitate a smooth, efficient, and seamless booking experience.

Overview

This documentation provides a comprehensive overview of the Trip Booking APIs, designed to facilitate a smooth, efficient, and seamless booking experience. These APIs enable you to interact with core functionalities such as: - Booking a Ride: Submit ride requests, specifying pickup and drop-off locations, scheduling options, and preferred vehicle types. - Fare Calculation: Estimate fares based on ride parameters, distance, and location.

Authorization

Each API request requires an API key for authorization. Pass the API key in the headers of every request to ensure secure access to the endpoints. Unauthorized requests will be denied, so ensure the API key is correctly included with each call.

Headers

{
  "Accept": "application/json, text/plain, */*",
  "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
  "Connection": "keep-alive",
  "Content-Type": "application/json",
  "Origin": "http://localhost:39811",
  "Referer": "http://localhost:39811/",
  "User-Agent": "Mozilla/5.0 X11; Linux x86_64 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
  "apiKey": "f5ayx18wejelyr5djaohp877ht20n3d",
  "from": "web-booking",
  "validation": "4607494768914922463238925345952986874049"
}

Create New Trip

POST https://api.goflott.com/api/v3.3/trip/create

Creates a new trip with the provided details. The request should include the origin and destination locations, vehicle type, payment type, passenger details, estimated distance and time, and other trip-related information. Optionally, it can also include fare details for select pricing.

Request Body

{
  "pickup_location": "The origin address",
  "pickup_latitude": "The latitude of the origin location",
  "pickup_longitude": "The longitude of the origin location",
  "dropoff_location": "The destination address",
  "dropoff_latitude": "The latitude of the destination location",
  "dropoff_longitude": "The longitude of the destination location",
  "vehicle_type_id": "The ID of the vehicle type",
  "payment_type": "1 for cash trip, 3 for paid trips",
  "notes": "Additional notes for the trip",
  "no_of_passenger": "Number of passengers",
  "est_distance": "Estimated distance in kilometers",
  "est_time": "Estimated time in minutes",
  "is_scheduled": "\"Y\" for future trips, \"N\" for immediate trips",
  "request_time": "Timestamp for future trips (optional)",
  "trip_luggage": "Number of luggage",
  "est_fare": "Estimated trip fare",
  "additional_phone_no": "Customer's phone number",
  "additional_dial_code": "Customer's dial code",
  "additional_first_name": "Customer's first name",
  "additional_last_name": "Customer's last name",
  "additional_email": "Customer's email",
  "fare_details": {
    "price_type_id": "Price type identifier",
    "price_type": "Type of pricing",
    "capacity": "Vehicle capacity",
    "max_capacity": "Maximum vehicle capacity",
    "max_luggage_capacity": "Maximum luggage capacity",
    "vehicle_luggage_capacity": "Vehicle luggage capacity",
    "company_id": "Company identifier",
    "meter_calculation_type": "Type of meter calculation",
    "meter_range": "Array of meter ranges"
  }
}

Request Example

{
  "pickup_location": "Helsinki Central Station, Kaivokatu, Helsinki, Finland",
  "pickup_latitude": "60.171870",
  "pickup_longitude": "24.941400",
  "dropoff_location": "Helsinki Airport (HEL), Lentoasemantie, Vantaa, Finland",
  "dropoff_latitude": "60.317944",
  "dropoff_longitude": "24.949624",
  "vehicle_type_id": "3fad1ae0d58f45498a842d652045bc4b",
  "payment_type": 1,
  "notes": "This is a trips notes",
  "no_of_passenger": 1,
  "est_distance": 19.79,
  "est_time": 29.77,
  "is_scheduled": "Y",
  "request_time": 1730379300,
  "trip_luggage": 0,
  "est_fare": 32.05,
  "additional_phone_no": "9499223311",
  "additional_dial_code": "+39",
  "additional_first_name": "Jake",
  "additional_last_name": "Reacher",
  "additional_email": "[email protected]",
  "fare_details": {
    "price_type_id": "c4bdb721263346de9af71bc298b7a247",
    "price_type": 2,
    "capacity": 1,
    "max_capacity": 4,
    "max_luggage_capacity": 4,
    "vehicle_luggage_capacity": 0,
    "company_id": 1161,
    "is_active": 1,
    "is_deleted": 0,
    "created_by": "acb470a1bf0d4c6190386392e9ec1884",
    "created_date": "2024-10-01T17:35:34.000Z",
    "updated_by": "acb470a1bf0d4c6190386392e9ec1884",
    "updated_date": "2024-10-27T20:13:03.000Z",
    "vehicle_type_meter_id": "c4bdb721263346de9af71bc298b7a247",
    "meter_title": "Basic",
    "corporate_id": null,
    "base_fare": 2.5,
    "minimum_fare": 10,
    "calculation_type": 1,
    "waiting_time_charge": 0,
    "ride_time_charge": 0.39,
    "driver_cancellation_charge": 0,
    "passenger_cancellation_charge": 0,
    "acceptance_charges": 0,
    "extra_charge_per_passenger": 0,
    "extra_charge_per_luggage": 0,
    "out_of_range_type": 1,
    "out_of_range_value": 0,
    "return_disc_type": null,
    "return_price_value": null,
    "calculation_method": 1,
    "pricing_schema": 2,
    "meter_calculation_type": 1,
    "meter_range": [
      {
        "company_id": 1161,
        "is_active": 1,
        "is_deleted": 0,
        "created_by": "acb470a1bf0d4c6190386392e9ec1884",
        "created_date": "2024-10-01T17:35:34.000Z",
        "updated_by": "acb470a1bf0d4c6190386392e9ec1884",
        "updated_date": "2024-10-27T20:13:03.000Z",
        "meter_price_id": "adf8fa8a55f240bcad8d12457d8cd5e0",
        "vehicle_type_meter_id": "c4bdb721263346de9af71bc298b7a247",
        "min_distance": 1,
        "max_distance": null,
        "amount": 0.8,
        "corporate_id": null
      }
    ]
  }
}

Price Estimation

GET https://api.goflott.com/api/v3.3/pricing/estimate

Retrieves pricing estimates for a taxi ride based on specified parameters. The response contains pricing details for different types of cabs, including base fare, minimum fare, waiting time charge, ride time charge, surge pricing, and taxes.

Headers

{
  "sec-ch-ua-platform": "macOS",
  "Authorization": "Token MH4KjZoGvZl0gfRWZpfqLwuqTSy7QZ64tceRc2sk",
  "Referer": "https://service.goflott.com/",
  "user_type": "1",
  "timezone": "Europe/Amsterdam",
  "user_id": "1",
  "hash": "eyJhbGciOiJIUzI1NiJ9..."
}

Parameters

  • no_of_passenger (1)
  • trip_luggage (0)
  • pickup_location (Helsinki Central Station, Kaivokatu, Helsinki, Finland)
  • pickup_latitude (60.171870)
  • pickup_longitude (24.941400)
  • dropoff_location (Helsinki Airport HEL, Lentoasemantie, Vantaa, Finland)
  • dropoff_latitude (60.317944)
  • dropoff_longitude (24.949624)
  • request_time (1730379300)
  • service_type (11: Dispatch trips)

Response Example

{
  "data": {
    "cab_type_list": [
      {
        "id": "",
        "capacity": 0,
        "max_capacity": 0,
        "vehicle_luggage_capacity": 0,
        "max_luggage_capacity": 0,
        "vehicle_type_priority": 0,
        "pricing_schema": 0
      }
    ]
  }
}

Trip Details

GET https://api.goflott.com/api/v3.3/trip/{tripId}

Retrieves detailed information about a specific trip.

Response Example

{
  "data": {
    "trip": {
      "id": "28211b3600f54618a5bedac3fe3c44e9",
      "trip_number": 5699150,
      "user_id": "36962c7043ea4abfa60870a63498788a",
      "is_manual": null,
      "vehicle_id": null,
      "operator_id": null,
      "vehicle_type_id": "3fad1ae0d58f45498a842d652045bc4b"
    }
  }
}

Cancel Trip

PUT https://api.goflott.com/api/v3.3/trip/status/{tripId}

Updates the status of a trip, typically used for cancellations.

Request Body

{
  "cancelled_by_user_type": "1 for admin, 3 for passenger",
  "trip_status": "6 to cancel the request",
  "other_cancel": "Reason for cancellation"
}

Response Example

{
  "data": {
    "trip": {
      "id": "28211b3600f54618a5bedac3fe3c44e9",
      "trip_status": 6
    }
  },
  "message": "success",
  "error_code": -1,
  "status": 1,
  "success": 1
}

Vehicle Details

GET https://api.goflott.com/api/v3.3/vehicle/{vehicleId}

Retrieves details about a specific vehicle.

Driver Details

GET https://api.goflott.com/api/v3.3/user/driver/{driverId}

Retrieves detailed information about a specific driver.

Response Fields

{
  "id": "Unique identifier of the driver",
  "password": "Password of the driver's account",
  "last_login": "Timestamp of last login",
  "is_superuser": "Superuser privileges indicator",
  "username": "Driver's username",
  "first_name": "Driver's first name",
  "last_name": "Driver's last name",
  "email": "Driver's email address",
  "is_staff": "Staff member indicator",
  "date_joined": "Account creation timestamp",
  "user_type": "Type of user (driver)",
  "dial_code": "Phone number dial code",
  "phone_number": "Driver's phone number",
  "phone_verified": "Phone verification status",
  "company_id": "Associated company ID",
  "language": "Language preference",
  "device_info": {
    "DeviceVersion": "Device version",
    "DeviceVersionName": "Device version name",
    "DeviceManufacturer": "Device manufacturer",
    "DeviceIpAddress": "Device IP address",
    "DeviceId": "Unique device identifier",
    "DeviceMemoryUsed": "Used memory",
    "DeviceTotalMemeory": "Total memory",
    "DeviceFreeDiskSpace": "Free disk space",
    "DeviceTotalDiskCapacity": "Total disk capacity",
    "DevicePowerState": {
      "lowPowerMode": "Low power mode status",
      "batteryLevel": "Battery level",
      "batteryState": "Battery state"
    },
    "DeviceModal": "Device model",
    "publicIp": "Public IP address"
  }
}

Passenger Details

GET https://api.goflott.com/api/v3.3/user/passenger/{passengerId}

Retrieves detailed information about a specific passenger.

Response Example

{
  "data": {
    "id": "",
    "password": "",
    "last_login": null,
    "is_superuser": 0,
    "username": "",
    "first_name": "",
    "last_name": "",
    "email": ""
  }
}