CityTrips's external API for operators.
.
Every message must be a JSON object containing two root properties:
{
"command"(string): "this is one of the documented commands",
"payload"(any): "this is the documented payload"
}
.
Example:
{
"command": "s_ext/authenticate",
"payload": {
"clientId": "730f8a96-a92c-4a74-8ce0-e7e4cdfff5ad",
"apiKey": "a9eb2bc7-ab7b-40ed-ba01-0238f4b79e13"
}
}
.
Generic error.
Accepts the following message:
Additional properties are allowed.
Received when you need to autheticate. Check "s_ext/authenticate" for more info.
Accepts the following message:
Additional properties are allowed.
Received when authentication succeeded.
Accepts the following message:
Empty payload
Received when authentication failed.
Accepts the following message:
Additional properties are allowed.
You will need to authenticate before being able to do any other thing. You must authenticate everytime you receive a "must_authenticate" message (it may happen that the connection has been lost but your app didn't notice it).
Accepts the following message:
Authentication payload
Additional properties are allowed.
You are responsible of checking if the user already exists on your platform. If it already exists, you just need to return its ID and mark it as a CityTrips user, so we are allowed to do actions on his behalf. Otherwise a new account must be created.
Accepts the following message:
Terms and conditions of Operator will be shown to the user and he will be requested to accept them. (If the user do not accept Terms and conditions from Operator, account will not be created, so this will be always true, it is send for legal reasons)
Timestamp
Additional properties are allowed.
When you receive this command, send a "s_vehicle/full" command with all vehicles available.
Accepts the following message:
Additional properties are allowed.
Send all vehicles available. A message will be send to indicate that this action is needed.
Accepts the following message:
Additional properties are allowed.
Additional items are allowed.
Send modified vehicles only.
Accepts the following message:
Additional properties are allowed.
Additional items are allowed.
Additional properties are allowed.
Empty payload
Authentication payload
Additional properties are allowed.
Terms and conditions of Operator will be shown to the user and he will be requested to accept them. (If the user do not accept Terms and conditions from Operator, account will not be created, so this will be always true, it is send for legal reasons)
Timestamp
Additional properties are allowed.
Additional properties are allowed.
Additional items are allowed.
ToDo