Skip to content

API Schema

asifalix edited this page Feb 6, 2016 · 3 revisions

login

Prefer via OATH OR ANY other secure password exchange mechanism.

/login

Input:

username // email id
password

response

{ "code": "200" "value":"Successfully logged in" }

** /register

Input:

username
password
date_of_birth
blood_group
address //optional
address2 //optional
locality //optional
city optional
pincode optional
donor_or_recipient //required - donor, recipient or both

###Output: {
"code":"200"
"value":"Registration was successful"
}

OR

{
"code":"204"
"value":"Registration failed because the following fields missing: A,B, C"
}

/user/requestforblood

Input:

user_id
date_time
lat
long
address
address2
city
pincode
patientname
purpose
urgency (shown as how soon on ui) - show default options


Response


{
"code":"200"
"value": "Request Registered"
"tracking_id":"1111"
}

/user/checkbloodrequest

Input:

user_id
request_id
date_time


Response


{
"code":"200"
"user_id": "101"
"tracking_id":"1111"
}

/user/trackdonor

Input:

user_id
request_id
tracking_id


Response


{
"code":"200"
"lat": "101"
"long":"1111"
}