You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We need CRUD APIs for Establishments
Describe the solution you'd like
Only authorised users can call these APIs
I have added * with some params which means its required/mandatory.
CREATE
In this the api will accept following things: name*, latitude, longitude, maps_location, address_line_1*, address_line_2, city*, state*, country*, pincode*
The header will contain user related information, verify that this user is associated with a doctor_profile (because only doctors can handle establishments). Basically this will help you fetch the doctor_profile_id
Now based on these params, first add the address details to Address model and then use that address_id in establishment model.
Make sure DoctorEstablishment model also has a entry to connect doctor with establishment.
Return the created object in json response.
UPDATE
In this the api will accept following things: establishment_id*, name, latitude, longitude, maps_location, address_line_1, address_line_2, city, state, country, pincode
The header will contain user related information, verify that this user is associated with a doctor_profile (because only doctors can handle establishments). Basically this will help you fetch the doctor_profile_id
Now update whichever is required either in Establishment model or in Address model.
Return the updated object in json response.
DELETE
This api will accept: establishment_id
The header will contain user related information, verify that this user is associated with a doctor_profile (because only doctors can handle establishments). Basically this will help you fetch the doctor_profile_id
If authorised, delete the establishment.
Return success related message.
GET ALL
NO AUTHORISATION REQUIRED.
This api will accept any type of filter params like name, city, state, country, pincode, doctor_profile_id (via header). These params should be part of URL.
Based on any of these params filter should get applied and corresponding results should be returned.
GET
NO AUTHORISATION REQUIRED.
This api will accept: establishment_id. This should be part of URL.
Return the establishment.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
GET ALL
NO AUTHORISATION REQUIRED.
This api will accept any type of filter params like name, city, state, country, pincode, doctor_profile_id (via header).
Based on any of these params filter should get applied and corresponding results should be returned.
Please clarify if all filter parameters (e.g., name, city, state) need to be passed as key-value pairs in the header, similar to how an Authorization header works, or if they should be passed differently.
GET
NO AUTHORISATION REQUIRED.
This api will accept: establishment_id
The header will contain user related information, verify that this user is associated with a doctor_profile (because only doctors can handle establishments). Basically this will help you fetch the doctor_profile_id
If authorised, return the establishment.
Although authorization isn’t required for this API, user-related information still needs to be included in the header. Please clarify the purpose of this requirement.
Is your feature request related to a problem? Please describe.
We need CRUD APIs for Establishments
Describe the solution you'd like
Only authorised users can call these APIs
I have added
*
with some params which means its required/mandatory.CREATE
name*
,latitude
,longitude
,maps_location
,address_line_1*
,address_line_2
,city*
,state*
,country*
,pincode*
doctor_profile_id
Address
model and then use that address_id in establishment model.DoctorEstablishment
model also has a entry to connect doctor with establishment.UPDATE
establishment_id*
,name
,latitude
,longitude
,maps_location
,address_line_1
,address_line_2
,city
,state
,country
,pincode
doctor_profile_id
Establishment
model or inAddress
model.DELETE
establishment_id
doctor_profile_id
GET ALL
name
,city
,state
,country
,pincode
,doctor_profile_id
(via header). These params should be part of URL.GET
establishment_id
. This should be part of URL.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: