Customer Api
It deals with customer data and requests.
It contains the following data:
send OTP on customer's number.
verify OTP.
Registers or login customer.
view and edit profile.
view list of bookmark chargers of Customer.
view, edit, delete and create a bookmark.
view complete details of an bookmark.
view charger detail.
view list of vehicles of Customer.
view, edit, delete and create a vehicle.
view list of appointments of Customer.
view, create an appointment.
update appointment status
view complete details of an appointment.
view list of coupons.
create bill.
check referal id.
list of chargers with the filters.
##
list of ads
list og coupons
Docs for app Info
get and post notification
rate a charger
update customer credit
Subscribe the customer to available subscriptions
list of available subscriptions
search charger
check coupon
app info
Aminities list
Razerpay
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Register Customer by OTP
First an OTP is sent on customer number.
POST-[Send OTP](https:http://http://54.157.180.189:8000/customer/SendOtp/?phone={phone})
Then we verify the otp that was sent.
POST-[Verify OTP](https:http://http://54.157.180.189:8000/customer/VerifyOtp/?phone={phone}&otp={otp})
A customer is created with customer number, session id and default Customer details.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Check Referal ID
Checks the referal id provided by customer at the time of registeration
PUT-(http://54.157.180.189:8000/customer/ReferalCheck/?referalID={referalID}&customer_id={id}&authkey={to...)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Login Customer by OTP
First an OTP is sent on customer number.
POST-[Send OTP](https:http://http://54.157.180.189:8000/customer/SendOtp/?phone={phone})
Then we verify the otp that was sent.
POST-[Verify OTP](http://54.157.180.189:8000/customer/VerifyOtp/?phone={phone}&otp={otp})
A new customer session is created and customer is logged in
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Cusomer Profile
Customer details are given by
GET-(http://54.157.180.189:8000/customer/CustomerProfile/?customer_id={id}&authkey={token})
Customer details a edited by
PUT-(http://54.157.180.189:8000/customer/CustomerProfile/?customer_id={id}&authkey={token})
Customer Photo edit by
body data
{
"customer_image":[image]
}
PUT-(http://54.157.180.189:8000/customer/CustomerPhoto/?customer_id={id}&authkey={token})
Remove Customer image and set it to default
DELETE-(http://54.157.180.189:8000/customer/CustomerPhoto/?customer_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Bookmark
View list of Bookmarked chargers by customer
GET-(http://54.157.180.189:8000/customer/Bookmarks/?customer_id={id}&authkey={token))
View details of a bookmark
GET-(http://54.157.180.189:8000/customer/Bookmark/?favourite_ID={bookmark_id}&customer_id={id}&authkey={t...)
Create a bookmark
data={
"favourite_charger": 1,
"favourite_customer": 1
}
POST-(http://54.157.180.189:8000/customer/EditBookmark/?customer_id={id}&authkey={token))
Delete a bookmark
DELETE-(http://54.157.180.189:8000/customer/EditBookmark/?favourite_ID={bookmark_id}&customer_id={id}&authke...)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Appointment
View list of Appointments by customer
GET-(http://54.157.180.189:8000/customer/AppointmentList/?customer_id={id}&authkey={token})
View details of an Appointment
GET-(http://54.157.180.189:8000/customer/AppointmentDetail/?app_ID={appointment_id}&customer_id={id}&auth...)
Create an Appointment
data={
"app_customer": 1,
"app_charger": 1,
"app_date_time": "2020-10-17T19:54:00Z",
"app_duration": 5.0,
"app_amt": 356456.0,
"app_status": "Upcoming",
"app_socket":1
}
POST-(http://54.157.180.189:8000/customer/CreateAppointment/?customer_id={id}&authkey={token))
Edit status of an Appointment
PUT-(http://54.157.180.189:8000/customer/AppointmentStatus/?app_ID={appointment_id}&customer_id={id}&auth...)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Vehicle
View list of Vehicles by customer
GET-(http://54.157.180.189:8000/customer/VehicleList/?customer_id={id}&authkey={token})
View details of a Vehicle
GET-(http://54.157.180.189:8000/customer/Vehicle/?vehicle_id={vehicle_id}&customer_id={id}&authkey={token...)
Create a Vehicle
data={
"vehicle_image": "/media/Images/customer/vehicle/c1_7.png",
"vehicle_manufacture": "556",
"vehicle_model": "yhfj",
"vehicle_type": "ytyi",
"is_favourite": false,
"vehicle_customer": 7
}
POST-(http://54.157.180.189:8000/customer/Vehicle/?customer_id={id}&authkey={token})
Edit a Vehicle
PUT-(http://54.157.180.189:8000/customer/Vehicle/?vehicle_id={vehicle_id}&customer_id={id}&authkey={token...)
Delete a Vehicle
DELETE-(http://54.157.180.189:8000/customer/Vehicle/?vehicle_id={vehicle_id}&customer_id={id}&authkey={token...)
Vehicle Photo edit by
body data
{
"vehicle_image":[image]
}
PUT-(http://54.157.180.189:8000/customer/VehiclePhoto/?customer_id={id}&authkey={token})&vehicle_id={vehi...
Remove vehicle image and set it to default
DELETE-(http://54.157.180.189:8000/customer/VehiclePhoto/?customer_id={id}&authkey={token})&vehicle_id={vehi...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Billing
Customer creates a bill of an appointment(app_id) using coupon(coupon_id) by
body data{
"bill_amount": 365.0,
"razerpay_payment_id": "445tds",
"razerpay_order_id": "sdft",
"razerpay_signature": "w45",
"bill_app": 7,
"coupon": 1,
"bill_host": 4
}
POST-(http://54.157.180.189:8000/customer/CreateBill/?customer_id={id}&authkey={token}&app_id={app_id})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Coupon
Gives List of Coupons
GET-(http://54.157.180.189:8000/customer/Coupons/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ads
Gives list of ads
GET-(http://54.157.180.189:8000/customer/Banners/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
App Info
Gives the Privacy Policy, Terrms and Conditins, Help ,Contact and Credit Point Value
GET-(http://54.157.180.189:8000/customer/AppInfo/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Notification
Gives and Sends Customer notification
For List of Notifications
GET-(http://54.157.180.189:8000/customer/Notification/?customer_id={id}&authkey={token})
body data={
N_customer=1,
N_Title="Welcome",
N_Description="You have succesfully registered"
}
POST-(http://54.157.180.189:8000/customer/Notification/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Rating
To rate a particular charger
It creates a instance of rating and update the charger_rating
body data={
rating=4,
rating_customer=1,
rating_charger=1
}
POST-(http://54.157.180.189:8000/customer/Rating/?customer_id={id}&authkey={token}&charger_id=1)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Subscriptions
Gives the list of Subscription Type and Subscribe the customer
PUT-(http://54.157.180.189:8000/customer/Subscribe/?customer_id={id}&authkey={token}&type={SubscriptionTy... date and time}&end={end date and time})
GET-(http://54.157.180.189:8000/customer/SubscriptionTypeList/
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update Customer Credit
body data={
customer_credit=466
}
PUT-(http://54.157.180.189:8000/customer/UpdateCustomerCredit/?customer_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Search
For multiple key search based on given parameters
http://54.157.180.189:8000/customer/SearchView/?search={charger_name/power/other details/host name/ host address}
For list of all chargers
http://54.157.180.189:8000/customer/SearchView/
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CHECK COUPON
Responses
({"status": False, "message": 'Sorry,the coupon can not be used by anymore users'}
{"status": False, "message": 'Invalid Coupon code'}
{"status": False, "message": 'You have exceeded usage limit'}
{"status": True, "message": 'Valid Coupon', 'type': 'Percentage', 'percentage_off': coupon.coupon_amt, 'max_amount': coupon.coupon_amt_limit}
{"status": True, "message": 'Valid Coupon', 'type': 'Amount', 'coupon_amount': coupon.coupon_amt, 'min_amount_limit': coupon.coupon_amt_limit}
URL
PUT - http://http://54.157.180.189:8000/customer/CheckCoupon/?customer_id={customer_id}&coupon_code={coupo...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
AppInfo
Response
[
{
"PrivacyPolicy": "privacy policy test",
"TermsCondition": "terms condition... test",
"AppCurrency": "USD",
"Service_tax": 1.0,
"AppCreditValue": 1.0,
"ContactUs": "hello",
"Help": [
{
"id": 1,
"Question": "How to charge",
"Answer": "Charge Through Bluetooth Connectivity",
"Date_time": "2020-11-11T12:54:19.439993+05:30"
}
]
}
]
url
GET- http://54.157.180.189:8000/customer/AppInfo/
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Aminities list
It is used in filter to select aminities for search
GET- http://54.157.180.189:8000/customer/AminitiesList/
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RazerPay
url for razerpay to get order_id
GET- http://54.157.180.189:8000/customer/RazerpayOrder/?customer_id={customer_id}&authkey={authkey}&amoun...
for signature verification
GET- http://54.157.180.189:8000/customer/SignatureVerification/?customer_id={customer_id}&authkey={authke...
Host api
It deals with host data and requests.
It contains the following data:
send OTP on host's number.
verify OTP.
Registers or login host.
view and edit profile.
Viwe all the chargers with upcoming appointment count
viwe all the upcoming appointments in a charger
view all the appointments
view the earning and total creadit
Add and edit charger with various sockets and photos
Check Referal id is valid or not
get and post notification
get charger Details
Get Socket Types
get Credit Types
Update Host Credits
logout
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Register host by OTP
First an OTP is sent on host number.
POST-[Send OTP](http://54.157.180.189:8000/host/SendOtp/?phone={phone})
Then we verify the otp that was sent.
POST-[Verify OTP](http://54.157.180.189:8000/host/VerifyOtp/?phone={phone}&otp={otp})
A host is created with host number, session id and default Host details.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Check Referal ID
Checks the referal id provided by host at the time of registeration
PUT-(http://54.157.180.189:8000/host/CheckReferal/?referalID={referalID}&host_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Login host by OTP
First an OTP is sent on host number.
POST-[Send OTP](http://54.157.180.189:8000/host/SendOtp/?phone={phone})
Then we verify the otp that was sent.
POST-[Verify OTP](http://54.157.180.189:8000/host/VerifyOtp/?phone={phone}&otp={otp})
A new host session is created and host is logged in
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Appointments
View all the chargers and the upcoming booking no
GET-(http://54.157.180.189:8000/host/BookingHost/?host_id={id}&authkey={token})
View all the upcoming bookings in a Charger
GET-(http://54.157.180.189:8000/host/ChargerAppointments/?host_id={id}&authkey={token}&charger_id={charge...)
view all the upcoming, cancelled,pending and completed appointments of a host
GET-(http://54.157.180.189:8000/host/AllAppointments/?host_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Profile
view host Profile
GET-(http://54.157.180.189:8000/host/HostProfile/?host_id={id}&authkey={token})
Edit host Profile
PUT-(http://54.157.180.189:8000/host/EditHostProfile/?host_id={id}&authkey={token})
Change Host Profile Photo
body data
{
"host_image": [image]
}
PUT- (http://54.157.180.189:8000/host/HostPhoto/?host_id={id}&authkey={token}))
Remove Profile photo and set it to default
DELETE- (http://54.157.180.189:8000/host/HostPhoto/?host_id={id}&authkey={token}))
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
My Earnings
View all the billing transaction that were made to the host and host'd total creadits
GET-(http://54.157.180.189:8000/host/MyEarning/?host_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Add Charger
creates a charger
body data
{
"charger_name": "chdeee",
"charger_longitude": 13.434533,
"charger_latitude": 24.234534,
"charger_open": "14:02:00",
"charger_address": "gfr75rgbv",
"charger_close": "10:07:00",
"charger_brand_logo": "/media/Images/defaultCharger.png",
"charger_host": 4,
"power_available": "180,60",
"Other_details": ""
}
POST-(http://54.157.180.189:8000/host/AddCharger/'?host_id={id}&authkey={token})
adds sockets to charger
body data
{
"hour_price": 57.0,
"KWh_price": 74.0,
"charger_capacity": 3,
"Socket_availabile": 4,
"charger_id": 1,
"socket_type": 2
}
POST-(http://54.157.180.189:8000/host/AddSocketToCharget/'?host_id={id}&authkey={token})
adds photos to charger
body data
{
"charger_photo":[image],
"Charger_id":1
}
POST-(http://54.157.180.189:8000/host/AddPhotosToCharget/'?host_id={id}&authkey={token})
adds nearby
body data
{
"nearby_type": "shop",
"nearby_name": "retail shop",
"nearby_image": "/media/Images/defaultCharger.png",
"address": "u7rtutgooh",
"charger_id": 1
}
Post- http://54.157.180.189:8000/host/AddNearby/?host_id={host_id}&authkey={authkey}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Edit Charger
edits a charger
PUT-(http://54.157.180.189:8000/host/EditCharger/'?host_id={id}&authkey={token}&charget_id={charget_id})
Edits sockets to charger
PUT-(http://54.157.180.189:8000/host/EditSocketToCharget/'?host_id={id}&authkey={token}&socket_id={socket...)
Deletes photos to charger
PUT-(http://54.157.180.189:8000/host/DeletePhotosToCharget/'?host_id={id}&authkey={token}&photo_id={photo...)
edit nearby
PUT- http://54.157.180.189:8000/host/AddNearby/?host_id={host_id}&Nearby_id={Nearby_id}&authkey={authkey}
change Charger Image
body data
{
"charger_brand_logo": "/media/Images/Host/charger_photos/c1_1.png"
}
PUT- (http://54.157.180.189:8000/host/ChargerPhoto/?host_id={host_id}&authkey={authkey}&charger_id={charge...)
Remove Charger Image and set it to default image
DELETE- (http://54.157.180.189:8000/host/ChargerPhoto/?host_id={host_id}&authkey={authkey}&charger_id={charge...)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
logout
PUT-(http://54.157.180.189:8000/host/DeletePhotosToCharget/'?host_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Notification
Gives and Sends Host notification
For List of Notifications
GET-(http://54.157.180.189:8000/host/Notification/?host_id={id}&authkey={token})
body data={
N_host=1,
N_Title="Welcome",
N_Description="You have succesfully registered"
}
POST-(http://54.157.180.189:8000/host/Notification/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Charger Detail View
Gives the complete detail of the Charging ststion
GET-(http://54.157.180.189:8000/host/ChargerDetail/?host_id={id}&authkey={token}&charger_id={charger_id})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Socket Types
Give the list of Socket Types
GET-(http://54.157.180.189:8000/host/Sockets/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Credit Types
gives the list of different Credit Types that are possible
GET-(http://54.157.180.189:8000/host/CreditType/)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update Host Credit
body data={
host_credit=466
}
PUT-(http://54.157.180.189:8000/host/UpdateHostCredit/?host_id={id}&authkey={token})
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total earnig from a charger
gives the total earning of a particular charger
GET-(http://54.157.180.189:8000/host/TotalChargerEarning/?host_id={id}&authkey={token}&charger_id={charge...)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------