#Rest API
Operation | Description | URL Schema |
---|---|---|
getUserData. Event verification for board. login required |
if(auth memberID == URL ID || board){ return user details. return events that user is attending } else{ redirect to / } |
/memberID [[get]] |
getEvents | return events within the specified start and end parameters. If date params are ommitted, return all events for the next year. If count is included, limits return to that many events, otherwise it defaults to all. |
/d1/events?start&end&count [[get]] |
getEventDetails | return details for event = eventID, and whether member (cardID) has purchased a ticket |
/d1/events?eventID&cardID [[get]] |
Checkout |
Form Data return transaction status |
/d1/checkout form-data [[post]] |
createAccount |
Form Data Process membership request - create unverified account in DB and sends verification email. User account has been created at this point and they can login to the site. Returns success state. |
/d1/register form-data [[post]] |
resendVrfEmail login required |
Resend verification email to user. Uses authToken to determine email. Returns success state. |
/d1/register?action=resendVrf [[post]] |
verifyAccount login required |
Form Data Verify user account. Returns success state. |
/d1/register?action=vrf form-data [[post]] |
login |
Form Data Authenticates the login request. Returns authToken and success state. |
/d1/login form-data [[post]] |
logout | delete authToken |
/d1/logout [[post]] |
##Forms
###Checkout In a JSON Encoded String
- f_name : String
- l_name : String
- email : String
- stripe_token : String
- cart : [ { eventID : String, quantity : Int, card_id : Int (blank for non-members), transportation : Boolean } ]
- total : Int
// eventID = 100 for buying membership, card_id is passed, rest of the cart empty/null
###Stage Membership
- f_name : String
- l_name : String
- email : String
- mobile : Int (in the format xxxxxxxxxx)
- major : String
- year : {freshman, sophomore, junior, senior, graduate} - String
- pwd : String (plain-text, no client side hash)
###Commit Membership
- vrf_token : String (6 chars)
account email is automatically parsed from authToken
###Login
- email : String
- pwd : String (plain-text, no client side hash)