1239 lines
36 KiB
YAML
1239 lines
36 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: Solidarity Mobility API
|
|
version: 1.0.0
|
|
servers:
|
|
- url: /
|
|
paths:
|
|
/passenger:
|
|
post:
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PassengerTripRequest'
|
|
required: true
|
|
responses:
|
|
"201":
|
|
description: Trip Request Created
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
summary: Create a Passenger Trip Request
|
|
tags:
|
|
- Passenger Trip Request
|
|
/driver_journeys:
|
|
get:
|
|
description: Route used to retrieve a collection of punctual planned outward
|
|
driver journeys matching the provided criteria.
|
|
operationId: getDriverJourneys
|
|
parameters:
|
|
- description: Latitude of searched departure point.
|
|
explode: true
|
|
in: query
|
|
name: departureLat
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
- description: Longitude of searched departure point.
|
|
explode: true
|
|
in: query
|
|
name: departureLng
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
- description: Latitude of searched arrival point.
|
|
explode: true
|
|
in: query
|
|
name: arrivalLat
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
- description: Longitude of searched arrival point.
|
|
explode: true
|
|
in: query
|
|
name: arrivalLng
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
- description: Departure datetime using a UNIX UTC timestamp in seconds.
|
|
explode: true
|
|
in: query
|
|
name: departureDate
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
style: form
|
|
- description: The operator's FQDN.
|
|
explode: true
|
|
in: query
|
|
name: operator
|
|
required: true
|
|
schema:
|
|
type: string
|
|
style: form
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
items:
|
|
$ref: '#/components/schemas/DriverJourney'
|
|
title: DriverJourneys
|
|
type: array
|
|
description: Ok. Request processed successfully.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
summary: Search for matching punctual planned outward driver journeys.
|
|
tags:
|
|
- Search
|
|
/driver_regular_availabilities:
|
|
post:
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DriverRegularAvailabilitiesRequest'
|
|
required: true
|
|
responses:
|
|
"201":
|
|
description: Regular driver availabilities set successfully.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
summary: Set Regular Driver Availabilities
|
|
tags:
|
|
- Driver Availability and Schedule
|
|
/driver_punctual_availabilities:
|
|
post:
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DriverPunctualAvailabilitiesRequest'
|
|
required: true
|
|
responses:
|
|
"201":
|
|
description: Punctual driver availabilities set successfully.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
summary: Set Punctual Driver Availabilities
|
|
tags:
|
|
- Driver Availability and Schedule
|
|
/messages:
|
|
post:
|
|
description: Route used to allow a user to connect back to the owner of a retrieved
|
|
journey through a texte message.
|
|
operationId: postConnections
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/postConnections_request'
|
|
responses:
|
|
"201":
|
|
description: Successful operation.
|
|
"404":
|
|
description: The targeted journey or user no more exists.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
summary: Send a message to the owner of a retrieved journey.
|
|
tags:
|
|
- Interact
|
|
/bookings:
|
|
get:
|
|
description: "Route used to filter and retrieve bookings based on the specified\
|
|
\ status, type, and ID."
|
|
operationId: filterBookingsByStatus
|
|
parameters:
|
|
- description: The operator's FQDN.
|
|
explode: true
|
|
in: query
|
|
name: operator
|
|
required: true
|
|
schema:
|
|
type: string
|
|
style: form
|
|
- description: The status of the bookings to filter.
|
|
explode: true
|
|
in: query
|
|
name: status
|
|
required: true
|
|
schema:
|
|
enum:
|
|
- WAITING_DRIVER_CONFIRMATION
|
|
- WAITING_PASSENGER_CONFIRMATION
|
|
- CONFIRMED
|
|
- CANCELLED
|
|
- COMPLETED_PENDING_VALIDATION
|
|
- VALIDATED
|
|
type: string
|
|
style: form
|
|
- explode: true
|
|
in: query
|
|
name: filterType
|
|
required: true
|
|
schema:
|
|
enum:
|
|
- driver
|
|
- passenger
|
|
type: string
|
|
style: form
|
|
- description: The ID (UUID) used.
|
|
explode: true
|
|
in: query
|
|
name: Id
|
|
required: true
|
|
schema:
|
|
format: uuid
|
|
type: string
|
|
style: form
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
items:
|
|
$ref: '#/components/schemas/Booking'
|
|
type: array
|
|
description: "Successful operation. Bookings matching the specified status,\
|
|
\ type, and ID."
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: "No bookings found for the specified status, type, and ID."
|
|
summary: "Filter and retrieve bookings by status, type, and ID."
|
|
tags:
|
|
- Bookings Filter
|
|
post:
|
|
description: "Route used to synchronize a Booking request initiated by a platform\
|
|
\ to the second platform involved in the shared punctual outward journey.\
|
|
\ While posting a new Booking, its status must always be set first as `status=WAITING_CONFIRMATION`."
|
|
operationId: postBookings
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BookingRequest'
|
|
responses:
|
|
"201":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Booking'
|
|
description: Successful operation. A new Booking has been created.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
summary: Create a punctual outward Booking request.
|
|
tags:
|
|
- Interact
|
|
/bookings/{bookingId}:
|
|
get:
|
|
description: "Route used to retrieve the details of an existing Booking request.\
|
|
\ Can only be used by the operator having created the Booking request. This\
|
|
\ route is provided to check if the Booking object state is similar between\
|
|
\ two operators, but its usage should be required to handle the full use case\
|
|
\ of a booking."
|
|
operationId: getBookings
|
|
parameters:
|
|
- description: The operator's FQDN.
|
|
explode: true
|
|
in: query
|
|
name: operator
|
|
required: true
|
|
schema:
|
|
type: string
|
|
style: form
|
|
- explode: false
|
|
in: path
|
|
name: bookingId
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/bookingId'
|
|
style: simple
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Booking'
|
|
description: Successful operation.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/getBookings_404_response'
|
|
description: "This Booking object no more exists. Error code can be among\
|
|
\ `missing_journey, missing_booking, missing_user` ."
|
|
summary: Retrieves an existing Booking request.
|
|
tags:
|
|
- Interact
|
|
patch:
|
|
description: "Route used to update the status of an existing Booking request.\
|
|
\ Should be used usually just to confirm, cancel, etc. an existing Booking."
|
|
operationId: patchBookings
|
|
parameters:
|
|
- description: The operator's FQDN.
|
|
explode: true
|
|
in: query
|
|
name: operator
|
|
required: true
|
|
schema:
|
|
type: string
|
|
style: form
|
|
- explode: false
|
|
in: path
|
|
name: bookingId
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/bookingId'
|
|
style: simple
|
|
- description: New status of the Booking.
|
|
explode: true
|
|
in: query
|
|
name: status
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/bookingStatus'
|
|
style: form
|
|
- description: Free text content of a message. The message can contain explanations
|
|
on the status change.
|
|
explode: true
|
|
in: query
|
|
name: message
|
|
required: false
|
|
schema:
|
|
maxLength: 500
|
|
type: string
|
|
style: form
|
|
responses:
|
|
"200":
|
|
description: Successful operation.
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
"401":
|
|
description: Unauthorized. You must authenticate.
|
|
"429":
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
"500":
|
|
description: Internal Server Error. Please try again later.
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/getBookings_404_response'
|
|
description: "The targeted journey, booking or user no more exists. Error\
|
|
\ code can be among `missing_journey, missing_booking, missing_user`\
|
|
\ ."
|
|
"409":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/getBookings_404_response'
|
|
description: Conflict. This booking has already the new status requested.
|
|
Error code is `status_already_set`.
|
|
summary: Updates status of an existing Booking request.
|
|
tags:
|
|
- Interact
|
|
components:
|
|
parameters:
|
|
departureLat:
|
|
description: Latitude of searched departure point.
|
|
explode: true
|
|
in: query
|
|
name: departureLat
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
departureLng:
|
|
description: Longitude of searched departure point.
|
|
explode: true
|
|
in: query
|
|
name: departureLng
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
arrivalLat:
|
|
description: Latitude of searched arrival point.
|
|
explode: true
|
|
in: query
|
|
name: arrivalLat
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
arrivalLng:
|
|
description: Longitude of searched arrival point.
|
|
explode: true
|
|
in: query
|
|
name: arrivalLng
|
|
required: true
|
|
schema:
|
|
type: number
|
|
style: form
|
|
departureDate:
|
|
description: Departure datetime using a UNIX UTC timestamp in seconds.
|
|
explode: true
|
|
in: query
|
|
name: departureDate
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
style: form
|
|
departureTimeOfDay:
|
|
description: "Departure time of day represented as [RFC3339 partial-time](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)."
|
|
example: 07:30:00
|
|
explode: true
|
|
in: query
|
|
name: departureTimeOfDay
|
|
required: true
|
|
schema:
|
|
format: partial-time
|
|
type: string
|
|
style: form
|
|
timeDelta:
|
|
description: Time margin in seconds. The retrieved journeys must match the given
|
|
time parameters within a +`timeDelta` / -`timeDelta` interval .
|
|
explode: true
|
|
in: query
|
|
name: timeDelta
|
|
required: false
|
|
schema:
|
|
default: 900
|
|
type: integer
|
|
style: form
|
|
minDepartureDate:
|
|
description: Minimum date of departure for the returned journeys. Datetime using
|
|
a UNIX UTC timestamp in seconds.
|
|
explode: true
|
|
in: query
|
|
name: minDepartureDate
|
|
required: false
|
|
schema:
|
|
type: integer
|
|
style: form
|
|
maxDepartureDate:
|
|
description: Maximum date of departure for the returned journeys. Datetime using
|
|
a UNIX UTC timestamp in seconds.
|
|
explode: true
|
|
in: query
|
|
name: maxDepartureDate
|
|
required: false
|
|
schema:
|
|
type: integer
|
|
style: form
|
|
departureRadius:
|
|
description: Search radius in kilometers around the departure point.
|
|
explode: true
|
|
in: query
|
|
name: departureRadius
|
|
required: false
|
|
schema:
|
|
default: 1.0
|
|
type: number
|
|
style: form
|
|
arrivalRadius:
|
|
description: Search radius in kilometers around the arrival point.
|
|
explode: true
|
|
in: query
|
|
name: arrivalRadius
|
|
required: false
|
|
schema:
|
|
default: 1.0
|
|
type: number
|
|
style: form
|
|
count:
|
|
description: "Maximum number of returned results. If missing, all matching results\
|
|
\ are returned."
|
|
explode: true
|
|
in: query
|
|
name: count
|
|
required: false
|
|
schema:
|
|
type: integer
|
|
style: form
|
|
responses:
|
|
BadRequest:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_passenger_post_400_response'
|
|
description: Bad Request. See error message.
|
|
Unauthorized:
|
|
description: Unauthorized. You must authenticate.
|
|
TooManyRequests:
|
|
description: Too Many Requests. Please slow down.
|
|
headers:
|
|
Retry-After:
|
|
explode: false
|
|
schema:
|
|
type: integer
|
|
style: simple
|
|
InternalServerError:
|
|
description: Internal Server Error. Please try again later.
|
|
schemas:
|
|
DriverJourney:
|
|
allOf:
|
|
- $ref: '#/components/schemas/DriverTrip'
|
|
- $ref: '#/components/schemas/JourneySchedule'
|
|
- properties:
|
|
price:
|
|
$ref: '#/components/schemas/Price'
|
|
type: object
|
|
type: object
|
|
Price:
|
|
example:
|
|
amount: 9.301444
|
|
currency: currency
|
|
type: FREE
|
|
properties:
|
|
type:
|
|
description: |-
|
|
Either « FREE », « PAYING » or « UNKNOWN ». « UNKNOWN » is given
|
|
when it should be « PAYING » but we cannot set the price yet.
|
|
enum:
|
|
- FREE
|
|
- PAYING
|
|
- UNKNOWN
|
|
type: string
|
|
amount:
|
|
description: "Carpooling passenger cost estimate. In the case of integrated\
|
|
\ booking by API, amount expected by the carpooling operator."
|
|
format: float
|
|
type: number
|
|
currency:
|
|
description: ISO 4217 code representing the currency of the price.
|
|
type: string
|
|
type: object
|
|
Car:
|
|
example:
|
|
model: model
|
|
brand: brand
|
|
properties:
|
|
model:
|
|
description: Model of the car.
|
|
type: string
|
|
brand:
|
|
description: Brand of the car.
|
|
type: string
|
|
type: object
|
|
User:
|
|
example:
|
|
firstName: firstName
|
|
lastName: lastName
|
|
gender: F
|
|
grade: 1
|
|
alias: alias
|
|
id: id
|
|
verifiedIdentity: true
|
|
operator: operator
|
|
picture: picture
|
|
properties:
|
|
id:
|
|
description: User's identifier. It MUST be unique for a given `operator`.
|
|
type: string
|
|
operator:
|
|
description: The operator identifier. MUST be a Fully Qualified Domain Name
|
|
(example carpool.mycity.com) owned by the operator or a Partially Qualified
|
|
Domain Name (example operator.org) owned and exclusively operated by the
|
|
operator. Operators SHOULD always send the same value.
|
|
type: string
|
|
alias:
|
|
description: User's alias.
|
|
type: string
|
|
firstName:
|
|
description: User's first name.
|
|
type: string
|
|
lastName:
|
|
description: User's last name.
|
|
type: string
|
|
grade:
|
|
description: User's grade from 1 to 5.
|
|
maximum: 5
|
|
minimum: 1
|
|
type: integer
|
|
picture:
|
|
description: User's profile picture absolute URL.
|
|
type: string
|
|
gender:
|
|
description: User's gender. 'O' stands for 'Other'.
|
|
enum:
|
|
- F
|
|
- M
|
|
- O
|
|
type: string
|
|
verifiedIdentity:
|
|
description: "true if the identity of this user has been verified by the\
|
|
\ operator or a third party; and the firstName, lastName, birthdate have\
|
|
\ been confirmed as identitical to an official identity proof document.\
|
|
\ Can be left empty if the information is not available."
|
|
type: boolean
|
|
required:
|
|
- alias
|
|
- id
|
|
- operator
|
|
type: object
|
|
DriverTrip:
|
|
allOf:
|
|
- properties:
|
|
user:
|
|
$ref: '#/components/schemas/User'
|
|
car:
|
|
$ref: '#/components/schemas/Car'
|
|
required:
|
|
- user
|
|
type: object
|
|
type: object
|
|
PassengerTripRequest:
|
|
example:
|
|
departure_address: departure_address
|
|
preferences:
|
|
music: true
|
|
luggageSize: 3
|
|
smoking: true
|
|
animals: true
|
|
isTalker: true
|
|
destination_address: destination_address
|
|
departure_longitude: 5.637376656633329
|
|
destination_latitude: 6.027456183070403
|
|
departure_date: 2
|
|
destination_longitude: 1.4658129805029452
|
|
user:
|
|
firstName: firstName
|
|
lastName: lastName
|
|
gender: F
|
|
grade: 1
|
|
alias: alias
|
|
id: id
|
|
verifiedIdentity: true
|
|
operator: operator
|
|
picture: picture
|
|
departure_latitude: 5.962133916683182
|
|
properties:
|
|
user:
|
|
$ref: '#/components/schemas/User'
|
|
destination_address:
|
|
type: string
|
|
destination_latitude:
|
|
format: double
|
|
type: number
|
|
destination_longitude:
|
|
format: double
|
|
type: number
|
|
departure_address:
|
|
type: string
|
|
departure_latitude:
|
|
format: double
|
|
type: number
|
|
departure_longitude:
|
|
format: double
|
|
type: number
|
|
departure_date:
|
|
description: Departure datetime using a UNIX UTC timestamp in seconds.
|
|
type: integer
|
|
preferences:
|
|
$ref: '#/components/schemas/Preferences'
|
|
required:
|
|
- departure_address
|
|
- departure_date
|
|
- departure_latitude
|
|
- departure_longitude
|
|
- destination_address
|
|
- destination_latitude
|
|
- destination_longitude
|
|
- user
|
|
type: object
|
|
Preferences:
|
|
example:
|
|
music: true
|
|
luggageSize: 3
|
|
smoking: true
|
|
animals: true
|
|
isTalker: true
|
|
properties:
|
|
smoking:
|
|
description: "If driver journey, specifies if the driver allows smoking\
|
|
\ in the car."
|
|
type: boolean
|
|
animals:
|
|
description: "If driver journey, specifies if the driver allows animals\
|
|
\ in the car."
|
|
type: boolean
|
|
music:
|
|
description: "If driver journey, specifies if the driver enjoys music in\
|
|
\ the car."
|
|
type: boolean
|
|
isTalker:
|
|
description: "If driver journey, specifies if the driver enjoys talking\
|
|
\ with passengers."
|
|
type: boolean
|
|
luggageSize:
|
|
description: |-
|
|
If driver journey, specifies the size of allowed luggages.
|
|
From very small (1) to very big (5).
|
|
maximum: 5
|
|
minimum: 1
|
|
type: integer
|
|
type: object
|
|
bookingId:
|
|
description: "Booking id is common between both operators, and must be created\
|
|
\ as a [UUID](https://datatracker.ietf.org/doc/html/rfc4122) by whoever initiates\
|
|
\ the booking. Usage of a [4 UUID](https://datatracker.ietf.org/doc/html/rfc4122#section-4.4)\
|
|
\ generation algorithm is advised."
|
|
format: uuid
|
|
type: string
|
|
passengerId:
|
|
format: uuid
|
|
type: string
|
|
driverId:
|
|
format: uuid
|
|
type: string
|
|
JourneySchedule:
|
|
properties:
|
|
passengerPickupDate:
|
|
description: Passenger pickup datetime as a UNIX UTC timestamp in seconds.
|
|
format: long
|
|
type: number
|
|
driverDepartureDate:
|
|
description: Driver departure datetime as a UNIX UTC timestamp in seconds.
|
|
format: long
|
|
type: number
|
|
type:
|
|
description: Type of journey. A dynamic journey is happening in real time.
|
|
enum:
|
|
- PLANNED
|
|
- DYNAMIC
|
|
- LINE
|
|
type: string
|
|
required:
|
|
- passengerPickupDate
|
|
- type
|
|
type: object
|
|
BookingRequest:
|
|
example:
|
|
driverId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
|
|
passengerId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
|
|
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
|
|
operator: operator
|
|
status: null
|
|
properties:
|
|
id:
|
|
description: "Booking id is common between both operators, and must be created\
|
|
\ as a [UUID](https://datatracker.ietf.org/doc/html/rfc4122) by whoever\
|
|
\ initiates the booking. Usage of a [4 UUID](https://datatracker.ietf.org/doc/html/rfc4122#section-4.4)\
|
|
\ generation algorithm is advised."
|
|
format: uuid
|
|
type: string
|
|
passengerId:
|
|
format: uuid
|
|
type: string
|
|
driverId:
|
|
format: uuid
|
|
type: string
|
|
status:
|
|
$ref: '#/components/schemas/bookingStatus'
|
|
operator:
|
|
type: string
|
|
required:
|
|
- driverId
|
|
- id
|
|
- operator
|
|
- passengerId
|
|
- status
|
|
type: object
|
|
Booking:
|
|
example:
|
|
passengerDropLng: 5.637376656633329
|
|
distance: 7
|
|
passengerDropLat: 5.962133916683182
|
|
passengerPickupDate: 0.8008281904610115
|
|
passengerDropAddress: passengerDropAddress
|
|
passengerPickupAddress: passengerPickupAddress
|
|
passengerPickupLng: 1.4658129805029452
|
|
duration: 2
|
|
driver:
|
|
firstName: firstName
|
|
lastName: lastName
|
|
gender: F
|
|
grade: 1
|
|
alias: alias
|
|
id: id
|
|
verifiedIdentity: true
|
|
operator: operator
|
|
picture: picture
|
|
passenger:
|
|
firstName: firstName
|
|
lastName: lastName
|
|
gender: F
|
|
grade: 1
|
|
alias: alias
|
|
id: id
|
|
verifiedIdentity: true
|
|
operator: operator
|
|
picture: picture
|
|
car:
|
|
model: model
|
|
brand: brand
|
|
passengerPickupLat: 6.027456183070403
|
|
price:
|
|
amount: 9.301444
|
|
currency: currency
|
|
type: FREE
|
|
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
|
|
status: null
|
|
properties:
|
|
id:
|
|
description: "Booking id is common between both operators, and must be created\
|
|
\ as a [UUID](https://datatracker.ietf.org/doc/html/rfc4122) by whoever\
|
|
\ initiates the booking. Usage of a [4 UUID](https://datatracker.ietf.org/doc/html/rfc4122#section-4.4)\
|
|
\ generation algorithm is advised."
|
|
format: uuid
|
|
type: string
|
|
driver:
|
|
$ref: '#/components/schemas/User'
|
|
passenger:
|
|
$ref: '#/components/schemas/User'
|
|
passengerPickupDate:
|
|
description: Passenger pickup datetime as a UNIX UTC timestamp in seconds.
|
|
format: long
|
|
type: number
|
|
passengerPickupLat:
|
|
description: Latitude of the passenger pick-up point.
|
|
format: double
|
|
type: number
|
|
passengerPickupLng:
|
|
description: Longitude of the passenger pick-up point.
|
|
format: double
|
|
type: number
|
|
passengerDropLat:
|
|
description: Latitude of the passenger drop-off point.
|
|
format: double
|
|
type: number
|
|
passengerDropLng:
|
|
description: Longitude of the passenger drop-off point.
|
|
format: double
|
|
type: number
|
|
passengerPickupAddress:
|
|
description: String representing the pickup-up address.
|
|
type: string
|
|
passengerDropAddress:
|
|
description: String representing the drop-off address.
|
|
type: string
|
|
status:
|
|
$ref: '#/components/schemas/bookingStatus'
|
|
duration:
|
|
description: Carpooling duration in seconds.
|
|
type: integer
|
|
distance:
|
|
description: |
|
|
Carpooling distance in meters.
|
|
type: integer
|
|
price:
|
|
$ref: '#/components/schemas/Price'
|
|
car:
|
|
$ref: '#/components/schemas/Car'
|
|
required:
|
|
- driver
|
|
- id
|
|
- passenger
|
|
- passengerDropLat
|
|
- passengerDropLng
|
|
- passengerPickupDate
|
|
- passengerPickupLat
|
|
- passengerPickupLng
|
|
- price
|
|
- status
|
|
type: object
|
|
bookingStatus:
|
|
default: WAITING_DRIVER_CONFIRMATION
|
|
description: Status of the booking.
|
|
enum:
|
|
- WAITING_DRIVER_CONFIRMATION
|
|
- WAITING_PASSENGER_CONFIRMATION
|
|
- CONFIRMED
|
|
- CANCELLED
|
|
- COMPLETED_PENDING_VALIDATION
|
|
- VALIDATED
|
|
type: string
|
|
DriverRegularAvailabilitiesRequest:
|
|
example:
|
|
preferences:
|
|
music: true
|
|
luggageSize: 3
|
|
smoking: true
|
|
animals: true
|
|
isTalker: true
|
|
address: address
|
|
car:
|
|
model: model
|
|
brand: brand
|
|
availabilities:
|
|
- dayOfWeek: MON
|
|
startTime: startTime
|
|
endTime: endTime
|
|
- dayOfWeek: MON
|
|
startTime: startTime
|
|
endTime: endTime
|
|
latitude: 0.8008281904610115
|
|
radius: 1
|
|
user:
|
|
firstName: firstName
|
|
lastName: lastName
|
|
gender: F
|
|
grade: 1
|
|
alias: alias
|
|
id: id
|
|
verifiedIdentity: true
|
|
operator: operator
|
|
picture: picture
|
|
longitude: 6.027456183070403
|
|
properties:
|
|
address:
|
|
description: The address or location description.
|
|
type: string
|
|
latitude:
|
|
description: The latitude coordinate of the location.
|
|
format: double
|
|
type: number
|
|
longitude:
|
|
description: The longitude coordinate of the location.
|
|
format: double
|
|
type: number
|
|
radius:
|
|
description: The radius around the location.
|
|
format: int32
|
|
type: integer
|
|
availabilities:
|
|
items:
|
|
$ref: '#/components/schemas/RegularAvailabilitySlot'
|
|
type: array
|
|
user:
|
|
$ref: '#/components/schemas/User'
|
|
preferences:
|
|
$ref: '#/components/schemas/Preferences'
|
|
car:
|
|
$ref: '#/components/schemas/Car'
|
|
required:
|
|
- address
|
|
- availabilities
|
|
- latitude
|
|
- longitude
|
|
- radius
|
|
- user
|
|
type: object
|
|
DriverPunctualAvailabilitiesRequest:
|
|
example:
|
|
preferences:
|
|
music: true
|
|
luggageSize: 3
|
|
smoking: true
|
|
animals: true
|
|
isTalker: true
|
|
address: address
|
|
car:
|
|
model: model
|
|
brand: brand
|
|
availabilities:
|
|
- date: 5
|
|
startTime: startTime
|
|
endTime: endTime
|
|
- date: 5
|
|
startTime: startTime
|
|
endTime: endTime
|
|
latitude: 0.8008281904610115
|
|
radius: 1
|
|
user:
|
|
firstName: firstName
|
|
lastName: lastName
|
|
gender: F
|
|
grade: 1
|
|
alias: alias
|
|
id: id
|
|
verifiedIdentity: true
|
|
operator: operator
|
|
picture: picture
|
|
longitude: 6.027456183070403
|
|
properties:
|
|
address:
|
|
description: The address or location description.
|
|
type: string
|
|
latitude:
|
|
description: The latitude coordinate of the location.
|
|
format: double
|
|
type: number
|
|
longitude:
|
|
description: The longitude coordinate of the location.
|
|
format: double
|
|
type: number
|
|
radius:
|
|
description: The radius around the location.
|
|
format: int32
|
|
type: integer
|
|
availabilities:
|
|
items:
|
|
$ref: '#/components/schemas/PunctualAvailabilitySlot'
|
|
type: array
|
|
user:
|
|
$ref: '#/components/schemas/User'
|
|
preferences:
|
|
$ref: '#/components/schemas/Preferences'
|
|
car:
|
|
$ref: '#/components/schemas/Car'
|
|
required:
|
|
- address
|
|
- availabilities
|
|
- latitude
|
|
- longitude
|
|
- radius
|
|
- user
|
|
type: object
|
|
RegularAvailabilitySlot:
|
|
example:
|
|
dayOfWeek: MON
|
|
startTime: startTime
|
|
endTime: endTime
|
|
properties:
|
|
dayOfWeek:
|
|
description: Day of the week for regular scheduling.
|
|
enum:
|
|
- MON
|
|
- TUE
|
|
- WED
|
|
- THU
|
|
- FRI
|
|
- SAT
|
|
- SUN
|
|
type: string
|
|
startTime:
|
|
description: Start time for regular scheduling (RFC3339 partial-time).
|
|
format: partial-time
|
|
type: string
|
|
endTime:
|
|
description: End time for regular scheduling (RFC3339 partial-time).
|
|
format: partial-time
|
|
type: string
|
|
required:
|
|
- dayOfWeek
|
|
- endTime
|
|
- startTime
|
|
type: object
|
|
PunctualAvailabilitySlot:
|
|
example:
|
|
date: 5
|
|
startTime: startTime
|
|
endTime: endTime
|
|
properties:
|
|
date:
|
|
description: UNIX UTC timestamp in seconds.
|
|
type: integer
|
|
startTime:
|
|
description: Start time for punctual scheduling (RFC3339 partial-time).
|
|
format: partial-time
|
|
type: string
|
|
endTime:
|
|
description: End time for punctual scheduling (RFC3339 partial-time).
|
|
format: partial-time
|
|
type: string
|
|
required:
|
|
- date
|
|
- endTime
|
|
- startTime
|
|
type: object
|
|
_passenger_post_400_response:
|
|
properties:
|
|
error:
|
|
type: string
|
|
type: object
|
|
postConnections_request:
|
|
properties:
|
|
from:
|
|
$ref: '#/components/schemas/User'
|
|
to:
|
|
$ref: '#/components/schemas/User'
|
|
message:
|
|
description: "Free text content of a message. The message can contain all\
|
|
\ the details (phone number, email, etc.) allowing the recipient to call\
|
|
\ back the sender in order to carpool with him/her."
|
|
maxLength: 500
|
|
type: string
|
|
recipientCarpoolerType:
|
|
default: DRIVER
|
|
description: Defines if the recipient of this message is either the driver
|
|
or the passenger.
|
|
enum:
|
|
- DRIVER
|
|
- PASSENGER
|
|
type: string
|
|
driverJourneyId:
|
|
description: ID of the Driver's journey to which the message is related
|
|
(if any). Unique given the `Driver`'s `operator` property.
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
passengerJourneyId:
|
|
description: ID of the Passenger's journey to which the message is related
|
|
(if any). Unique given the `Passenger`'s `operator` property.
|
|
maxLength: 255
|
|
minLength: 1
|
|
type: string
|
|
bookingId:
|
|
allOf:
|
|
- $ref: '#/components/schemas/bookingId'
|
|
description: ID of the booking to which the message is related (if any)
|
|
required:
|
|
- from
|
|
- message
|
|
- recipientCarpoolerType
|
|
- to
|
|
type: object
|
|
getBookings_404_response:
|
|
properties:
|
|
error:
|
|
description: Explain why the request couldn't be processed.
|
|
type: string
|
|
type: object
|