Mobile application API definition (1.0.0)

Download OpenAPI specification:Download

AppLabel

Get app download url

Return application store url of the requested app label

query Parameters
app_label
required
string

The name of the application white label calling the route.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Badges

Get user's badges

Return the badges of the user making the request.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Update name

Update the name of a badge.

Authorizations:
Authenticated
Request Body schema: application/json
required

Info of the badge.

badge_id
required
integer >= 1

The identifier of the badge to edit.

name
required
string <= 30

The new display name of the badge.

Responses

Request samples

Content type
application/json
{
  • "badge_id": 1,
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Delete a badge

Delete/unlink a badge of the user.

Authorizations:
Authenticated
query Parameters
badge_id
required
integer >= 1

The identifier of the badge to delete.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

BankGuarantees

Get user bank guarantees

Get the list of usable or currently used bank guarantees.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Create user bank guarantee

Create a new bank guarantee for the user.

Authorizations:
Authenticated
Request Body schema: application/json
required

Info about the bank guarantee to create.

vehicle_id
required
integer >= 1

The identifier of the vehicle we want to create a bank guarantee for.

payment_method_id
integer >= 1

The identifier of the payment method to use for the bank guarantee.

user_payment_method_id
integer >= 1

The identifier of the user's payment method instance to use for the bank guarantee.

keep_after_trip
boolean

When true, the guarantee will be kept for three days, otherwise its released after the trip ends.

object (UsePaymentMethodParameters)

Info that need to be provided when using a payment method.

Responses

Request samples

Content type
application/json
{
  • "vehicle_id": 1,
  • "payment_method_id": 1,
  • "user_payment_method_id": 1,
  • "keep_after_trip": true,
  • "payment_method_parameters": {
    }
}

Response samples

Content type
application/json
Example
{
  • "code": 0
}

Get payment methods for bank guarantee

Return all available payment methods usable by the user to make a bank guarantee for the given vehicle.

Authorizations:
Authenticated
query Parameters
vehicle_id
required
integer >= 1

Identifier of the vehicle to make a bank guarantee for.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "providers_setup_info": {
    }
}

Cancel bank guarantee

Cancel a bank guarantee before its automatic cancellation. This is for users which are in bank that withdraw the amount of the pre-authorization instead of just blocking it.

Authorizations:
Authenticated
path Parameters
id
required
string [ 1 .. 128 ] characters

The identifier of the bank guarantee to cancel.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Chats

Get chat channels

Return the list of reports, or chat channels, that the user made.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get a chat channel

Return a chat channel.

Authorizations:
Authenticated
path Parameters
report_id
required
integer >= 1

The identifier of the report to get.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Upload image

Upload an image into a new chat message.

Authorizations:
Authenticated
path Parameters
report_id
required
integer >= 1

The identifier of the report we want to add the image to.

Request Body schema: multipart/form-data
required

The picture to upload.

chat_image
required
string <binary>

The picture file data.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Clusters

Get clusters

Return clusters accessible by the user on a given area.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

The latitude of the center of the area in which to get clusters.

lng
required
number [ -180 .. 180 ]

The longitude of the center of the area in which to get clusters.

latDeg
required
number [ -90 .. 90 ]

The number of latitude degree of the area in which to get clusters. Can be compared to the height of the area.

lngDeg
required
number [ -180 .. 180 ]

The number of longitude degree of the area in which to get clusters. Can be compared to the width of the area.

lang
string^[a-z]{2}$

The language (ISO 639-1) to use for the description localization. Defaults to english.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Create cluster

Create a new cluster.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Info on the cluster to create.

lat
required
number [ -90 .. 90 ]

Latitude part of the location.

lng
required
number [ -180 .. 180 ]

Longitude part of the location.

name
required
string [ 1 .. 50 ] characters

Display name of this cluster.

network_id
required
integer >= 1

Identifier of the network in which this cluster is into.

Responses

Request samples

Content type
application/json
{
  • "lat": 48.5900027,
  • "lng": 7.7531998,
  • "name": "Knot Headquarters",
  • "network_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get closest clusters

Return the 20 closest clusters accessible by logged in users on a given area.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

The latitude of the center of the area in which to get clusters.

lng
required
number [ -180 .. 180 ]

The longitude of the center of the area in which to get clusters.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get public clusters

Return clusters accessible by anyone on a given area.

query Parameters
lat
required
number [ -90 .. 90 ]

The latitude of the center of the area in which to get clusters.

lng
required
number [ -180 .. 180 ]

The longitude of the center of the area in which to get clusters.

latDeg
required
number [ -90 .. 90 ]

The number of latitude degree of the area in which to get clusters. Can be compared to the height of the area.

lngDeg
required
number [ -180 .. 180 ]

The number of longitude degree of the area in which to get clusters. Can be compared to the width of the area.

lang
string^[a-z]{2}$

The language (ISO 639-1) to use for the description localization. Defaults to english.

network_id
integer >= 1

A network identifier of which to get public clusters.

app_label
required
string

The name of the application white label calling the route.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get cluster by id

Return the details of a cluster.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The cluster id.

query Parameters
lang
string^[a-z]{2}$

The language (ISO 639-1) to use for the description localization. Defaults to english.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Update cluster name

Update the cluster name.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the cluster we want to update.

Request Body schema: application/json
required

Info on the cluster to update.

name
string [ 1 .. 50 ] characters

The new name for the cluster.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get cluster spots

Return list of spot of the given cluster.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the cluster.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get cluster vehicles

Return list of vehicle of the given cluster.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the cluster.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Move cluster

Move a cluster to a new location.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the cluster we want to update.

Request Body schema: application/json
required

Info on the cluster to move.

lat
required
number [ -90 .. 90 ]

Latitude part of the location.

lng
required
number [ -180 .. 180 ]

Longitude part of the location.

Responses

Request samples

Content type
application/json
{
  • "lat": 48.5900027,
  • "lng": 7.7531998
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Change max unlock distance

Update the max unlock distance for a specific cluster.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the cluster we want to update.

Request Body schema: application/json
required

Info on the cluster to change unlock distance.

new_distance
required
integer or null [ 10 .. 1000 ]

New max unlock distance.

Responses

Request samples

Content type
application/json
{
  • "new_distance": 10
}

Response samples

Content type
application/json
{
  • "code": 0
}

Consents

Get user's consents

Return consents given by the user making the request.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Update consents

Update the user's consents.

Authorizations:
Authenticated
Request Body schema: application/json
required

New consents values.

required
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 0
}

Get consents types

Return all consents types.

Authorizations:
Authenticated
query Parameters
lang
required
string^[a-z]{2}$

The language (ISO 639-1) to use translating the consents name.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Update consents from token

Update the user's consents from unsubscribe token.

Request Body schema: application/json
required

New consents values.

required
object
token
required
string or null

Unsubscribe token from newsletter email.

Responses

Request samples

Content type
application/json
{
  • "consents": {
    },
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Countries

Get countries

Return all countries name, iso code and phone prefixes.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get country

Return a country from the given position.

query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of where to search the country.

lng
required
number [ -180 .. 180 ]

Longitude of where to search the country.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get country from ip

Return a country from the request ip.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Discounts

Get discounts

Return discounts used by the user.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get shop discount

Return discounts usable by the user for the shop.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of the user to get discounts available for offers on the nearest network.

lng
required
number [ -180 .. 180 ]

Longitude of the user to get discounts available for offers on the nearest network.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Use discount

Use a discount code.

Authorizations:
Authenticated
Request Body schema: application/json
required

The code of the discount and the position of the user.

lat
required
number [ -90 .. 90 ]

Latitude of the user to check that the discount is available on the nearest network.

lng
required
number [ -180 .. 180 ]

Longitude of the user to check that the discount is available on the nearest network.

code
required
string non-empty

Discount code to identify which discount we try to use.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180,
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Emails

Request email change

Send an email containing a confirmation link to change the user's email address to a new one.

Authorizations:
Authenticated
Request Body schema: application/json
required

New email.

email
required
string <email>

The new email address to send a confirmation email to.

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Check email change

Check email change token and retrieve email change data.

query Parameters
token
required
string

The token given in the email change link.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Confirm email change

Change the user's email by the new specified one.

Request Body schema: application/json
required

Info to authenticate the email change.

email_token
required
string = 10 characters

The mail change token.

email
required
string <email>

The new email address.

Responses

Request samples

Content type
application/json
{
  • "email_token": "stringstri",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Send confirmation email

Send again an email containing a confirmation link to confirm the user's email address. The token used for authentication is given by the login route with the code 7 (email not confirmed).

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Confirm email

Confirm the email of the user using the validation token.

Request Body schema: application/json
required

Info to authenticate the email conformation.

token
required
string = 10 characters

The mail change token.

Responses

Request samples

Content type
application/json
{
  • "token": "stringstri"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "android_store_url": "string",
  • "ios_store_url": "string",
  • "label_name": "string",
  • "email": "user@example.com"
}

Faq

Get faq

Get the content of the faq.

query Parameters
lang
required
string = 2 characters

The lang in which to get the faq localized.

app_label
string

The name of the application white label calling the route.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

GlobalAnnouncement

Get global announcement

Get the ongoing global announcement in the language requested if available.

query Parameters
lang
required
string = 2 characters

The lang in which to get the announcement.

app_label
required
string

The name of the application white label calling the route.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Login

Login

Log in a user with it's Knot account.

Request Body schema: application/json
required

Credentials of the user.

email
required
string <email>

Email of the user.

password
required
string [ 8 .. 255 ] characters

Password of the user.

scope
string
Enum: "app" "dashboard"

For what the token will be used.

object (LoginDevice)

Device being used to connect.

app_label
required
string [ 1 .. 20 ] characters

Name of the app label making the request.

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "stringst",
  • "scope": "app",
  • "device": {
    },
  • "app_label": "string"
}

Response samples

Content type
application/json
Example
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1,
  • "permissions": [
    ]
}

Check token

Check the validity of a token and return the user's permissions.

Authorizations:
Authenticated
Request Body schema: application/json
required

Information on the device used to login.

object (LoginDevice)

Device being used to connect.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 0,
  • "permissions": [
    ]
}

Refresh token

Request a new access token with the refresh token. You need to use the refresh token instead of the access token in the Authorization header. The given token will be invalidated and you will get a new one.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "access_token": "string",
  • "refresh_token": null
}

Apple login

Login with an Apple account.

Request Body schema: application/json
required

Info to authenticate with an Apple account.

token
required
string

Apple's idToken.

scope
string
Enum: "app" "dashboard"

For what the token will be used.

object (LoginDevice)

Device being used to connect.

app_label
required
string [ 1 .. 20 ] characters

Name of the app label making the request.

lang
string/^[a-zA-Z]{2}$/

The user's language. Defaults to English.

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "scope": "app",
  • "device": {
    },
  • "app_label": "string",
  • "lang": "string"
}

Response samples

Content type
application/json
Example
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1,
  • "permissions": [
    ]
}

Facebook login

Login with a Facebook account.

Request Body schema: application/json
required

Info to authenticate with a Facebook account.

token
required
string

Facebook's access token.

scope
string
Enum: "app" "dashboard"

For what the token will be used.

object (LoginDevice)

Device being used to connect.

app_label
required
string [ 1 .. 20 ] characters

Name of the app label making the request.

lang
string/^[a-zA-Z]{2}$/

The user's language. Defaults to English.

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "scope": "app",
  • "device": {
    },
  • "app_label": "string",
  • "lang": "string"
}

Response samples

Content type
application/json
Example
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1,
  • "permissions": [
    ]
}

Google login

Login with a google account.

Request Body schema: application/json
required

Info to authenticate with a Google account.

token
required
string

Google's idToken.

scope
string
Enum: "app" "dashboard"

For what the token will be used.

object (LoginDevice)

Device being used to connect.

app_label
required
string [ 1 .. 20 ] characters

Name of the app label making the request.

lang
string/^[a-zA-Z]{2}$/

The user's language. Defaults to English.

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "scope": "app",
  • "device": {
    },
  • "app_label": "string",
  • "lang": "string"
}

Response samples

Content type
application/json
Example
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1,
  • "permissions": [
    ]
}

Reset password

Send an email to reset a user's password.

Request Body schema: application/json
required

Info on the user who want to reset its password.

email
required
string <email>

Account's email which we want to reset the password.

app_label
required
string [ 1 .. 20 ] characters

Name of the app label making the request.

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "app_label": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

2FA Login

Second factor check for users with 2FA, route to call if a login route returns the code 146 (TwoFactorRequired). The authentication token is the one given by the login route that returned the code 146.

Request Body schema: application/json
required

Info to complete the authentication's second factor.

mfa_token
required
string/^\d{6}$/

A token given by an OTP app for the generated key.

object (LoginDevice)

Device being used to connect.

Responses

Request samples

Content type
application/json
{
  • "mfa_token": "string",
  • "device": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1,
  • "permissions": [
    ]
}

Begin 2FA Setup

Begin enabling two factors authentication by generating a key and a url for an otp application. User should save the key in its app then call the login/2fa/verify route.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "key": "KVKGQ32EK5BEKNTUNRTESTDSOU",
  • "key_url": "otpauth://totp/Knot%3AArlo_Stehr50%40yahoo.com?secret=KVKGQ32EK5BEKNTUNRTESTDSOU",
  • "token": "string"
}

End 2FA Setup

End the two factors authentication setup by verifying one code generated by an OTP app and the token given in the login/2fa/generate route.

Authorizations:
Authenticated
Request Body schema: application/json
required

Info from the OTP application and given by the begin route.

token
required
string

Token given in the login/2fa/generate route.

mfa_token
required
string/^\d{6}$/

A token given by an OTP app for the generated key.

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "mfa_token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Disable 2FA

Disable two factors authentication for the user.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Logout

Logout

Logout from a device or all device if is are specified.

Authorizations:
Authenticated
Request Body schema: application/json
required

The device to logout.

device_id
string [ 1 .. 50 ] characters

Unique identifier of the device disconnecting. If omitted all user's devices are disconnected and sessions are invalidated.

Responses

Request samples

Content type
application/json
{
  • "device_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Maintenances

Get maintenances types

Returns all available maintenance types.

Authorizations:
(AuthenticatedPermissions)
query Parameters
lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get maintenances of spot

Returns all the ongoing maintenances of a spot.

Authorizations:
(AuthenticatedPermissions)
query Parameters
spot_id
required
integer >= 1

The identifier of the spot we want to get the maintenances of.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Add spot maintenance

Create a new maintenance for a spot.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Info on the maintenance to add.

maintenance_type
required
string [ 1 .. 50 ] characters

The type of maintenance to add.

comment
string [ 1 .. 1024 ] characters

An optional comment for the maintenance.

severity
string
Enum: "info" "low" "high"

The severity of this maintenance. If not provided we default on the severity of the maintenance type.

report_id
integer

An optional identifier of the report linked.

spot_id
required
integer >= 0

The identifier of the spot on which to add the maintenance.

Responses

Request samples

Content type
application/json
{
  • "maintenance_type": "string",
  • "comment": "string",
  • "severity": "info",
  • "report_id": 0,
  • "spot_id": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get maintenances history of spot

Returns all the resolved maintenances of a spot.

Authorizations:
(AuthenticatedPermissions)
query Parameters
spot_id
required
integer >= 1

The identifier of the spot we want to get the maintenances of.

last_maintenance_id
integer >= 1

The identifier of the last maintenance we have, to get the maintenances coming after it.

direction
string
Enum: "ASC" "DESC"

The direction in which to sort the maintenances.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get maintenances of vehicle

Returns all the ongoing maintenances of a vehicle.

Authorizations:
(AuthenticatedPermissions)
query Parameters
vehicle_id
integer >= 1

The identifier of the vehicle we want to get the maintenances of. You need to specify at least one of the parameters.

serial_number
string [ 6 .. 10 ] characters

The serial number of the vehicle we want to get the maintenances of. You need to specify at least one of the parameters.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Add vehicle maintenance

Create a new maintenance for a vehicle.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Info on the maintenance to add.

maintenance_type
required
string [ 1 .. 50 ] characters

The type of maintenance to add.

comment
string [ 1 .. 1024 ] characters

An optional comment for the maintenance.

severity
string
Enum: "info" "low" "high"

The severity of this maintenance. If not provided we default on the severity of the maintenance type.

report_id
integer

An optional identifier of the report linked.

vehicle_id
integer >= 1

The identifier of the vehicle on which to add the maintenance. You need to specify at least one of the parameters.

serial_number
string [ 6 .. 10 ] characters

The serial number of the vehicle on which to add the maintenance. You need to specify at least one of the parameters.

Responses

Request samples

Content type
application/json
{
  • "maintenance_type": "string",
  • "comment": "string",
  • "severity": "info",
  • "report_id": 0,
  • "vehicle_id": 1,
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get maintenances history of vehicle

Returns all the resolved maintenances of a vehicle.

Authorizations:
(AuthenticatedPermissions)
query Parameters
vehicle_id
integer >= 1

The identifier of the vehicle we want to get the maintenances of. You need to specify at least one of the parameters.

serial_number
string [ 6 .. 10 ] characters

The serial number of the vehicle we want to get the maintenances of. You need to specify at least one of the parameters.

last_maintenance_id
integer >= 1

The identifier of the last maintenance we have, to get the maintenances coming after it.

direction
string
Enum: "ASC" "DESC"

The direction in which to sort the maintenances.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get maintenances of station

Returns all the ongoing maintenances of a station. This only returns the maintenances concerning the station as a whole and not its spots or vehicles.

Authorizations:
(AuthenticatedPermissions)
query Parameters
station_id
required
integer >= 1

The identifier of the station we want to get the maintenances of.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Add station maintenance

Create a new maintenance for a station.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Info on the maintenance to add.

maintenance_type
required
string [ 1 .. 50 ] characters

The type of maintenance to add.

comment
string [ 1 .. 1024 ] characters

An optional comment for the maintenance.

severity
string
Enum: "info" "low" "high"

The severity of this maintenance. If not provided we default on the severity of the maintenance type.

report_id
integer

An optional identifier of the report linked.

station_id
required
integer >= 0

The identifier of the station on which to add the maintenance.

Responses

Request samples

Content type
application/json
{
  • "maintenance_type": "string",
  • "comment": "string",
  • "severity": "info",
  • "report_id": 0,
  • "station_id": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get maintenances history of station

Returns all the resolved maintenances of a station. This only returns the maintenances concerning the station as a whole and not its spots or vehicles.

Authorizations:
(AuthenticatedPermissions)
query Parameters
station_id
required
integer >= 1

The identifier of the station we want to get the maintenances of.

last_maintenance_id
integer >= 1

The identifier of the last maintenance we have, to get the maintenances coming after it.

direction
string
Enum: "ASC" "DESC"

The direction in which to sort the maintenances.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get maintenances overview of cluster

Returns the list of spot of the cluster with the a count of all maintenances on them.

Authorizations:
(AuthenticatedPermissions)
query Parameters
cluster_id
required
integer >= 1

The identifier of the cluster we want to get the overview of.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get count maintenances of clusters

Returns the list of clusters given with the maintenance count for each cluster.

Authorizations:
(AuthenticatedPermissions)
query Parameters
clusters
required
Array of integers[ items >= 1 ]
Examples:
  • clusters=5 - With one cluster id.
  • clusters=1,5,7 - With multiple cluster id.

Identifier of clusters of which to get the maintenance count.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Update maintenance

Update of the comment and severity of a maintenance.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the maintenance we want to update.

Request Body schema: application/json
required

Info on the maintenance to update.

comment
string [ 1 .. 1024 ] characters

The new comment for the maintenance.

severity
string
Enum: "info" "low" "high"

The new severity for the maintenance.

Responses

Request samples

Content type
application/json
{
  • "comment": "string",
  • "severity": "info"
}

Response samples

Content type
application/json
{
  • "code": 0
}

End or delete maintenance

Mark a maintenance as resolved or delete it.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the maintenance we want to mark as resolved.

query Parameters
delete_from_history
boolean

When true, delete the maintenance from the history, otherwise it is marked as solved.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Link picture to maintenance

Upload a picture and link it to a maintenance.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the maintenance we want to attach an image to.

Request Body schema: multipart/form-data
required

The picture to upload.

maintenance_picture
required
string <binary>

The picture file data.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Map

Get map elements

Return clusters, free floating vehicles, user's rents and passes and virtual parking.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get map elements.

lng
required
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get map elements.

latdeg
required
number >= 0

Number of latitude degree of the area of which we want to get map elements.

lngdeg
required
number >= 0

Number of longitude degree of the area of which we want to get map elements.

lang
string = 2 characters

Language in which to get the localization, defaults to 'en'.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "clusters": [
    ],
  • "vehicles": [
    ],
  • "parkings": [
    ],
  • "rents": [
    ],
  • "passes": [
    ],
  • "networks": [
    ],
  • "speed_zones": [
    ]
}

Get public map elements

Return clusters, free floating vehicles and virtual parking publicly visible.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get map. elements.

lng
required
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get map. elements.

latDeg
required
number >= 0

Number of latitude degree of the area of which we want to get map. elements.

lngDeg
required
number >= 0

Number of longitude degree of the area of which we want to get map. elements.

network_id
integer >= 1

Network id to filter clusters.

lang
string = 2 characters

Language in which to get the localization, defaults to 'en'.

app_label
required
string

The name of the application white label calling the route.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "clusters": [
    ],
  • "vehicle": [
    ],
  • "parkings": [
    ],
  • "networks": [
    ],
  • "speed_zones": [
    ]
}

Networks

Get networks

Return a list of networks. If lat, lng, latdeg and lngdeg are given this returns the networks in the defined area otherwise this returns all networks.

Authorizations:
Authenticated
query Parameters
lat
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get networks.

lng
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get networks.

latdeg
number >= 0

Number of latitude degree of the area of which we want to get networks.

lngdeg
number >= 0

Number of longitude degree of the area of which we want to get networks.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get public networks

Return a list of public networks. If lat, lng, latdeg and lngdeg are given this returns the public networks in the defined area otherwise this returns all public networks.

query Parameters
lat
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get public networks.

lng
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get public networks.

latdeg
number >= 0

Number of latitude degree of the area of which we want to get public networks.

lngdeg
number >= 0

Number of longitude degree of the area of which we want to get public networks.

app_label
required
string

The name of the application white label calling the route.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get nearest networks

Return all networks ordered by distance.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of user's position.

lng
required
number [ -180 .. 180 ]

Longitude of user's position.

lang
required
string = 2 characters

The lang in which to get the types localized.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get details

Return some details about the network.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The network's identifier.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get network pricing

Return pricing (price by minute of rent, price to unlock and to free float lock) of the specified network.

path Parameters
id
required
integer >= 1

The network's identifier.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Offers

Get offers

Return all available offers for the nearest network.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of the user.

lng
required
number [ -180 .. 180 ]

Longitude of the user.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get payment methods for offer

Return all available payment methods usable by the user to purchase the given offer.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the offer to purchase.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "providers_setup_info": {
    }
}

Purchase offer

Purchase an offer with the given payment method.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the offer to purchase.

Request Body schema: application/json
required

Info about what to use to purchase the offer.

payment_method_id
required
integer >= 1

Identifier of the payment method to use.

user_payment_method_id
integer >= 1

Identifier of the instance of a payment method of the user. Depending on the payment method used this can be required.

discount_id
integer >= 1

Identifier of the discount to use to purchase this offer.

object (UsePaymentMethodParameters)

Info that need to be provided when using a payment method.

Responses

Request samples

Content type
application/json
{
  • "payment_method_id": 1,
  • "user_payment_method_id": 1,
  • "discount_id": 1,
  • "payment_method_parameters": {
    }
}

Response samples

Content type
application/json
Example
{
  • "code": 0
}

Organizations

Get organization

Return information of user's organization.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get organization rules

Return usage rules of user's organization.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Organization pay everything for network.

Get whether or not the user's organization pay for everything for the given network.

Authorizations:
Authenticated
path Parameters
network_id
required
integer >= 1

Identifier of the network we want to check.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get organization for enrolment

Return organization information linked to enrolment token.

query Parameters
token
required
string <uuid>

The enrolment token.

lang
required
string^[a-z]{2}$

The language (ISO 639-1) to use for the terms of use.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Enrol organization

Request to enrol the specified organization

Authorizations:
Authenticated
Request Body schema: application/json
required

Organization enrolment params.

token
required
string <uuid>

The enrolment token.

custom_field_value
string <= 500 characters

Optional custom field value for organization enrolment.

Responses

Request samples

Content type
application/json
{
  • "token": "b5507016-7da2-4777-a161-1e8042a6a377",
  • "custom_field_value": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Passes

Get user Passes

Return user Passes that are not used.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get buyable Passes

Return all available Passes to be bought for the nearest or the specified network.

Authorizations:
Authenticated
query Parameters
lat
number [ -90 .. 90 ]

Latitude of the user. Required if network_id is omitted, ignored otherwise.

lng
number [ -180 .. 180 ]

Longitude of the user. Required if network_id is omitted, ignored otherwise.

network_id
integer >= 1

A network identifier of which to get available Pass. If omitted, user position is required.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get payment methods for pass

Return all available payment methods usable by the user to purchase the given pass.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the pass to purchase.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "providers_setup_info": {
    }
}

Enable a Pass

Activate the specified user Pass.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the user pass to activate.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Disable a Pass

Deactivate the specified user Pass. This can only be done if the Pass was activated less than 2 minutes ago and if the Pass was not used at all.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the user pass to deactivate.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Redeem a Pass

Buy the specified Pass, paying with what is on the user's wallet.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the pass to redeem.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Purchase a Pass

Buy the specified Pass, paying with the chosen payment method.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the pass to purchase.

Request Body schema: application/json
required

Info about what to use to purchase the pass.

payment_method_id
required
integer >= 1

Identifier of the payment method to use.

user_payment_method_id
integer >= 1

Identifier of the instance of a payment method of the user. Depending on the payment method used this can be required.

discount_id
integer >= 1

Identifier of the discount to use to purchase this pass.

object (UsePaymentMethodParameters)

Info that need to be provided when using a payment method.

Responses

Request samples

Content type
application/json
{
  • "payment_method_id": 1,
  • "user_payment_method_id": 1,
  • "discount_id": 1,
  • "payment_method_parameters": {
    }
}

Response samples

Content type
application/json
{}

PaymentMethods

Get payment methods

Get the list of payment methods of the user.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get available payment method

Get the list of payment method that the user can configure.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "providers_setup_info": {
    }
}

Configure payment method

Configure an instance of the payment method for the user.

Authorizations:
Authenticated
path Parameters
method_id
required
integer >= 1

The identifier of payment method to configure.

Request Body schema: application/json
required

Info about the bank guarantee to create.

required
object or object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get the state of a payment method setup intent

Get the current state of a payment method setup intent.

Authorizations:
Authenticated
path Parameters
intent_id
required
integer >= 1

The identifier of payment method setup intent.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": { }
}

Continue processing payment method setup intent

Continue the processing of a payment method setup intent after the user has done some actions on his side.

Authorizations:
Authenticated
path Parameters
intent_id
required
integer >= 1

The identifier of payment method setup intent.

Request Body schema: application/json
required

Info to continue the processing of a payment method setup intent.

data
required
object

Data used to process the payment method setup intent (none for now).

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 196
}

Update a payment method

Update a payment method. For co-branded cards this allows to select a preferred network, other payment methods are not supported.

Authorizations:
Authenticated
path Parameters
user_method_id
required
integer >= 1

The identifier of user payment method to update.

Request Body schema: application/json
required

Things to update on the payment method.

preferred_network
string
Enum: "cartes_bancaires" "mastercard" "visa"

When updating a card, this set the preferred network to use for future or automatic purchases.

Responses

Request samples

Content type
application/json
{
  • "preferred_network": "cartes_bancaires"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Delete payment method

Delete an instance of a payment method of the user. If the default payment method is deleted, a new default one is automatically selected.

Authorizations:
Authenticated
path Parameters
user_method_id
required
integer >= 1

The identifier of user payment method to delete.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Set default payment method

Set a payment method as the default one for the user.

Authorizations:
Authenticated
path Parameters
user_method_id
required
integer >= 1

The identifier of user payment method to set as the default one.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Phone

Request code

Request to send a code to a phone number by SMS.

Authorizations:
PhoneValidationToken
Request Body schema: application/json
required

Info for where to send the SMS.

phone_number
required
string [ 1 .. 20 ] characters ^\+\d{1,4} ?\d{3,14}$

The phone number in E.164 format to which we want to send the validation code.

lang
required
string = 2 characters ^[a-zA-Z]{2}$

The language to use in the SMS, default to english if not available.

Responses

Request samples

Content type
application/json
{
  • "phone_number": "string",
  • "lang": "st"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Verify a code

Verify that the user received the code previously generated and mark the phone number as verified.

Authorizations:
PhoneValidationToken
Request Body schema: application/json
required

The code received by SMS.

sms_code
required
string = 6 characters ^\d{6}$

The code received by SMS.

Responses

Request samples

Content type
application/json
{
  • "sms_code": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Price estimation

Estimate price of a rent

Return the price for a rent of the specified time on the specified network.

Authorizations:
Authenticated
query Parameters
network_id
required
integer >= 1

The identifier of the network in which the rent will be done.

start_date
required
string <date-time>

When the rent will start.

end_date
required
string <date-time>

When the rent will end.

vehicle_model_id
required
integer >= 1

The vehicle model that will be used for the trip.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Reports

Create an app report

Create a new report of type app, called by the app when it receive an error code from the backend, used to store it.

Authorizations:
Authenticated
Request Body schema: application/json
required

Application report data.

code
required
integer

The error code returned by the backend.

app_page
required
string [ 1 .. 128 ] characters

Identifier of the application's page that received the error.

app_version
required
string [ 1 .. 32 ] characters

Version of the application that received the error.

device_os
required
string [ 1 .. 32 ] characters

Operating system of the device that run the app.

device
string [ 1 .. 128 ] characters

Name of the device that run the app.

app_label
string [ 1 .. 20 ] characters

The white label of the app.

Responses

Request samples

Content type
application/json
{
  • "code": 0,
  • "app_page": "string",
  • "app_version": "string",
  • "device_os": "string",
  • "device": "string",
  • "app_label": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Create an anonymous app report

Create a new report of type app, called by the app when it receive an error code from the backend, used to store it. Do not require authentication.

Authorizations:
Authenticated
Request Body schema: application/json
required

Anonymous application report data.

code
required
integer

The error code returned by the backend.

app_page
required
string [ 1 .. 128 ] characters

Identifier of the application's page that received the error.

app_version
required
string [ 1 .. 32 ] characters

Version of the application that received the error.

device_os
required
string [ 1 .. 32 ] characters

Operating system of the device that run the app.

device
string [ 1 .. 128 ] characters

Name of the device that run the app.

app_label
string [ 1 .. 20 ] characters

The white label of the app.

Responses

Request samples

Content type
application/json
{
  • "code": 0,
  • "app_page": "string",
  • "app_version": "string",
  • "device_os": "string",
  • "device": "string",
  • "app_label": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Create vehicle report

Create a new damaged vehicle report with a picture.

Authorizations:
Authenticated
Request Body schema: multipart/form-data
required

The picture to upload & some info for the report.

report_photo
required
string <binary>

The picture file data.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

vehicle_lat
required
number [ -90 .. 90 ]

Latitude of the vehicle given by the user.

vehicle_lng
required
number [ -180 .. 180 ]

Longitude of the vehicle given by the user.

comment
required
string

A text explaining what is happening.

serial_number
string^[a-zA-Z0-9]{6,10}$

The serial number of the vehicle.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Create vehicle report

Create a new damaged vehicle report without a picture.

Authorizations:
Authenticated
Request Body schema: application/json
required

Some info for the report.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

vehicle_lat
required
number [ -90 .. 90 ]

Latitude of the vehicle given by the user.

vehicle_lng
required
number [ -180 .. 180 ]

Longitude of the vehicle given by the user.

comment
required
string

A text explaining what is happening.

serial_number
string^[a-zA-Z0-9]{6,10}$

The serial number of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "user_lat": -90,
  • "user_lng": -180,
  • "vehicle_lat": -90,
  • "vehicle_lng": -180,
  • "comment": "string",
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Create station report

Create a new damaged station report with a picture.

Authorizations:
Authenticated
Request Body schema: multipart/form-data
required

The picture to upload & some info for the report.

report_photo
required
string <binary>

The picture file data.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

comment
required
string

A text explaining what is happening.

spots
Array of integers[ items >= 1 ]

A list of spot damaged.

cluster_id
required
integer >= 1

The identifier of the damaged cluster.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Create station report

Create a new damaged station report without a picture.

Authorizations:
Authenticated
Request Body schema: application/json
required

Some info for the report.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

comment
required
string

A text explaining what is happening.

spots
Array of integers[ items >= 1 ]

A list of spot damaged.

cluster_id
required
integer >= 1

The identifier of the damaged cluster.

Responses

Request samples

Content type
application/json
{
  • "user_lat": -90,
  • "user_lng": -180,
  • "comment": "string",
  • "spots": [
    ],
  • "cluster_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Create station full report

Create a new station full report.

Authorizations:
Authenticated
Request Body schema: application/json
required

Some info for the report.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

cluster_id
required
integer >= 1

The identifier of the damaged cluster.

serial_number
string^[a-zA-Z0-9]{6,10}$

The serial number of the vehicle the user is trying to park.

Responses

Request samples

Content type
application/json
{
  • "user_lat": -90,
  • "user_lng": -180,
  • "cluster_id": 1,
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Create text report

Create a new text report with a picture.

Authorizations:
Authenticated
Request Body schema: multipart/form-data
required

The picture to upload & some info for the report.

report_photo
required
string <binary>

The picture file data.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

comment
required
string

A text explaining what is happening.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Create text report

Create a new text report without a picture.

Authorizations:
Authenticated
Request Body schema: application/json
required

Some info for the report.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

comment
required
string

A text explaining what is happening.

Responses

Request samples

Content type
application/json
{
  • "user_lat": -90,
  • "user_lng": -180,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Create payment report

Create a new report about a payment issue.

Authorizations:
Authenticated
Request Body schema: application/json
required

Some info for the report.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

comment
required
string

A text explaining what is happening.

Responses

Request samples

Content type
application/json
{
  • "user_lat": -90,
  • "user_lng": -180,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Create trip not ending report

Trip not ending designate the case when the user returned the vehicle but the end of the trip was not detected. Calling this route without a comment will try to auto remediate the problem, if it's possible it will automatically create the report. In case of failure to auto remediate, you need to call this route with a comment to just create the report.

Authorizations:
Authenticated
Request Body schema: application/json
required

Some info for the report.

user_lat
required
number [ -90 .. 90 ]

Latitude of the user making the report.

user_lng
required
number [ -180 .. 180 ]

Longitude of the user making the report.

comment
string

A text explaining what is happening. When not given, the route will try to automatically solve the problem.

cluster_id
required
integer >= 1

The identifier of the cluster in which the vehicle was put.

serial_number
required
string^[a-zA-Z0-9]{6,10}$

The serial number of the vehicle the user locked but its trip did not end.

spot_id
required
integer >= 1

The identifier of the spot in which the vehicle was put.

Responses

Request samples

Content type
application/json
{
  • "user_lat": -90,
  • "user_lng": -180,
  • "comment": "string",
  • "cluster_id": 1,
  • "serial_number": "string",
  • "spot_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Resolve report

Mark the specified report as resolved, or reopen it.

Authorizations:
Authenticated
path Parameters
report_id
required
integer >= 1

Identifier of the report.

Request Body schema: application/json
required

Solve report parameter.

close
boolean

Indicate if report should be close. Set to false to reopen report.

Responses

Request samples

Content type
application/json
{
  • "close": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Sponsorship

Get sponsorship

Return sponsorship info.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "url": "string",
  • "spcode": "stringst",
  • "currency": "string",
  • "sponsoring_reward": 0,
  • "sponsored_reward": 0
}

Spots

Edit displayed number

Edit the displayed number of a spot.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

New displayed number for this spot.

spot_id
required
integer >= 1

The spot's identifier.

displayed_number
required
integer >= 1

The displayed number of the spot.

Responses

Request samples

Content type
application/json
{
  • "spot_id": 1,
  • "displayed_number": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get all information about a spot

Return all information about a spot.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The spot's identifier.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Unlock

Unlock the specified spot if the user is close enough.

Authorizations:
Authenticated
Request Body schema: application/json
required

Spot unlock parameters.

lat
required
number [ -90 .. 90 ]

Latitude of the user to check that it is not too far away to unlock.

lng
required
number [ -180 .. 180 ]

Longitude of the user to check that it is not too far away to unlock.

cluster_id
required
integer >= 1

The identifier of the cluster on which the spot is located.

displayed_number
required
integer >= 1

The number displayed on the spot.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180,
  • "cluster_id": 1,
  • "displayed_number": 1
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Admin unlock

Unlock the specified spot in admin mode.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Spot unlock parameters.

lat
required
number [ -90 .. 90 ]

Latitude of the user to check that it is not too far away to unlock.

lng
required
number [ -180 .. 180 ]

Longitude of the user to check that it is not too far away to unlock.

spot_id
required
integer >= 1

The identifier of the spot to be unlocked.

force
boolean

True when the unlocking is confirmed despite the distance.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180,
  • "spot_id": 1,
  • "force": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Stations

Create a station

Create a new station with belonging spots on the given cluster.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Station create parameters.

station_id
required
integer >= 1

The SVaaS station identifier.

cluster_id
required
integer >= 1

The cluster's identifier.

Responses

Request samples

Content type
application/json
{
  • "station_id": 1,
  • "cluster_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Set station mainboard id

Changes the mainboard id of the specified station.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the station.

Request Body schema: application/json
required

Station mainboard id parameters.

mainboard_id
required
integer >= 1

The new mainboard id.

Responses

Request samples

Content type
application/json
{
  • "mainboard_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Set station volume

Changes the speaker's volume of the specified station.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Station volume parameters.

station_id
required
integer >= 1

The station's identifier.

volume
required
integer [ 1 .. 100 ]

The new volume in percentage.

Responses

Request samples

Content type
application/json
{
  • "station_id": 1,
  • "volume": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Set station alarm threshold

Changes the alarm threshold of the specified station.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Station alarm threshold parameters.

station_id
required
integer >= 1

The station's identifier.

threshold
required
integer [ 1 .. 100 ]

The new alarm threshold in percentage.

Responses

Request samples

Content type
application/json
{
  • "station_id": 1,
  • "threshold": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get stations of a cluster

Return all station's of the specified cluster with some information.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the cluster of which we want to get it's stations.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Stocks

Get stocks addresses

Return all addresses where vehicles can be stored.

Authorizations:
(AuthenticatedPermissions)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Move a vehicle to stock

Move a vehicle from missing vehicles to an existing stock.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

The vehicle and the identifier of the stock to put in.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle to move.

stock
required
integer >= 1

The identifier of the stock in which we move the vehicle.

comment
string [ 1 .. 2048 ] characters

A comment on why we moved the vehicle to a stock.

Responses

Request samples

Content type
application/json
{
  • "serial_number": "SXB003",
  • "stock": 1,
  • "comment": "I put this vehicle in stock with an example comment"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Subscriptions

Get subscriptions

Return all available subscriptions for the nearest or the given network.

Authorizations:
Authenticated
query Parameters
lat
number [ -90 .. 90 ]

Latitude of the user. Required if network_id is not provided.

lng
number [ -180 .. 180 ]

Longitude of the user. Required if network_id is not provided.

network_id
integer >= 1

Network to fetch subscriptions from. Required if lat and lng are not provided.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get user subscriptions

Return all subscriptions of the user.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Cancel subscription

Cancel a user subscription.

Authorizations:
Authenticated
path Parameters
user_subscription_id
required
integer >= 1

The identifier of the user subscription to cancel.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Get payment methods for user subscription

Return all available payment methods usable by the user to update the payment method used by the user subscription.

Authorizations:
Authenticated
path Parameters
user_subscription_id
required
integer >= 1

Identifier of the user subscription to update.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "providers_setup_info": {
    }
}

Update user subscription payment method

Update the payment method used to pay for a user subscription.

Authorizations:
Authenticated
path Parameters
user_subscription_id
required
integer >= 1

The identifier of user subscription to update.

Request Body schema: application/json
required

Info to continue the processing of a payment method setup intent.

payment_method_id
required
integer >= 1

Identifier of the payment method to use.

user_payment_method_id
required
integer >= 1

Identifier of the instance of a payment method of the user.

Responses

Request samples

Content type
application/json
{
  • "payment_method_id": 1,
  • "user_payment_method_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Confirm renew payment

Confirm the payment after 3DSecure was required for a subscription renew payment.

Authorizations:
Authenticated
path Parameters
user_subscription_id
required
integer >= 1

The identifier of user subscription to update.

Request Body schema: application/json
required

Info to confirm the payment with the payment method.

object (UsePaymentMethodParameters)

Info that need to be provided when using a payment method.

Responses

Request samples

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

Response samples

Content type
application/json
{}

Get payment methods for subscription

Return all available payment methods usable by the user to subscribe to a subscription.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

Identifier of the subscription the user want to subscribe to.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "providers_setup_info": {
    }
}

Subscribe

Subscribe the user to a subscription.

Authorizations:
Authenticated
path Parameters
price_id
required
integer >= 1

Identifier of the subscription price id to subscribe to.

Request Body schema: application/json
required

Info about what to use to subscribe.

payment_method_id
required
integer >= 1

Identifier of the payment method to use.

user_payment_method_id
required
integer or null >= 1

Identifier of the instance of a payment method of the user. Depending on the payment method used this can be required.

object (UsePaymentMethodParameters)

Info that need to be provided when using a payment method.

Responses

Request samples

Content type
application/json
{
  • "payment_method_id": 1,
  • "user_payment_method_id": 1,
  • "payment_method_parameters": {
    }
}

Response samples

Content type
application/json
Example
{
  • "code": 0
}

TermsOfUse

Check ToU content

Get content of the specified terms of use.

query Parameters
lang
string = 2 characters

The preferred lang of the terms of use to get.

app_label
string <= 20 characters

The name of the application white label calling the route. Default to knot.

token
string <= 20 characters

Terms of use acceptation token. Use it to show terms of use associated to an approval request.

term_of_use_id
number >= 1

Identifier of the terms of use to get content.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {}
}

Get ToU url

Get the url to the latest terms of use.

Authorizations:
Authenticated
query Parameters
lang
string = 2 characters

The preferred lang of the terms of use to get.

Responses

Response samples

Content type
application/json
{}

Check ToU acceptation

Check that the user accepted the latest terms of use.

Authorizations:
Authenticated
query Parameters
lang
string = 2 characters

The preferred lang of the terms of use to get.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Accept ToU

Accept the specified terms of use.

Authorizations:
TermsOfUseValidationToken

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Transactions

Get transactions

Returns all transactions of the user.

Authorizations:
Authenticated
query Parameters
last_trip_id
integer >= 1

The identifier of the last trip we have, to get the trip coming after it.

direction
string
Enum: "ASC" "DESC"

The direction in which to sort the trips.

items
integer [ 1 .. 100 ]

The number of items to return, default to 100 for compatibility.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get invoice

Returns the invoice for a transaction.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The transaction's identifier.

Responses

Response samples

Content type
application/json
Example
{
  • "code": 3
}

Sending invoice by mail

Sending the invoice for a transaction by mail.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The transaction's identifier.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

TransactionsIntents

Get the state of a transaction intent

Get the current state of a transaction intent.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the transaction intent.

Responses

Response samples

Content type
application/json
{
  • "code": 196
}

Continue processing transaction intent

Continue the processing of a transaction intent after the user has done some actions on his side.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the transaction intent.

Responses

Response samples

Content type
application/json
{
  • "code": 196
}

Trips

Get trips

Returns all trips made by the user.

Authorizations:
Authenticated
query Parameters
last_trip_id
integer >= 1

The identifier of the last trip we have, to get the trip coming after it.

direction
string
Enum: "ASC" "DESC"

The direction in which to sort the trips.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get a trip

Returns a trip made by the user.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the trip we want to get.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Hide a trip

Hide a trip made by the user.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the trip we want to hide.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Resume a trip

Resume a trip that was put on-hold previously, unlock the vehicle.

Authorizations:
Authenticated
path Parameters
id
required
integer >= 1

The identifier of the trip to resume.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Users

Get user info

Return user's info.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Register a user

Register a new user using an email and a password.

Request Body schema: application/json
required

Info about the user to create its account.

firstname
string [ 1 .. 50 ] characters

The user's firstname.

lastname
string [ 1 .. 50 ] characters

The user's lastname.

lang
required
string/^[a-zA-Z]{2}$/

The user's language.

phonenumber
string/^\+\d{1,4} ?\d{3,14}$/

The user's phone number in E.164 format.

phonenumber_token
string

The phone number verification token.

sponsorcode
string/^[A-Z]{8}$/

Another user's sponsor code.

object

The given consents.

app_label
required
string

The name of the application used to sign up.

trip_retention_in_months
integer or null [ 6 .. 24 ]

The duration in months that we will keep the trips of the user. Null means forever. Will default to 24 months if not specified.

enrolment_token
string <uuid>

Optional organization enrolment token.

enrolment_custom_field_value
string <= 500 characters

Optional custom field value for organization enrolment.

email
required
string <email>

The user's email address.

password
required
string [ 8 .. 255 ] characters

The user's password.

Responses

Request samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "lang": "string",
  • "phonenumber": "string",
  • "phonenumber_token": "string",
  • "sponsorcode": "string",
  • "consents": {
    },
  • "app_label": "string",
  • "trip_retention_in_months": 6,
  • "enrolment_token": "dcfae4cf-f37b-4718-a8ef-ac19f0efd634",
  • "enrolment_custom_field_value": "string",
  • "email": "user@example.com",
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Update user

Update the user's information.

Authorizations:
Authenticated
Request Body schema: application/json
required

User info to update.

firstname
string [ 1 .. 50 ] characters

The user's firstname.

lastname
string [ 1 .. 50 ] characters

The user's lastname.

Responses

Request samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Update preferred vehicle

Update the user's preferred vehicle.

Authorizations:
Authenticated
Request Body schema: application/json
required

Type of the vehicle.

vehicle_type
required
string or null
Enum: "kick-scooter" "e-scooter" "bike" "e-bike" "cargo-bike" "e-cargo-bike"

The type of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "vehicle_type": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Delete a user

Delete a user and all its personal data.

Authorizations:
Authenticated
Request Body schema: application/json
required

Deletion data.

password
string [ 8 .. 255 ] characters

The user's password, required when the user has one.

Responses

Request samples

Content type
application/json
{
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Cancel deletion

Cancel the deletion of a user while in the pending deletion period.

Authorizations:
Authenticated
Request Body schema: application/json
required

Cancel deletion data.

cancel_token
required
string

The token given by a route that returned that the account is pending deletion.

Responses

Request samples

Content type
application/json
{
  • "cancel_token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get user rents

Return user's ongoing rents.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "passes": [
    ]
}

Get user's wallet amount

Return the sum of user's wallets.

Authorizations:
Authenticated
query Parameters
currency
required
string (Currency)
Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BYR" "BZD" "CAD" "CDF" "CHF" "CLF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GGP" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "IMP" "INR" "IQD" "IRR" "ISK" "JEP" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LTL" "LVL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRO" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLL" "SOS" "SRD" "STD" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VEF" "VND" "VUV" "WST" "XAF" "XAG" "XAU" "XCD" "XDR" "XOF" "XPF" "YER" "ZAR" "ZMK" "ZMW" "ZWL"
Example: currency=EUR

The requested currency, in which the sum should be converted.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Update phone number

Update the user's phone number or, when required, send a verification code by SMS and return a token to validate the ownership of the number.

Authorizations:
Authenticated
Request Body schema: application/json
required

The new phone number.

phone_number
required
string [ 1 .. 20 ] characters ^\+\d{1,4} ?\d{3,14}$

The new phone number in E.164 format of the user.

lang
required
string = 2 characters ^[a-zA-Z]{2}$

The language to use in the SMS, default to english if not available.

Responses

Request samples

Content type
application/json
{
  • "phone_number": "string",
  • "lang": "st"
}

Response samples

Content type
application/json
Example
{
  • "code": 0
}

End phone number update

End a phone number update that needed a validation by sms.

Authorizations:
Authenticated
Request Body schema: application/json
required

The token given by the POST route and code received by SMS.

sms_code
required
string = 6 characters ^\d{6}$

The 6 digit code received by SMS.

token
required
string

The token given by the POST route.

Responses

Request samples

Content type
application/json
{
  • "sms_code": "string",
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Update trip retention

Change the duration for when the trips are kept linked to the requesting user.

Authorizations:
Authenticated
Request Body schema: application/json
required

The new trip retention duration.

months
required
integer or null [ 6 .. 24 ]

The number of months to keep the trip linked to the user. null means forever.

Responses

Request samples

Content type
application/json
{
  • "months": 6
}

Response samples

Content type
application/json
{
  • "code": 0
}

Register a user with Apple

Register a user using a Apple account to fetch user's information and allow login with the Apple identity provider.

Request Body schema: application/json
required

Info about the user and the data given by Apple.

lang
required
string/^[a-zA-Z]{2}$/

The user's language.

phonenumber
string/^\+\d{1,4} ?\d{3,14}$/

The user's phone number in E.164 format.

phonenumber_token
string

The phone number verification token.

sponsorcode
string/^[A-Z]{8}$/

Another user's sponsor code.

object

The given consents.

app_label
required
string

The name of the application used to sign up.

trip_retention_in_months
integer or null [ 6 .. 24 ]

The duration in months that we will keep the trips of the user. Null means forever. Will default to 24 months if not specified.

enrolment_token
string <uuid>

Optional organization enrolment token.

enrolment_custom_field_value
string <= 500 characters

Optional custom field value for organization enrolment.

token
required
string

The user's Apple id token.

firstname
required
string [ 1 .. 50 ] characters

The user's firstname.

lastname
required
string [ 1 .. 50 ] characters

The user's lastname.

Responses

Request samples

Content type
application/json
{
  • "lang": "string",
  • "phonenumber": "string",
  • "phonenumber_token": "string",
  • "sponsorcode": "string",
  • "consents": {
    },
  • "app_label": "string",
  • "trip_retention_in_months": 6,
  • "enrolment_token": "dcfae4cf-f37b-4718-a8ef-ac19f0efd634",
  • "enrolment_custom_field_value": "string",
  • "token": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1
}

Link Apple

Link an account to an Apple account.

Authorizations:
Authenticated
Request Body schema: application/json
required

Info on the Apple account to link.

token
required
string

The Apple id token.

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Register a user with Facebook

Register a user using a Facebook account to fetch user's information and allow login with the Facebook identity provider.

Request Body schema: application/json
required

Info about the user and the data given by Facebook.

lang
required
string/^[a-zA-Z]{2}$/

The user's language.

phonenumber
string/^\+\d{1,4} ?\d{3,14}$/

The user's phone number in E.164 format.

phonenumber_token
string

The phone number verification token.

sponsorcode
string/^[A-Z]{8}$/

Another user's sponsor code.

object

The given consents.

app_label
required
string

The name of the application used to sign up.

trip_retention_in_months
integer or null [ 6 .. 24 ]

The duration in months that we will keep the trips of the user. Null means forever. Will default to 24 months if not specified.

enrolment_token
string <uuid>

Optional organization enrolment token.

enrolment_custom_field_value
string <= 500 characters

Optional custom field value for organization enrolment.

token
required
string

The user's Facebook access token.

firstname
required
string [ 1 .. 50 ] characters

The user's firstname.

lastname
required
string [ 1 .. 50 ] characters

The user's lastname.

Responses

Request samples

Content type
application/json
{
  • "lang": "string",
  • "phonenumber": "string",
  • "phonenumber_token": "string",
  • "sponsorcode": "string",
  • "consents": {
    },
  • "app_label": "string",
  • "trip_retention_in_months": 6,
  • "enrolment_token": "dcfae4cf-f37b-4718-a8ef-ac19f0efd634",
  • "enrolment_custom_field_value": "string",
  • "token": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1
}

Link Facebook

Link an account to a Facebook account.

Authorizations:
Authenticated
Request Body schema: application/json
required

Info on the Facebook account to link.

token
required
string

The Facebook access token.

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Register a user with Google

Register a user using a Google account to fetch user's information and allow login with the Google identity provider.

Request Body schema: application/json
required

Info about the user and the data given by Google.

lang
required
string/^[a-zA-Z]{2}$/

The user's language.

phonenumber
string/^\+\d{1,4} ?\d{3,14}$/

The user's phone number in E.164 format.

phonenumber_token
string

The phone number verification token.

sponsorcode
string/^[A-Z]{8}$/

Another user's sponsor code.

object

The given consents.

app_label
required
string

The name of the application used to sign up.

trip_retention_in_months
integer or null [ 6 .. 24 ]

The duration in months that we will keep the trips of the user. Null means forever. Will default to 24 months if not specified.

enrolment_token
string <uuid>

Optional organization enrolment token.

enrolment_custom_field_value
string <= 500 characters

Optional custom field value for organization enrolment.

token
required
string

The user's Google access token.

firstname
required
string [ 1 .. 50 ] characters

The user's firstname.

lastname
required
string [ 1 .. 50 ] characters

The user's lastname.

Responses

Request samples

Content type
application/json
{
  • "lang": "string",
  • "phonenumber": "string",
  • "phonenumber_token": "string",
  • "sponsorcode": "string",
  • "consents": {
    },
  • "app_label": "string",
  • "trip_retention_in_months": 6,
  • "enrolment_token": "dcfae4cf-f37b-4718-a8ef-ac19f0efd634",
  • "enrolment_custom_field_value": "string",
  • "token": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "token": "string",
  • "refresh_token": "string",
  • "user_id": 1
}

Link Google

Link an account to a Google account.

Authorizations:
Authenticated
Request Body schema: application/json
required

Info on the Google account to link.

token
required
string

The Google access token.

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Register a user through web

Register a new user using an email and a password. This is used for registering using the web interface.

Request Body schema: application/json
required

Info about the user to create its account.

firstname
string [ 1 .. 50 ] characters

The user's firstname.

lastname
string [ 1 .. 50 ] characters

The user's lastname.

lang
required
string/^[a-zA-Z]{2}$/

The user's language.

phonenumber
string/^\+\d{1,4} ?\d{3,14}$/

The user's phone number in E.164 format.

phonenumber_token
string

The phone number verification token.

sponsorcode
string/^[A-Z]{8}$/

Another user's sponsor code.

object

The given consents.

app_label
required
string

The name of the application used to sign up.

trip_retention_in_months
integer or null [ 6 .. 24 ]

The duration in months that we will keep the trips of the user. Null means forever. Will default to 24 months if not specified.

enrolment_token
string <uuid>

Optional organization enrolment token.

enrolment_custom_field_value
string <= 500 characters

Optional custom field value for organization enrolment.

email
required
string <email>

The user's email address.

password
required
string [ 8 .. 255 ] characters

The user's password.

gcaptcha
required
string

Google re-captcha code.

Responses

Request samples

Content type
application/json
{
  • "firstname": "string",
  • "lastname": "string",
  • "lang": "string",
  • "phonenumber": "string",
  • "phonenumber_token": "string",
  • "sponsorcode": "string",
  • "consents": {
    },
  • "app_label": "string",
  • "trip_retention_in_months": 6,
  • "enrolment_token": "dcfae4cf-f37b-4718-a8ef-ac19f0efd634",
  • "enrolment_custom_field_value": "string",
  • "email": "user@example.com",
  • "password": "stringst",
  • "gcaptcha": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Begin a registration

Begin a registration by checking if the user's email match an organization.

Request Body schema: application/json
required

Email and label of the user.

email
required
string <email>

The user's email address.

app_label
required
string

The name of the application used to sign up.

lang
string/^[a-zA-Z]{2}$/

The user's language. Defaults to English.

enrolment_token
string <uuid>

Optional organization enrolment token.

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "app_label": "string",
  • "lang": "string",
  • "enrolment_token": "dcfae4cf-f37b-4718-a8ef-ac19f0efd634"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get basic personal data

Return user's basic personal data.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Request full personal data

Request all user's personal data to be sent by email.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Add password

Add a password to a Google, Facebook or Apple account.

Authorizations:
Authenticated
Request Body schema: application/json
required

New password.

password
required
string [ 8 .. 255 ] characters

The user's password.

Responses

Request samples

Content type
application/json
{
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Change password

Change the user's password.

Authorizations:
Authenticated
Request Body schema: application/json
required

New and old password.

password
required
string [ 8 .. 255 ] characters

The user's old password.

newpassword
required
string [ 8 .. 255 ] characters

The user's new password.

Responses

Request samples

Content type
application/json
{
  • "password": "stringst",
  • "newpassword": "stringst"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Reset password

Reset the password to the new specified one.

Request Body schema: application/json
required

The new password.

password_token
required
string = 10 characters

The change password token.

password
required
string [ 8 .. 255 ] characters

The user's password.

Responses

Request samples

Content type
application/json
{
  • "password_token": "stringstri",
  • "password": "stringst"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Demonstration mode

Change the account demonstration mode state.

Authorizations:
Authenticated
Request Body schema: application/json
required

New state of the demonstration mode.

activate
required
boolean

The state of the demonstration mode.

Responses

Request samples

Content type
application/json
{
  • "activate": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Update user's notifications

Update the user's notifications settings.

Authorizations:
Authenticated
Request Body schema: application/json
required

Notification settings.

value
required
number [ 0 .. 15 ]

Value of the settings. Flags: 1 -> Deprecated, 2 -> Deprecated, 4 -> service status, 8 -> trip notifications.

Responses

Request samples

Content type
application/json
{
  • "value": 15
}

Response samples

Content type
application/json
{
  • "code": 0
}

Push notifications

Update the push notification token.

Authorizations:
Authenticated
Request Body schema: application/json
required

New push notification token.

token
required
string <= 4096 characters

The push notification token.

device_id
required
string <= 50 characters

Identifier of the device being used.

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "device_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Update user's profile picture

Upload a profile picture to the specified user.

Authorizations:
Authenticated
Request Body schema: multipart/form-data
required

The image to upload.

profile_picture
required
string <binary>

The picture to upload.

Responses

Response samples

Content type
application/json
{
  • "code": 0
}

Vehicles

Register a vehicle

Register a vehicle of SVaaS on the given network.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Vehicle create parameters.

network_id
required
integer >= 1

Network's identifier for the new vehicle.

serial_number
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle.

model_id
required
integer >= 1

Identifier of the vehicle model.

vehicle_service_id
required
integer >= 1

SVaaS vehicle identifier.

free_floating_enabled
boolean

If the vehicle is free floating compatible, true if you enable this functionality.

Responses

Request samples

Content type
application/json
{
  • "network_id": 1,
  • "serial_number": "string",
  • "model_id": 1,
  • "vehicle_service_id": 1,
  • "free_floating_enabled": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Vehicle info

Fetch some info on the vehicle.

Authorizations:
Authenticated
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The vehicle's serial number.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Change serial number

Change the current serial number of a vehicle.

Authorizations:
(AuthenticatedPermissions)
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle.

Request Body schema: application/json
required

New serial number.

new_serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The new serial number of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "new_serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Vehicle admin info

Fetch some admin info on the vehicle. This is reserved for operators.

Authorizations:
(AuthenticatedPermissions)
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The vehicle's serial number.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Vehicle admin info refreshed

Fetch some admin info on the vehicle after getting it from the vehicle itself. This is reserved for operators.

Authorizations:
(AuthenticatedPermissions)
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The vehicle's serial number.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Change network

Change the current network of a vehicle.

Authorizations:
(AuthenticatedPermissions)
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The vehicle's serial number.

Request Body schema: application/json
required

Info about the network.

network_id
required
integer >= 1

Identifier of the new network for the vehicle.

Responses

Request samples

Content type
application/json
{
  • "network_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Unlock

Unlock the specified vehicle if the user is close enough.

Authorizations:
Authenticated
Request Body schema: application/json
required

Vehicle unlock parameters.

lat
required
number [ -90 .. 90 ]

Latitude of the user to check the distance to the vehicle.

lng
required
number [ -180 .. 180 ]

Longitude of the user to check the distance to the vehicle.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle to unlock.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180,
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Admin unlock vehicle

Unlock the specified vehicle in admin mode.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Vehicle unlock parameters.

lat
required
number [ -90 .. 90 ]

Latitude of the user to check the distance to the vehicle.

lng
required
number [ -180 .. 180 ]

Longitude of the user to check the distance to the vehicle.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle to unlock.

force
boolean

True when the distance check is bypassed.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180,
  • "serial_number": "string",
  • "force": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Open battery cover

Send command for open the vehicle battery cover.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Vehicle open battery cover parameters.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get free floating vehicles

Return all free floating vehicles in a given area.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get free floating vehicles.

lng
required
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get free floating vehicles.

latDeg
required
number >= 0

Number of latitude degree of the area of which we want to get free floating vehicles.

lngDeg
required
number >= 0

Number of longitude degree of the area of which we want to get free floating vehicles.

lang
string = 2 characters

Language in which to get the localization, defaults to 'en'.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get public free floating vehicles

Return all free floating vehicles in the given area visible without being logged in.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get free floating vehicles.

lng
required
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get free floating vehicles.

latDeg
required
number >= 0

Number of latitude degree of the area of which we want to get free floating vehicles.

lngDeg
required
number >= 0

Number of longitude degree of the area of which we want to get free floating vehicles.

network_id
integer >= 1

Network id to filter free floating vehicles.

app_label
string non-empty

Name of the app label making the request.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Get a free floating vehicle

Return a free floating vehicle.

Authorizations:
Authenticated
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The vehicle's serial number.

query Parameters
lang
string = 2 characters

Language in which to get the localization, defaults to 'en'.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get a freefloat to station reward

Return the reward that the user can have if it returns the vehicle to a station.

Authorizations:
Authenticated
path Parameters
serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The vehicle's serial number.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Identify free floating vehicles

Identify a free-floating vehicle by blinking it's light and emitting a sound.

Authorizations:
Authenticated
Request Body schema: application/json
required

Vehicle identify parameters.

lat
required
number [ -90 .. 90 ]

Latitude of the user to check the distance to the vehicle.

lng
required
number [ -180 .. 180 ]

Longitude of the user to check the distance to the vehicle.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle to unlock.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180,
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Identify free floating vehicles as admin

Identify a free-floating vehicle by blinking it's light and emitting a sound.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Vehicle identify parameters.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Freefloat lock

Lock in free floating the specified vehicle and ends the rent.

Authorizations:
Authenticated
Request Body schema: application/json
required

Vehicle lock parameters.

vehicle_id
required
integer >= 1

The vehicle's identifier.

force
boolean

When true, if the network force lock is in manual mode and the vehicle fails to lock because it produces an error, we will try to lock the vehicle as soon as possible.

Responses

Request samples

Content type
application/json
{
  • "vehicle_id": 1,
  • "force": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Temporary lock free floating vehicle

Temporary lock a free-floating vehicle, put the trip on hold.

Authorizations:
Authenticated
Request Body schema: application/json
required

Vehicle lock params.

vehicle_id
required
integer >= 1

The vehicle's identifier.

force
boolean

When true, if the network force lock is in manual mode and the vehicle fails to lock because it produces an error, we will try to lock the vehicle as soon as possible.

Responses

Request samples

Content type
application/json
{
  • "vehicle_id": 1,
  • "force": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Admin freefloat lock

Lock in free floating the specified vehicle in admin.

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Vehicle lock parameters.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle to lock.

force
boolean

When true, if the network force lock is in manual mode and the vehicle fails to lock due to it moving, we will try to lock the vehicle as soon as possible.

Responses

Request samples

Content type
application/json
{
  • "serial_number": "string",
  • "force": true
}

Response samples

Content type
application/json
{
  • "code": 0
}

Shutdown vehicle

Shutdown the vehicle and the IoT (e.g. for transport).

Authorizations:
(AuthenticatedPermissions)
Request Body schema: application/json
required

Vehicle shutdown parameters.

serial_number
required
string/^[a-zA-Z0-9]{6,10}$/

The serial number of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "serial_number": "string"
}

Response samples

Content type
application/json
{
  • "code": 0
}

Get nearest parking

Return nearest clusters and parking where the given vehicle can be parked.

Authorizations:
Authenticated
query Parameters
lat
required
number [ -90 .. 90 ]

The latitude of where the user is.

lng
required
number [ -180 .. 180 ]

The longitude of where the user is.

vehicle_id
required
integer >= 1

The identifier of the vehicle we want to park.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Request a vehicle

Experimental PoC: Request a vehicle to come at user position.

Authorizations:
Authenticated
Request Body schema: application/json
required

Vehicle request parameters.

lat
required
number [ -90 .. 90 ]

Latitude of the center of the area of which we want to get free floating vehicles.

lng
required
number [ -180 .. 180 ]

Longitude of the center of the area of which we want to get free floating vehicles.

Responses

Request samples

Content type
application/json
{
  • "lat": -90,
  • "lng": -180
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

Get vehicles models

Return all currently used vehicles models.

Authorizations:
Authenticated

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ]
}

Change svaas id

Change the vehicle svaas id.

Authorizations:
(AuthenticatedPermissions)
path Parameters
id
required
integer >= 1

The identifier of the vehicle.

Request Body schema: application/json
required

New svaas id.

svaas_id
required
integer >= 1

The new svaas id of the vehicle.

Responses

Request samples

Content type
application/json
{
  • "svaas_id": 1
}

Response samples

Content type
application/json
{
  • "code": 0
}

Versions

Get app versions

Get the latest and minimal application's version.

query Parameters
app_label
required
string [ 1 .. 20 ] characters

The app label name.

platform
required
string
Enum: "android" "ios"

The platform name.

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}