{"id":19500298,"url":"https://github.com/aabduvak/hospital-api","last_synced_at":"2026-05-12T13:42:09.690Z","repository":{"id":235119829,"uuid":"601779370","full_name":"aabduvak/hospital-api","owner":"aabduvak","description":"Hospital API is a cutting-edge project that revolutionizes healthcare communication by offering patients the ability to connect with their doctors at their convenience. With this api, patients can chat with their doctors through the platform, make appointments, and locate nearby hospitals all in one place.","archived":false,"fork":false,"pushed_at":"2024-05-04T03:13:55.000Z","size":1063,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T21:24:46.197Z","etag":null,"topics":["api","django","django-rest-framework","google-cloud"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aabduvak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-14T19:58:35.000Z","updated_at":"2024-05-04T03:13:59.000Z","dependencies_parsed_at":"2024-04-22T10:09:28.891Z","dependency_job_id":"39221d55-ef4c-4a9b-80bd-9111699c68fc","html_url":"https://github.com/aabduvak/hospital-api","commit_stats":null,"previous_names":["aabduvak/hospital-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aabduvak/hospital-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fhospital-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fhospital-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fhospital-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fhospital-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aabduvak","download_url":"https://codeload.github.com/aabduvak/hospital-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fhospital-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32942140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","django","django-rest-framework","google-cloud"],"created_at":"2024-11-10T22:08:07.050Z","updated_at":"2026-05-12T13:42:09.672Z","avatar_url":"https://github.com/aabduvak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📝 API Documentation\n\n**Hospital API** is a cutting-edge project that revolutionizes healthcare communication by offering patients the ability to connect with their doctors at their convenience. With Ebebul, patients can chat with their doctors through the platform, make appointments, and locate nearby hospitals all in one place.\n\nThe platform offers a user-friendly interface that simplifies the process of scheduling appointments. Patients can search for doctors by specialty, location, and availability, making it easy to find a doctor that meets their specific needs. The platform also provides access to doctor profiles, where patients can view their credentials, specialties, and areas of expertise.\n\n**Hospital API**'s chat feature allows patients to communicate directly with their doctors, eliminating the need for phone calls or emails. Patients can ask questions, receive advice, and discuss their health concerns in a secure, private environment. This feature allows for better communication and understanding between patients and doctors, leading to improved health outcomes.\n\n## Getting Started\n\nBefore getting started, we strongly recommend you to install **Postman** app on your machine. Because, some type of requests are impossible to make from the browser. We also use, bash commands (mostly curl) for sending request to API\n\nYou can download Postman App for free by the link below:\n\n[Download Postman | Get Started for Free](https://www.postman.com/downloads/)\n\n## User Endpoints\n\n`/auth/users/` → create new user | POST\n\n`/auth/users/me/` → get current user | GET\n\n`/auth/users/me/` → updates record | PATCH\n\n`/auth/users/me/` → removes record from db | DELETE\n\n`/auth/token/login/` → created new access and refresh token | POST\n\n`/auth/token/refresh/` → get new access token by using refresh token | POST\n\n## Hospital Endpoints\n\n`/hospitals/\u003cpk:int\u003e/`→ get details of hospital by ID | GET\n\n`/nearest/hospitals`→ get list of nearest hospital | POST\n\n## Video Endpoints\n\n`/videos/` → get list of videos | GET\n\n`/videos/\u003cpk:int\u003e/`→ get details of video by ID | GET\n\n## Notification Endpoints\n\n`/notifications/` → get list of notifications | GET\n\n`/notifications/\u003cpk:int\u003e/`→ get details of notification by ID | GET\n\n## Content Endpoints\n\n`/contents/` → get list of notifications | GET\n\n`/contents/\u003cpk:int\u003e/`→ get details of content by ID | GET\n\n`/contents/\u003cpk:int\u003e/file/`→ get content of file by ID | GET\n\n## Visit Endpoints\n\n`/visits/` → get list of notifications | GET\n\n`/visits/\u003cpk:int\u003e/`→ get details of visit by ID | GET\n\n## Sign Up\n\nTo access any data, first you (client) must create a user account. Without authentication, you cannot access to any data in database.\n\nEndpoint to create new user record:\n\n`/auth/users/`\n\nClient must sent some required data which listed below\n\n```json\n// Request Body\n{\n    \"password\": \"string\", // max -\u003e 128 chars\n    \"email\": \"string/email\", // unique\n    \"name\": \"string\", // max -\u003e 100 chars\n    \"gender\": \"M\",// only \"F\" or \"M\"\n    \"birth_date\": \"2000-12-09\", // format YYYY-MM-DD\n    \"address\": \"Istanbul\", //string\n    \"category\": 1, // cat ID -\u003e 1 for User, 2 for Nurse\n    \"longitude\": 50.2, // double: 123.456789 | aaa.bbbbbb is valid data\n    \"latitude\": 25.1, // double: 123.456789 | aaa.bbbbbb is valid data\n    \"marial_status\": \"S\" // \"S\" -\u003e single, \"M\" -\u003e maried\n}\n```\n\nWhen you send valid data, server responses the record which was created\n\n```json\n// Response\n// Status: 201 Created\n{\n    \"id\": 6,\n    \"email\": \"hola2@gmail.com\",\n    \"name\": \"Abdulaziz Abduvakhobov\",\n    \"identity_number\": null,\n    \"gender\": \"M\",\n    \"birth_date\": \"2000-01-01\",\n    \"weight\": null,\n    \"height\": null,\n    \"address\": \"Tashkent\",\n    \"longitude\": \"50.200000\",\n    \"latitude\": \"25.100000\",\n    \"marial_status\": \"S\",\n    \"last_login\": \"2023-03-05T22:10:48.240671+03:00\",\n    \"category\": 1\n}\n```\n\nIf you send invalid data or miss some fields, server will response which field is invalid\n\n```json\n// Response\n// Status: 400 Bad Request\n{\n    \"password\": [\n        \"This field is required.\"\n    ],\n    \"email\": [\n        \"This field is required.\"\n    ],\n    \"name\": [\n        \"This field is required.\"\n    ],\n    \"gender\": [\n        \"This field is required.\"\n    ],\n    \"birth_date\": [\n        \"This field is required.\"\n    ],\n    \"address\": [\n        \"This field is required.\"\n    ],\n    \"longitude\": [\n        \"This field is required.\"\n    ],\n    \"latitude\": [\n        \"This field is required.\"\n    ],\n    \"marial_status\": [\n        \"This field is required.\"\n    ],\n    \"category\": [\n        \"This field is required.\"\n    ]\n}\n```\n\nAnother example of invalid request\n\n```json\n// Request Body\n{\n    \"password\": \"1234\",\n    \"email\": \"hello@test.com\",\n    \"first_name\": \"Abdulaziz\",\n    \"last_name\": \"abduvakhobov\",\n    \"gender\": \"M\",\n    \"birth_date\": \"2000-12-09\",\n    \"address\": \"Istanbul\"\n}\n```\n\nIn this case, server checks validity of all fields, by default password value must be at least 8 characters\n\n```json\n// Response\n// Status: 400 Bad Request\n{\n    \"longitude\": [\n        \"This field is required.\"\n    ],\n    \"latitude\": [\n        \"This field is required.\"\n    ],\n    \"marial_status\": [\n        \"This field is required.\"\n    ],\n    \"category\": [\n        \"This field is required.\"\n    ]\n}\n```\n\n## Authentication\n\nAfter successfully creating of user record, client have to get access token in order to get access to data\n\n**Token Endpoints:**\n\n`/auth/token/login/` → creates new access and refresh **JWT (JSON Web Token)** token\n\n`/auth/token/refresh/` → creates new access token by using refresh token\n\nYou must send **POST** request to get token. In the body of request client must enter **email** and **password** value\n\nExample in Bash:\n\n```bash\ncurl -X POST https://..../auth/token/login/\n   -H 'Content-Type: application/json'\n   -d '{\"email\":\"my_mail\",\"password\":\"my_password\"}'\n```\n\nIf data is valid, server will send access token\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY4NjY4Mzg2OSwianRpIjoiYTM1NDZmYmU2OTg1NDlkZTg4ODVhZTBhMzQ5ZDBiYzQiLCJ1c2VyX2lkIjo0fQ.EBeBY6JpX5TQaP_Ek__3xi-zxb887uWXQQqtDOC2q48\",\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjc4MTMwMjY5LCJqdGkiOiJmMWU0M2ZlZTgxYjc0MTFhODkwNDk2ZjUzMDViOTk1ZiIsInVzZXJfaWQiOjR9.hvH-uI0fX39Etug9rNYuOtRyNED8SbHtTlEA04FdODo\"\n}\n```\n\nOtherwise, it will send an error response\n\n```json\n// Response\n// Status: 401 Unauthorized\n{\n    \"detail\": \"invalid email or password\",\n    \"access\": null,\n    \"refresh\": null\n}\n```\n\nAfter few days access token will be **expired** and you (user) can’t access data anymore with current access token. For not bother user each time, you must send **POST** request to get new access token with **refresh** token. In the body of request client must enter just refresh token.\n\nExample in Bash:\n\n```bash\ncurl -X POST http://...../api/v1/auth/token/refresh/' \\\n--data '{\n\t\"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY4NjY4ODg0NCwianRpIjoiYWE2ZTdiOGE3N2M5NDU3YTlkOGQ1ZDc3ZTgwNDFjNjIiLCJ1c2VyX2lkIjo1fQ.04NV9HkNNbQXFuD-_HCrHTVqAaMESBsVKQB1B2ZIlfk\"\n}'\n```\n\nIf data is valid, server will send access token\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjc4MTMwMjY5LCJqdGkiOiJmMWU0M2ZlZTgxYjc0MTFhODkwNDk2ZjUzMDViOTk1ZiIsInVzZXJfaWQiOjR9.hvH-uI0fX39Etug9rNYuOtRyNED8SbHtTlEA04FdODo\"\n}\n```\n\nOtherwise, it will send an error response\n\n```json\n// Response\n// Status: 401 Unauthorized\n{\n    \"detail\": \"Token is invalid or expired\",\n    \"code\": \"token_not_valid\"\n}\n```\n\nAfter getting `access` and `refresh` token client authenticated successfully and it can send almost every request. But keep in mind, you must set special header in order to access data.\n\n### User Requests\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/users/me/\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"id\": 4,\n    \"name\": \"Abdulaziz Abduvakhobov\",\n    \"email\": \"hello@gmail.com\",\n    \"birth_date\": \"2000-01-01\",\n    \"address\": \"Tashkent\",\n    \"gender\": \"M\",\n    \"identity_number\": null,\n    \"weight\": null,\n    \"height\": null,\n    \"last_login\": \"2023-03-04T10:25:33.029392Z\",\n    \"longitude\": 50.2,\n    \"latitude\": 25.1,\n    \"marial_status\": \"S\",\n    \"category_name\": \"Nurse\",\n    \"category_id\": 2\n}\n```\n\n**PATCH** **Request Example**\n\n```bash\ncurl --location --request PATCH 'https://${BASE_URL}/api/v1/auth/users/me/' \\\n--header 'Authorization: Token ${TOKEN} \\\n--data '{\n\t\"height\": 170,\n\t\"weight\": 72,\n\t\"identity_number\": \"12345678910\"\n}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"id\": 4,\n    \"email\": \"hello@gmail.com\",\n    \"name\": \"Abdulaziz Abduvakhobov\",\n    \"identity_number\": \"123456789\",\n    \"gender\": \"M\",\n    \"birth_date\": \"2000-01-01\",\n    \"weight\": null,\n    \"height\": null,\n    \"address\": \"Tashkent\",\n    \"longitude\": \"50.200000\",\n    \"latitude\": \"25.100000\",\n    \"marial_status\": \"S\",\n    \"last_login\": \"2023-03-05T22:27:59.738304+03:00\",\n    \"category\": 1\n}\n```\n\n**DELETE** **Request Example**\n\n```bash\ncurl --location --request DELETE 'https://${BASE_URL}/api/v1/auth/users/me/' \\\n     --header 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"message\": \"User successfully deleted.\"\n}\n```\n\n### Content Requests\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/contents/\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n[\n    {\n        \"id\": 1,\n        \"title\": \"Hello World\",\n        \"text\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Faucibus et molestie ac feugiat sed lectus vestibulum mattis. Urna nec tincidunt praesent semper feugiat. Duis ultricies lacus sed turpis. Elementum integer enim neque volutpat ac tincidunt vitae semper quis.\",\n\t\"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n        \"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n    },\n    {\n        \"id\": 2,\n        \"title\": \"Guten Abend!\",\n        \"text\": \"Vestibulum lectus mauris ultrices eros in cursus turpis. Velit aliquet sagittis id consectetur purus ut faucibus. Dictum non consectetur a erat nam. Quam adipiscing vitae proin sagittis nisl rhoncus. Egestas integer eget aliquet nibh praesent tristique magna. Felis bibendum ut tristique et egestas. Cras pulvinar mattis nunc sed blandit libero volutpat sed. Magna fringilla urna porttitor rhoncus dolor purus non enim praesent. Dolor sit amet consectetur adipiscing elit pellentesque habitant morbi tristique. Et malesuada fames ac turpis.\",\n        \"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n        \"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n    }\n]\n```\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/contents/1/ # ID of Content\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"id\": 1,\n    \"title\": \"Hello World\",\n    \"text\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Faucibus et molestie ac feugiat sed lectus vestibulum mattis. Urna nec tincidunt praesent semper feugiat. Duis ultricies lacus sed turpis. Elementum integer enim neque volutpat ac tincidunt vitae semper quis.\",\n    \"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n    \"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n}\n```\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/contents/1/file/ # ID of Content\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```html\n\u003c!-- Server returns content of uploaded file otherwise 404 error --\u003e\n\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n\t\u003cmeta charset=\"utf-8\"\u003e\n\t\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n\t\u003ctitle\u003eBootstrap demo\u003c/title\u003e\n\t\u003clink href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ\" crossorigin=\"anonymous\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003ch1\u003eHello, world!\u003c/h1\u003e\n\t\u003cscript src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe\" crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Video Requests\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/videos/\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n[\n    {\n        \"id\": 1,\n        \"name\": \"New\",\n        \"url\": \"https://www.youtube.com/watch?v=YxG7PhZ3fb4\",\n        \"description\": \"Speed up your Rust code with Rayon\",\n\t\"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n    \t\"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n    },\n    {\n        \"id\": 2,\n        \"name\": \"Low Level Learning\",\n        \"url\": \"https://youtu.be/qWVRJsaUTIg\",\n        \"description\": \"Nam at lectus urna duis convallis convallis. Nunc pulvinar sapien et ligula. Lorem ipsum dolor sit amet consectetur. Etiam non quam lacus suspendisse faucibus interdum posuere lorem. Sit amet commodo nulla facilisi nullam vehicula ipsum. Velit scelerisque in dictum non consectetur a. Cursus turpis massa tincidunt dui ut ornare lectus sit. Pellentesque sit amet porttitor eget.\",\n\t\"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n    \t\"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n    }\n]\n```\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/videos/2/ # ID of Video\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"id\": 2,\n    \"name\": \"Low Level Learning\",\n    \"url\": \"https://youtu.be/qWVRJsaUTIg\",\n    \"description\": \"Nam at lectus urna duis convallis convallis. Nunc pulvinar sapien et ligula. Lorem ipsum dolor sit amet consectetur. Etiam non quam lacus suspendisse faucibus interdum posuere lorem. Sit amet commodo nulla facilisi nullam vehicula ipsum. Velit scelerisque in dictum non consectetur a. Cursus turpis massa tincidunt dui ut ornare lectus sit. Pellentesque sit amet porttitor eget.\",\n    \"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n    \"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n}\n```\n\n### Hospital Requests\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/hospitals/53/ # ID of Hospital\n   -H 'Content-Type: application/json'\n\t -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"id\": 53,\n    \"city_name\": \"Adana\",\n    \"district_name\": \"Saimbeyli\",\n    \"date_created\": \"2023-04-23T16:33:40.541130+03:00\",\n    \"date_updated\": \"2023-04-23T16:33:40.752697+03:00\",\n    \"name\": \"ÖZEL ORTOPEDIA HASTANESİ - ORTOPEDIA ÖZEL SAĞLIK HİZMETLERİ TİC.A.Ş.\",\n    \"address\": \"Döşeme Mah. Cumhuriyet Cad. 64 Seyhan, Adana\",\n    \"phone\": \"03224327777\",\n    \"email\": \"ortopedia@ortopedia.com.tr\",\n    \"website\": \"http://www.ortopedia.com.tr\",\n    \"longitude\": \"35.3185640000000\",\n    \"latitude\": \"36.9950300000000\"\n}\n```\n\n**POST** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/nearest/hospitals # without slash\n   -H 'Content-Type: application/json'\n\t -H 'Authorization: Token ${TOKEN}'\n\t --data-raw '{\n\t\t    \"latitude\": 41.025717927894824,\n\t\t    \"longitude\": 28.839039244671888\n\t }'\n```\n\nBody of request\n\n```json\n# User's location\n{\n  \"latitude\": 41.025717927894824,\n  \"longitude\": 28.839039244671888\n}\n```\n\nServer’s response: List of **10 nearest hospitals**\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"hospitals\": [\n        {\n            \"id\": 1212,\n            \"name\": \"ÖZEL A HASTANESİ - A HOSPITAL SAĞLIK HİZMETLERİ LTD.ŞTİ.\",\n            \"address\": \"Kocasinan Merkez Mah. Mahmutbey Cad. 373-375 Bahçelievler, İstanbul\",\n            \"latitude\": \"41.0215873384960\",\n            \"longitude\": \"28.8392144232450\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bahçelievler\",\n            \"distance\": 0.45953634645655844 # km\n        },\n        {\n            \"id\": 1189,\n            \"name\": \"ÖZEL İSTANBUL MEDICINE HOSPITAL - EREN SAĞLIK HİZMETLERİ SAN. VE TİC.LTD.ŞTİ.\",\n            \"address\": \"Barbaros Mah. Hoca Ahmet Yesevi Cad. 149 Güneşli, Bağcılar, İstanbul\",\n            \"latitude\": \"41.0302620656710\",\n            \"longitude\": \"28.8387095093220\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bağcılar\",\n            \"distance\": 0.5060423457838605\n        },\n        {\n            \"id\": 1199,\n            \"name\": \"ÖZEL YENİ UFUK HASTANESİ - SOLMAZ ÖZEL SAĞLIK EĞİTİM HİZMETLERİ TİC.LTD.ŞTİ.\",\n            \"address\": \"İnönü Mah. 27. Sok. 4 Bağcılar, İstanbul\",\n            \"latitude\": \"41.0329590000000\",\n            \"longitude\": \"28.8558010000000\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bağcılar\",\n            \"distance\": 1.620245258446413\n        },\n        {\n            \"id\": 1194,\n            \"name\": \"ÖZEL HOSPITALIST HASTANESİ - ÖZEL HOSPITALIST BAĞCILAR SAĞLIK HİZMETLERİ SAN.TİC.A.Ş.\",\n            \"address\": \"Yavuzselim Mah. Hoca Ahmet Yesevi Cad. 26/A Sok. 5 Bağcılar, İstanbul\",\n            \"latitude\": \"41.0345400000000\",\n            \"longitude\": \"28.8550550000000\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bağcılar\",\n            \"distance\": 1.6634610308045419\n        },\n        {\n            \"id\": 1213,\n            \"name\": \"T.C.S.B. İSTANBUL FİZİK TEDAVİ REHABİLİTASYON EĞİTİM VE ARAŞTIRMA HASTANESİ\",\n            \"address\": \"Kocasinan Merkez Mah. Karadeniz Cad. 48 Bahçelievler, İstanbul\",\n            \"latitude\": \"41.0099161083830\",\n            \"longitude\": \"28.8446381032890\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bahçelievler\",\n            \"distance\": 1.8187888707207216\n        },\n        {\n            \"id\": 1214,\n            \"name\": \"T.C.S.B. İSTANBUL FİZİK TEDAVİ REHABİLİTASYON EĞİTİM VE ARAŞTIRMA HASTANESİ - YENİBOSNA EK HİZMET BİNASI\",\n            \"address\": \"Yenibosna Merkez Mah. Ayvaz Cami Sok. 4 Yenibosna Ek Hizmet Binası Bahçelievler, İstanbul\",\n            \"latitude\": \"41.0122830000000\",\n            \"longitude\": \"28.8234020000000\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bahçelievler\",\n            \"distance\": 1.9881678907611782\n        },\n        {\n            \"id\": 1195,\n            \"name\": \"ÖZEL YENİ İKLİM HASTANESİ - SOLMAZ ÖZEL SAĞLIK EĞİTİM HİZMETLERİ TİC.LTD.ŞTİ.\",\n            \"address\": \"Sancaktepe Mah. 892. Sok. 5 Bağcılar, İstanbul\",\n            \"latitude\": \"41.0367029073560\",\n            \"longitude\": \"28.8580800172180\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bağcılar\",\n            \"distance\": 2.010690230689927\n        },\n        {\n            \"id\": 1196,\n            \"name\": \"ÖZEL GÜNEŞLİ ERDEM HASTANESİ - ÇAKMAK ÖZEL SAĞLIK HİZMETLERİ LTD.ŞTİ.\",\n            \"address\": \"Güneşli Mah. Fevzi Çakmak Cad. 74 Bağcılar, İstanbul\",\n            \"latitude\": \"41.0405530000000\",\n            \"longitude\": \"28.8251490000000\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bağcılar\",\n            \"distance\": 2.0195438403242845\n        },\n        {\n            \"id\": 1208,\n            \"name\": \"T.C.S.B. BAHÇELİEVLER DEVLET HASTANESİ\",\n            \"address\": \"Kocasinan Merkez Mah. Karadeniz Cad. 48 Bahçelievler, İstanbul\",\n            \"latitude\": \"41.0063053348260\",\n            \"longitude\": \"28.8442947804830\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bahçelievler\",\n            \"distance\": 2.20316048238313\n        },\n        {\n            \"id\": 1211,\n            \"name\": \"SANTE PLUS HOSPİTAL - BEKA SAĞLIK EĞİTİM TIBBİ MALZEMELER TEKSTİL TURİZM GIDA SAN. VE TİC.LTD.ŞTİ.\",\n            \"address\": \"Yenibosna Merkez Mah. 29 Ekim Cad. 28 Bahçelievler, İstanbul\",\n            \"latitude\": \"41.0122420000000\",\n            \"longitude\": \"28.8184760000000\",\n            \"city_name\": \"İstanbul\",\n            \"district_name\": \"Bahçelievler\",\n            \"distance\": 2.2850793310287014\n        }\n    ]\n}\n```\n\n### Appointments\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/visits/\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n[\n    {\n        \"id\": 1,\n        \"datetime\": \"2023-03-04T13:14:20+03:00\",\n        \"location\": \"Virtual Office\",\n        \"visitor\": 2, // ID of User\n        \"user\": 1, // ID of User\n\t\"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n\t\"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n    },\n    {\n        \"id\": 2,\n        \"datetime\": \"2023-03-05T22:09:54+03:00\",\n        \"location\": \"Tashkent\",\n        \"visitor\": 2, // ID of User\n        \"user\": 5, // ID of User\n\t\"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n\t\"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n    }\n]\n```\n\n**GET** **Request Example**\n\n```bash\ncurl -X GET https://..../api/v1/auth/visits/2/ # ID of Visit\n   -H 'Content-Type: application/json'\n   -H 'Authorization: Token ${TOKEN}'\n```\n\nServer’s response:\n\n```json\n// Response\n// Status: 200 OK\n{\n    \"id\": 2,\n    \"datetime\": \"2023-03-05T22:09:54+03:00\",\n    \"location\": \"Tashkent\",\n    \"visitor\": 2, // ID of User\n    \"user\": 5, // ID of User\n    \"date_created\": \"2023-04-18T22:04:48.290174+03:00\",\n    \"date_updated\": \"2023-04-18T22:04:48.290199+03:00\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faabduvak%2Fhospital-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faabduvak%2Fhospital-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faabduvak%2Fhospital-api/lists"}