Skip to content
Pavel edited this page Mar 8, 2015 · 3 revisions

Welcome to the tracktrains wiki!

API

Profiles

Everything that related to users, login/logout and registration (Only by invitations for now)

/v1/user/login/

Methods: POST
Examples:
url: https://api.trackseats.info/v1/user/login/
headers: Content-Type=application/json
data: {"login": "test@test.ts", "password": "test"}
success result: {"message": "You are logged in", "success": true}
Access: any

/v1/user/logout/

Methods: POST
Examples:
url: https://api.trackseats.info/v1/user/logout/
headers: Content-Type=application/json
data: {}
success result: {"message": "You are logged out", "success": true}
Access: authenticated user

/v1/user/signup/(hash)/

Methods: POST
Examples:
url: https://api.trackseats.info/v1/user/signup/fmcivnt4985xxmpxavtih5yrc39r3vcxroht4v/
headers: Content-Type=application/json
data: {"password": "test"}
success result: {"success": true, "message": "User has been registered"}
Access: any

/v1/user/invite/(email)/

Methods: POST
Examples:
url: https://api.trackseats.info/v1/user/invite/test@test.ts/
data: {}
success result: {"success": true, "message": "User has been invited"}
Access: authenticated user with at least a one free invitation.

/v1/user/

Methods: GET
Examples:
List of users: https://api.trackseats.info/v1/user/
Specific user: https://api.trackseats.info/v1/user/1/
Access: authenticated user
Fields: email, inviter, invites_counter, is_active, is_staff

byrwtask

Everything that related to tasks for tracking Belarusian railway tickets.

/v1/byrwtask

Methods: GET, POST, PUT, DELETE
Examples:
List of tasks: https://api.trackseats.info/v1/byrwtask/
Specific task: https://api.trackseats.info/v1/byrwtask/1/
Access:
Super users have full access.
Authenticated non super users can access (GET, PUT and DELETE) only tasks that belongs to them, and create tasks (POST) without limit.