URL: http://gocarinthia.cicika.info
Authorization: GoCarinthia <auth_token>
PUT /user/
Request:
Email: mail@address.com,
Name: Full Name,
Password: string,
BeaconIdentifier: string, //optional
Response:
200 OK
AuthToken: <token>,
UserId: integer
Request:
POST /user/login/
Email: mail@addres.com,
Password: password
Response:
Id: 123,
AuthToken: token,
Type: passenger
Request:
POST /trip/start/
StartedAt: Unix timestamp
Response:
200 OK
Request:
POST /trip/end/
If not posted by device, backend will handle it.
EndedAt: unix timestamp
Response: 200 OK
Request:
POST /trip/segment/
TransportStation: (name or id from location database),
TransportType: type from location database (can be empty),
BeaconIdentifier: registered beacon,
Latitude: 44.28,
Longitude: 21.13, //don't care about decimals, send all
CreatedAt: unix timestamp)
CheckInType: 0 for start, 1 for stop, 2 for end
GET /user/:user_id/:beacon_identifier
Response:
LastCheckinAt: unix timestamp,
BeaconIdentifier: string
Request:
POST /user/payment/method/
CardNumner: string
CardHolder: string
Expiration: string
Cvv: integer
Response:
200 Ok