update readme

This commit is contained in:
sbouaram 2023-10-20 14:32:24 +02:00
parent f943119a51
commit 251a3ef607
1 changed files with 55 additions and 0 deletions

View File

@ -19,3 +19,58 @@ Coopgo Solidarity Service is a part of the coopgo MaaS platform, it implements t
## Interoperability Rest API: ## Interoperability Rest API:
- The operator FQDN string param is required in every request and should correspond to the mobility operator defined API key. - 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.