Go to file
sbouaram d12c55d740 sql error handling: no rows + duplicated key 2023-10-20 21:34:20 +02:00
.idea refactoring fmt + moving utils 2023-10-20 13:47:51 +02:00
handler refactoring fmt + moving utils 2023-10-20 13:47:51 +02:00
internal first commit 2023-10-20 13:41:39 +02:00
interoperability/solidarity-api/server sql error handling: no rows + duplicated key 2023-10-20 21:34:20 +02:00
servers/grpc sql error handling: no rows + duplicated key 2023-10-20 21:34:20 +02:00
storage sql error handling: no rows + duplicated key 2023-10-20 21:34:20 +02:00
utils sql error handling: no rows + duplicated key 2023-10-20 21:34:20 +02:00
config.go first commit 2023-10-20 13:41:39 +02:00
config.yaml first commit 2023-10-20 13:41:39 +02:00
go.mod first commit 2023-10-20 13:41:39 +02:00
go.sum first commit 2023-10-20 13:41:39 +02:00
main.go sql error handling: no rows + duplicated key 2023-10-20 21:34:20 +02:00
readme.md update readme 2023-10-20 14:32:24 +02:00

readme.md

Coopgo Solidarity-Service

Coopgo Solidarity Service is a part of the coopgo MaaS platform, it implements the Solidarity mobility API and communicate via gRPC internally ton handle Silvermobi application trips bookings.

Flow:

  • The driver enters his availabilities that can be regular or punctual as well as his address, radius and additional infos such as car infos and preferences.
  • The passenger enters his desired trip date , the trip route and additional infos such as preferences.
  • The available drivers can be than listed via the DriverJourneys request that includes the desired departure date and the departure pickup point, if the departure is the same as the driver departure point or is included in the driver defined radius, the driver will be listed.
  • After listing the drivers the passenger can initiate a booking with the desired driver.

Interoperability Rest API:

  • The operator FQDN string param is required in every request and should correspond to the mobility operator defined API key.

Interoperability API - Technical Documentation

This section provides a technical overview of the Solidarity API, explaining the flow for both drivers and passengers.

Driver Flow

1. Enter Availabilities , Radius and Departure route

  • Drivers can use the POST /drivers/availabilities endpoint to enter their availabilities including regular or punctual schedules,radius, departure route as well as some additional infos such as car and preferences.

Request Parameters:

  • user (Required): The driver's user information. Required parameters within user are operator , id and alias.
  • address (Required): Driver's address string.
  • Latitude (Required)
  • Longitude (Required)
  • radius (Required): Search radius around the location.
  • availabilities (Required): Array of regular or punctual schedules.
  • preferences (Optional): Driver's preferences.
  • car (Optional): Driver's car details.

2. Store Driver Data

  • The API will store the driver's information in its database for future reference.

Passenger Flow

1. Create Trip Request

  • Passengers can create a trip request using the POST /passengers/trip-request endpoint.

Request Parameters:

  • user (Required): Passenger's user information. Required parameters within user are operator , id and alias.
  • departure_address (Required): Departure address.
  • departure_latitude (Required): Latitude of the departure point.
  • departure_longitude (Required): Longitude of the departure point.
  • departure_date (Required): Desired departure date.
  • destination_address (Required): Destination address.
  • destination_latitude (Required): Latitude of the destination point.
  • destination_longitude (Required): Longitude of the destination point.
  • preferences (Optional): Passenger's preferences.

2. List Available Drivers

  • Passengers can use the GET /drivers/journeys endpoint to list available drivers for their trip.

Request Parameters:

  • departureDate (Required): Desired departure date.
  • departureLat (Required): Latitude of the departure point.
  • departureLng (Required): Longitude of the departure point.
  • operator (Required)

3. Other requests to get a booking, update its status, list bookings by status for a user (driver or passanger) are as well defined in the documentation.