MaaS API definition (0.0.1)

Download OpenAPI specification:Download

E-mail: dev@knot.city

Introduction

Knot MaaS API is an implementation of Instant System's APIs. This API allow a MaaS provider to integrate its solution with Knot, allowing to use Knot kick-scooter through others applications. An API Key is required, please contact us to get one.

Available features

The following features are implemented:

  • OAuth 2 login
  • Get stations list
  • Get stations statuses
  • Get vehicles list
  • Get user bookings list
  • Get a specific booking
  • Start an instant usage
  • Estimate price

Current limitations

There is no reservation for the moment. The billing / payment isn't implemented yet, so only a usage for free user (for example when a organization pay the usage for its employee) can be done through this API.

Authentication

MaasApiKey

All API call should be done using your API Key.

Security Scheme Type API Key
Header parameter name: x-api-key

MaaSAuthenticated

Required for user specific operation. Request should be made with a authentication token provided by the Oauth login.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Booking

List user's bookings

Return past and ongoing user's bookings.

query Parameters
minStartDate
string <date-time>
maxStartDate
string <date-time>

Responses

Response samples

Content type
application/json
{
  • "bookingInformations": [
    ]
}

Get specific booking

Return the specified user booking.

path Parameters
id
required
string
Example: 235

Identifier of the booking.

Responses

Response samples

Content type
application/json
{
  • "bookingInformations": {
    }
}

Instant Usage

Starts the usage of this mobility service by unlocking the vehicle.

Request Body schema: application/json
lat
string

User's current latitude.

lon
string

User's current longitude.

vehicle
string

This is the vehicle identifier, which can come from several mechanisms: Raw content of a QrCode read in a kick-scooter, serial name (written on the kick-scooter) typed by the user or the vehicle identifier.

Responses

Request samples

Content type
application/json
{
  • "lat": "string",
  • "lon": "string",
  • "vehicle": "string"
}

Response samples

Content type
application/json
{
  • "bookingInformations": {
    }
}

Stations

Stations list

This service provides the static list of stations for station-based vehicle fleet.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "stations": [
    ]
}

Stations statuses

This service provides the real time status of the stations for station-based vehicle fleet.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "stationsStatus": [
    ]
}

Vehicles

Vehicles list

This service provides the real time list of vehicles (free-floating and station-based).

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "vehicles": [