@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AltoroJ REST API
@version 1.0.2
@auth ApiKey Authorization in header
@endpoints 12
@toc login(2), account(4), transfer(1), feedback(2), admin(2), logout(1)

@group login
@endpoint GET /login
@required {Authorization: any}
@returns(200)
@errors {401}

@endpoint POST /login
@required {body: map}
@returns(200)
@errors {400, 500}

@endgroup

@group account
@endpoint GET /account
@required {Authorization: any}
@returns(200)
@errors {401, 500}

@endpoint GET /account/{accountNo}
@required {Authorization: any, accountNo: any}
@returns(200)
@errors {401, 500}

@endpoint GET /account/{accountNo}/transactions
@required {Authorization: any, accountNo: any}
@returns(200)
@errors {401, 500}

@endpoint POST /account/{accountNo}/transactions
@required {Authorization: any, accountNo: any, body: map}
@returns(200)
@errors {400, 401, 501}

@endgroup

@group transfer
@endpoint POST /transfer
@required {Authorization: any, body: map}
@returns(200)
@errors {400, 501}

@endgroup

@group feedback
@endpoint POST /feedback/submit
@required {body: map}
@returns(200)
@errors {401, 500}

@endpoint GET /feedback/{feedbackId}
@required {Authorization: any, feedbackId: any}
@returns(200)
@errors {400, 401, 500}

@endgroup

@group admin
@endpoint POST /admin/addUser
@required {Authorization: any, body: map}
@returns(200)
@errors {400, 401, 500}

@endpoint POST /admin/changePassword
@required {Authorization: any, body: map}
@returns(200)
@errors {400, 401, 500}

@endgroup

@group logout
@endpoint GET /logout
@returns(200)
@errors {500}

@endgroup

@end
