Knot Stations API - prod (v1.0)

Download OpenAPI specification:Download

Badge reader feedback

Send a feedback to the user for the badge reader.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Request Body schema: application/json
required
status
required
integer
Enum: 0 1 2

Status of the feedback send to the user:
0. LINK_STARTED - Notify user that the station is ready to link his badge.

  1. LINKED - Positive sound, notify user that his badge now is linked to his profile.
  2. FAILURE - Negative sound, notify user the system cannot unlock with this badge (badge not recognized, no credit card linked to his account, vehicle not available, or other non-satisfied conditions).
    There is no status to signal that an existing badge is accepted, instead you should just send the unlock request to the station.
spot
integer [ 1 .. 32 ]

REQUIRED FOR V6 STATION. The identifier of the spot to which to send the badge feedback.

Responses

Request samples

Content type
application/json
{
  • "status": 0,
  • "spot": 1
}

Response samples

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

Set config on a station

Set a value for the specified configuration on a station. The station should be online to receive the new config value.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Request Body schema: application/json
required
config
required
string
Enum: "volume" "alarm-threshold"

The name of the configuration to edit.

value
required
integer [ 0 .. 100 ]

The value of the configuration.

Responses

Request samples

Content type
application/json
{
  • "config": "volume",
  • "value": 100
}

Response samples

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

Enable a station

Enable a station.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Responses

Response samples

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

Get a station

Get a station's information and current state.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Responses

Response samples

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

Get enabled stations

Get the list of enabled stations.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Responses

Response samples

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

Get disabled stations

Get the list of disabled stations.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Responses

Response samples

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

Set station location

Define the location of the station.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Request Body schema: application/json
required
latitude
required
number [ -90 .. 90 ]

New latitude of the location of the station.

longitude
required
number [ -180 .. 180 ]

New Longitude part of the location of the station.

Responses

Request samples

Content type
application/json
{
  • "latitude": 48.5900027,
  • "longitude": 7.7531998
}

Response samples

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

Confirm station lock

Confirm the locking of a station and transfer vehicle power info.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Request Body schema: application/json
required
spot
required
integer [ 1 .. 32 ]

The identifier of the spot to which to send the lock response.

accepted
required
integer
Enum: 0 1 2

Response status of the vehicle's lock on the station:
0. ACCEPT - Notify the user that the lock is done, turn led green, play a positive sound and start charging.

  1. ACCEPT_CACHE - Same as ACCEPT, but also add the vehicle in the cache of the station. The next time this vehicle is locked on the station, it will be accepted directly, allowing a faster feedback to the end user.
  2. DENY - Notify the user that something went wrong when stopping his rent. Turn led red and play a negative sound. This action doesn't open the locker, so the scooter is still safe.

Responses

Request samples

Content type
application/json
{
  • "spot": 1,
  • "accepted": 0
}

Response samples

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

Ping a station

Ping a station.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Responses

Response samples

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

Reboot a station

Ask a station to reboot.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Responses

Response samples

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

Scan a station's spots

Request a scan of all spots of a station. For each spot with a vehicle in, the station will re-send the locked event.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Request Body schema: application/json
optional
spot
integer [ 1 .. 32 ]

Optional, the identifier of the spot. If specified, only this spot will re-scan the vehicle locked in.

Responses

Request samples

Content type
application/json
{
  • "spot": 5
}

Response samples

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

Unlock a station

Unlock the specified spot of a station. If the vehicle contained in the spot has a IoT module handled by Knot, the vehicle will be also unlocked.

Authorizations:
(HttpSignatureAuthorizerApiGtwApiKey)
path Parameters
stationId
required
integer >= 1

The identifier of the station.

header Parameters
X-Knot-Date
required
integer

Unix epoch in milliseconds of when the request was made.

X-Api-Key
required
string

The Api Key used to sign this request.

Request Body schema: application/json
required
spot
required
integer [ 1 .. 32 ]

The identifier of the spot to unlock.

unlock
required
integer [ 1 .. 9007199254740991 ]

An identifier to track this unlock request. This will be sent back in the unlocked event.

ignore_vehicle_response
boolean

Ignore the vehicle unlock response if there is vehicle with IoT on the spot. Useful for maintenance as it allow to unlock a spot with a broken or unavailable vehicle.

Responses

Request samples

Content type
application/json
{
  • "spot": 5,
  • "unlock": 57853,
  • "ignore_vehicle_response": true
}

Response samples

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