{"swagger":"2.0","info":{"description":"This is the 250 Keirin API","version":"1.0.0","title":"250 Keirin API"},"tags":[{"name":"admins","description":"Operations available to regular administrators"},{"name":"users","description":"Operations available to regular users"}],"paths":{"/admin/login":{"post":{"tags":["admins"],"summary":"Login Page for administrators","operationId":"admin_login_page","description":"By passing in the appropriate email and password, you can be \nauthorized to access the  250 Keirin Administrator site\n","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"in":"formData","name":"email","description":"pass the registerd email to login","required":true,"type":"string"},{"in":"formData","name":"password","description":"pass the registerd password to login","required":true,"type":"string"}],"responses":{"200":{"description":"login successfully","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'OK' if login successfully"},"results":{"description":"containing returned data","type":"object","properties":{"access_token":{"type":"string","description":"secured token used for authorization process"},"expires_in":{"type":"integer","description":"the lifetime of the token in second"}}}}}},"400":{"description":"login failed","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'NG' if login failed"},"errors":{"description":"logged errors from the login process","type":"object","properties":{"email":{"type":"string","description":"missing email error"},"password":{"type":"string","description":"missing password error"}}}}}},"401":{"description":"login failed","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'NG' if login failed"},"errors":{"description":"logged errors from the login process","type":"object","properties":{"admin_login_status":{"type":"string","description":"login status message"}}}}}}}}},"/logout":{"get":{"tags":["admins","users"],"summary":"Logout page","operationId":"logout","description":"Log out if you are already logged in\n","produces":["application/json"],"parameters":[{"in":"header","name":"Authorization","description":"containing secured token for authorization process","required":true,"type":"string"}],"responses":{"200":{"description":"login successfully","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'OK' if logout successfully"}}}}}}},"/users":{"get":{"tags":["admins"],"summary":"List all users","operationId":"admin_listing_users","description":"List all regitered users with the summary infomation\n","produces":["application/json"],"parameters":[{"in":"query","name":"page","description":"the page number","required":false,"type":"integer"},{"in":"header","name":"Authorization","description":"containing secured token for authorization process","required":true,"type":"string"}],"responses":{"200":{"description":"return list of users data successfully","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'OK' if return list of users data successfully"},"results":{"type":"object","description":"data returned from response","properties":{"users":{"description":"list of users data","type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","description":"user ID"},"email":{"type":"string","description":"user email"},"nationality":{"type":"string","description":"user nationality"},"status":{"type":"string","description":"user registrion status"},"updated_at":{"type":"string","description":"the last time updated user profile"},"lastlogined_at":{"type":"string","description":"the last time user logged in"},"verification":{"description":"user identification data","type":"object","properties":{"status":{"type":"string","description":"user identification verification status"},"verified_at":{"type":"string","description":"user identification verified date"}}}}}},"user_count":{"type":"integer","description":"the number of registered users"},"pagination":{"description":"pagination parameters","type":"object","properties":{"total":{"type":"integer","description":"the number of users can be displayed"},"current_page":{"type":"integer","description":"the order number of current page"},"per_page":{"type":"integer","description":"the number of user can be displayed per page"}}}}}}}}}},"post":{"tags":["admins"],"summary":"List all users","operationId":"admin_searching_users","description":"By passing in the appropriate search rule, the users list can be filterd\n","consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"in":"formData","name":"user_limit","description":"the maximum of users can be displayed per page","required":false,"type":"integer"},{"in":"formData","name":"show_withdrown_users","description":"determine to show the withdrew users or not","required":false,"type":"integer"},{"in":"query","name":"page","description":"the page number","required":false,"type":"integer"},{"in":"formData","name":"user_id","description":"user ID value for searching","required":false,"type":"integer"},{"in":"formData","name":"username","description":"user username value for searching","required":false,"type":"string"},{"in":"formData","name":"email","description":"user email address value for searching","required":false,"type":"string"},{"in":"formData","name":"user_status","description":"user registration status address value for searching","required":false,"type":"array","items":{"type":"string"}},{"in":"formData","name":"full_name","description":"user first name value for searching","required":false,"type":"string"},{"in":"formData","name":"phone","description":"user phone number value for searching","required":false,"type":"string"},{"in":"formData","name":"nationality","description":"user country value for searching","required":false,"type":"string"},{"in":"formData","name":"prefectures","description":"user prefectures value for searching","required":false,"type":"string"},{"in":"formData","name":"point_start","description":"mimimun charge points value for searching","required":false,"type":"integer"},{"in":"formData","name":"point_end","description":"maximum charge points value for searching","required":false,"type":"integer"},{"in":"formData","name":"identification","description":"identification status value for searching","required":false,"type":"string"},{"in":"formData","name":"postal_code","description":"postal code value for searching","required":false,"type":"string"},{"in":"formData","name":"address","description":"user address value for searching","required":false,"type":"string"},{"in":"formData","name":"gender","description":"user gender value for searching","required":false,"type":"array","items":{"type":"string"}},{"in":"header","name":"Authorization","description":"containing secured token for authorization process","required":true,"type":"string"}],"responses":{"200":{"description":"return list of users data successfully","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'OK' if return list of users data successfully"},"results":{"type":"object","description":"data returned from response","properties":{"users":{"type":"array","items":{"description":"list of users data","type":"object","properties":{"user_id":{"type":"integer","description":"user ID"},"email":{"type":"string","description":"user email"},"nationality":{"type":"string","description":"user nationality"},"status":{"type":"string","description":"user registrion status"},"updated_at":{"type":"string","description":"the last time updated user profile"},"lastlogined_at":{"type":"string","description":"the last time user logged in"},"verification":{"description":"user identification data","type":"object","properties":{"status":{"type":"string","description":"user identification verification status"},"verified_at":{"type":"string","description":"user identification verified date"}}}}}},"user_count":{"type":"integer","description":"the number of registered users"},"pagination":{"description":"pagination parameters","type":"object","properties":{"total":{"type":"integer","description":"the number of users can be displayed"},"current_page":{"type":"integer","description":"the order number of current page"},"per_page":{"type":"integer","description":"the number of user can be displayed per page"}}}}}}}}}}},"/loggeduser":{"get":{"tags":["admins","users"],"summary":"get current logged in user","operationId":"logged_user","description":"List all regitered users with the summary infomation\n","produces":["application/json"],"parameters":[{"in":"header","name":"Authorization","description":"containing secured token for authorization process","required":true,"type":"string"}],"responses":{"200":{"description":"return current logged in user","schema":{"type":"object","properties":{"status":{"type":"string","description":"have value 'OK' if return user successfully"},"results":{"type":"object","description":"data returned from response","properties":{"user":{"description":"list of users data","type":"object","properties":{"user_id":{"type":"integer","description":"user ID"},"email":{"type":"string","description":"user email"},"firstname":{"type":"string","description":"user firstname"},"firstname_kana":{"type":"string","description":"user firstname in katakana form"},"lastname":{"type":"string","description":"user lastname"},"lastname_kana":{"type":"string","description":"user lastname in katakana form"},"avater_img":{"type":"string","description":"user avatar image"},"status":{"type":"string","description":"user registrion status"},"id":{"type":"integer","description":"user ID if logged user is admin"},"authority":{"type":"string","description":"admin role ID if logged user is admin"},"group":{"type":"string","description":"admin group ID if logged user is admin"},"full_name":{"type":"string","description":"admin full name ID if logged user is admin"}}}}}}}}}}}},"host":"virtserver.swaggerhub.com","basePath":"/vuongkiwi/250-keirin/1.0.0","schemes":["https"]}