sbouaram 150c913feb | ||
---|---|---|
.idea | ||
handler | ||
internal | ||
interoperability/solidarity-api/server | ||
servers/grpc | ||
storage | ||
utils | ||
config.go | ||
config.yaml | ||
go.mod | ||
go.sum | ||
main.go | ||
readme.md |
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.
-
API Documentation can be found here:
https://git.coopgo.io/documentation/Solidarity_Mobility_API/wiki
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 withinuser
areoperator
,id
andalias
.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 withinuser
areoperator
,id
andalias
.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)