Skip to content

RESTFUL API Documentation

Ege Karadibak edited this page Mar 19, 2021 · 3 revisions

NOTE: All RESTful service URLs may be followed by an ending ‘/’ and still result in the same function.

Title getAllCustomer
URL /customer
Method GET
DATA Params None
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get all the customers in the database
Title createCustomer
URL /Customerregister
Method POST
DATA Params @RequestBody Customer c
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description register as a customer
Title CustomerLogin
URL /logincustomer
Method POST
DATA Params username =[String], password =[String]
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description login as a customer
Title createTechnicianDto
URL /technicianregister
Method POST
DATA Params Technician object
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description register a technician
Title TechnicianLogin
URL /logintechnician
Method POST
DATA Params @RequestParam("username") =[String], @RequestParam("password") =[String]
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description login a technician
Title createPayment
URL /payment
Method POST
DATA Params @RequestBody Payment p
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description create a Payment
Title getAllPayments
URL /payments
Method GET
DATA Params @RequestBody Payment p
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get all the Payments in the database
Title getPaymentById
URL /payments/{id}
Method GET
DATA Params Payment object
URL Params @PathVariable("id")= [String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get the payment corresponding to the id
Title deletePayment
URL /payment/delete/{id}
Method DELETE
DATA Params None
URL Params (@PathVariable(name = "id") = [String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description Delete Payment
Title createAppointment
URL /appointment
Method POST
DATA Params @RequestBody Appointment a
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description create a Appointment
Title getAllAppointments
URL /appointments
Method GET
DATA Params None
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get all the appointments in the database
Title getAppointmentById
URL /appointments/{id}
Method POST
DATA Params None
URL Params (@PathVariable("id")=[int]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get the appointment corresponding to the id
Title deleteAppointment
URL /appointment/delete/{id}
Method DELETE
DATA Params None
URL Params @PathVariable(name = "id") =[int]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get the appointment corresponding to the id
Title createServiceDto
URL /appointment/delete/{id}
Method POST
DATA Params @RequestBody Services s
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description Create Service
Title createServiceDto
URL /services
Method GET
DATA Params None
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get all the services in the database
Title getAllService
URL /services
Method GET
DATA Params None
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get all the services in the database
Title getServicesById
URL /services/{id}
Method GET
DATA Params None
URL Params @PathVariable("id")=[String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get the Services corresponding to the id
Title deleteServices
URL /services/delete/{id}
Method DELETE
DATA Params None
URL Params @PathVariable("id")=[String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description delete Services
Title deleteServices
URL /services/delete/{id}
Method DELETE
DATA Params None
URL Params @PathVariable("id")=[String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description delete Services
Title createTimeSlotDto
URL /createtimeslot
Method POST
DATA Params @RequestBody TimeSlot ts
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description Create TimeSlot
Title getAllTimeSlots
URL /timeslots
Method GET
DATA Params None
URL Params None
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description Create TimeSlot
Title getTimeSlotById
URL /timeslot/{id}
Method GET
DATA Params None
URL Params @PathVariable("id")=[int]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description get the timeSlot corresponding to the id
Title deleteTimeSlot
URL /timeslot/delete/{id}
Method DELETE
DATA Params None
URL Params @PathVariable(name = "id"=[int]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description delete TimeSlot
Title changeCustomerPassword
URL /timeslot/change/{id}
Method PUT
DATA Params @RequestParam Time endTime, @RequestParam Time startTime, @RequestParam Date date
URL Params @PathVariable("id")=[int]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description change Customer Password
Title changeTimeSlotDetails
URL /timeslot/change/{id}
Method PUT
DATA Params @RequestParam Time endTime, @RequestParam Time startTime, @RequestParam Date date
URL Params @PathVariable("id")=[int]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description change TimeSlot Details
Title changeCustomerPassword
URL /Customerregister/password/{username}
Method PUT
DATA Params @RequestParam String password
URL Params @PathVariable("username")=[String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description change Customer Password
Title changeTechnicianPassword
URL /Customerregister/password/{username}
Method PUT
DATA Params @RequestParam String password
URL Params @PathVariable("username")=[String]
Success Response Code: 200 Ok
Error Response Code: 400 Bad Request
Description change Technician Password