Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeboahd24/golang-clinic-appointment-api
https://github.com/yeboahd24/golang-clinic-appointment-api
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yeboahd24/golang-clinic-appointment-api
- Owner: yeboahd24
- Created: 2023-12-23T19:03:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-23T19:05:43.000Z (about 1 year ago)
- Last Synced: 2024-11-17T11:20:00.805Z (2 months ago)
- Language: Go
- Size: 60.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clinic Appointment System API Documentation
## Overview
This document provides sample POST requests for the Clinic Appointment System API.
### Base URL
The base URL for the API (when running locally) is `http://localhost:8080`.
## Endpoints
### User Registration
- **URL**: `/api/users/register`
- **Method**: `POST`
- **Curl Example**:
```bash
curl -X POST http://localhost:8080/api/users/register \\
-H "Content-Type: application/json" \\
-d '{
"Name": "John Doe",
"Email": "[email protected]",
"Password": "yourpassword",
"Role": "user",
"ContactNumber": "1234567890"
}'```
- URL: `/api/users/login`
- Method: `POST`
- Curl Example:
```bash
curl -X POST http://localhost:8080/api/users/login \\
-H "Content-Type: application/json" \\
-d '{
"Email": "[email protected]",
"Password": "yourpassword"
}'```
- URL: /api/appointments
- Method: `POST`
- Curl Example:```bash
curl -X POST http://localhost:8080/api/appointments \
-H "Content-Type: application/json" \
-d '{
"patient_id": 1,
"doctor_id": 2,
"date": "2023-04-15",
"time": "14:00",
"status": "scheduled"
}'
```- URL: /api/services
- Method: `POST`
- Curl Example:```bash
curl -X POST http://localhost:8080/api/services \
-H "Content-Type: application/json" \
-d '{
"name": "General Consultation",
"description": "A general medical consultation for routine health check-ups and non-emergency issues.",
"duration": 30
}'
```- URL: /api/locations
- Method: `POST`
- Curl Example:```bash
curl -X POST http://localhost:8080/api/locations \
-H "Content-Type: application/json" \
-d '{
"name": "Downtown Clinic",
"address": "123 Main St, Downtown City, DC 12345",
"contact_info": "555-1234"
}'```
# golang-clinic-appointment-api