MENU navbar-image

Introduction

API documentation for the ProMed hospital management system.

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include a Authorization header with the value "your-token".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Consultation

ViewConsultation

Example request:
curl --request GET \
    --get "http://localhost:8000/api/consultation" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/consultation"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "consequatur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/consultation

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   string   

Example: consequatur

ViewConsultationDetails

Example request:
curl --request GET \
    --get "http://localhost:8000/api/consultation/detail" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/consultation/detail"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "consequatur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/consultation/detail

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   string   

Example: consequatur

Customer

CustomerPagination

Example request:
curl --request GET \
    --get "http://localhost:8000/api/customer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 5,
    \"search\": \"consequatur\",
    \"per_page\": 13
}"
const url = new URL(
    "http://localhost:8000/api/customer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 5,
    "search": "consequatur",
    "per_page": 13
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/customer

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   integer   

Must be at least 1. Must not be greater than 6. Example: 5

search   string  optional  

Example: consequatur

per_page   integer  optional  

Must be at least 1. Must not be greater than 100. Example: 13

CustomerDropdown

Example request:
curl --request GET \
    --get "http://localhost:8000/api/customer/list" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 5,
    \"search\": \"consequatur\",
    \"per_page\": 13
}"
const url = new URL(
    "http://localhost:8000/api/customer/list"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 5,
    "search": "consequatur",
    "per_page": 13
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/customer/list

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   integer   

Must be at least 1. Must not be greater than 6. Example: 5

search   string  optional  

Example: consequatur

per_page   integer  optional  

Must be at least 1. Must not be greater than 100. Example: 13

Employee

EmployeePagination

Example request:
curl --request GET \
    --get "http://localhost:8000/api/employee" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 2,
    \"search\": \"consequatur\",
    \"per_page\": 13
}"
const url = new URL(
    "http://localhost:8000/api/employee"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 2,
    "search": "consequatur",
    "per_page": 13
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/employee

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   integer   

Must be at least 1. Must not be greater than 2. Example: 2

search   string  optional  

Example: consequatur

per_page   integer  optional  

Must be at least 1. Must not be greater than 100. Example: 13

EmployeeDropdown

Example request:
curl --request GET \
    --get "http://localhost:8000/api/employee/list" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 2,
    \"search\": \"consequatur\",
    \"per_page\": 13
}"
const url = new URL(
    "http://localhost:8000/api/employee/list"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 2,
    "search": "consequatur",
    "per_page": 13
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/employee/list

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   integer   

Must be at least 1. Must not be greater than 2. Example: 2

search   string  optional  

Example: consequatur

per_page   integer  optional  

Must be at least 1. Must not be greater than 100. Example: 13

Endpoints

GET api/schedule

Example request:
curl --request GET \
    --get "http://localhost:8000/api/schedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee_id\": [
        \"consequatur\"
    ],
    \"type\": \"4\",
    \"param1\": \"consequatur\",
    \"param2\": \"consequatur\",
    \"param3\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/schedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "employee_id": [
        "consequatur"
    ],
    "type": "4",
    "param1": "consequatur",
    "param2": "consequatur",
    "param3": "consequatur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/schedule

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

employee_id   string[]   
type   integer   

Example: 4

Must be one of:
  • 1
  • 2
  • 3
  • 4
param1   string   

Example: consequatur

param2   string   

Example: consequatur

param3   string  optional  

Example: consequatur

Master > Title

titlePagination

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master/title" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 2,
    \"search\": \"consequatur\",
    \"per_page\": 13
}"
const url = new URL(
    "http://localhost:8000/api/master/title"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 2,
    "search": "consequatur",
    "per_page": 13
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/master/title

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   integer   

Must be at least 1. Must not be greater than 2. Example: 2

search   string  optional  

Example: consequatur

per_page   integer  optional  

Must be at least 1. Must not be greater than 100. Example: 13

titleDropdown

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master/title/list" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 2,
    \"search\": \"consequatur\",
    \"per_page\": 13
}"
const url = new URL(
    "http://localhost:8000/api/master/title/list"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 2,
    "search": "consequatur",
    "per_page": 13
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/master/title/list

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   integer   

Must be at least 1. Must not be greater than 2. Example: 2

search   string  optional  

Example: consequatur

per_page   integer  optional  

Must be at least 1. Must not be greater than 100. Example: 13

titleStore

Example request:
curl --request POST \
    "http://localhost:8000/api/master/title/store" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"default\": 1,
    \"order\": \"mniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjuryvojcybzvrbyickznkygl\",
    \"status\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master/title/store"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "default": 1,
    "order": "mniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjuryvojcybzvrbyickznkygl",
    "status": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/master/title/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

default   integer   

Must be at least 0. Must not be greater than 1. Example: 1

order   string   

Must be at least 1 character. Example: mniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjuryvojcybzvrbyickznkygl

status   string   

Example: consequatur

titleUpdate

Example request:
curl --request PUT \
    "http://localhost:8000/api/master/title/update" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": \"consequatur\",
    \"name\": \"mqeopfuudtdsufvyvddqa\",
    \"default\": 1,
    \"order\": \"niihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjuryvojcybzvrbyickznkyglo\"
}"
const url = new URL(
    "http://localhost:8000/api/master/title/update"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "consequatur",
    "name": "mqeopfuudtdsufvyvddqa",
    "default": 1,
    "order": "niihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjuryvojcybzvrbyickznkyglo"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/master/title/update

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   string   

Example: consequatur

name   string   

Must not be greater than 50 characters. Example: mqeopfuudtdsufvyvddqa

default   integer   

Must be at least 0. Must not be greater than 1. Example: 1

order   string   

Must be at least 1 character. Example: niihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjuryvojcybzvrbyickznkyglo

titleStatusUpdate

Example request:
curl --request PATCH \
    "http://localhost:8000/api/master/title/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": \"consequatur\",
    \"status\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master/title/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "consequatur",
    "status": "consequatur"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/master/title/status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   string   

Example: consequatur

status   string   

Example: consequatur

User

UserRegister

Example request:
curl --request POST \
    "http://localhost:8000/api/user-register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"email\": \"carolyne.luettgen@example.org\",
    \"password\": \"ij-e\\/dl4m\",
    \"tenant_id\": 24
}"
const url = new URL(
    "http://localhost:8000/api/user-register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "email": "carolyne.luettgen@example.org",
    "password": "ij-e\/dl4m",
    "tenant_id": 24
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "message": "User registered successfully",
    "data": {
        "id": 1,
        "name": "Nibu Thomas",
        "email": "nibu@proemtech.com"
    }
}
 

Example response (422):


{
    "message": "Validation failed.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

POST api/user-register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: consequatur

email   string   

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string   

Must be at least 6 characters. Example: ij-e/dl4m

tenant_id   integer   

Must be at least 1. Must not be greater than 25. Example: 24

UserLogin

Example request:
curl --request POST \
    "http://localhost:8000/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"Z5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://localhost:8000/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "Z5ij-e\/dl4m{o,"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "eyJ0eXAiOiJKV1QiLCJh...",
    "token_type": "Bearer"
}
 

Example response (401):


{
    "message": "Invalid credentials."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password must be at least 6 characters."
        ]
    }
}
 

Request      

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: qkunze@example.com

password   string   

Must be at least 6 characters. Example: Z5ij-e/dl4m{o,

UserMe

requires authentication

Example request:
curl --request GET \
    --get "http://localhost:8000/api/me" \
    --header "Authorization: 3V5EgbkvZcDPa166h8fd4ae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/me"
);

const headers = {
    "Authorization": "3V5EgbkvZcDPa166h8fd4ae",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 1,
    "name": "nibu thomas",
    "email": "nibu@promed.com"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

GET api/me

Headers

Authorization      

Example: 3V5EgbkvZcDPa166h8fd4ae

Content-Type      

Example: application/json

Accept      

Example: application/json

UserLogout

requires authentication

Example request:
curl --request POST \
    "http://localhost:8000/api/logout" \
    --header "Authorization: 3V5EgbkvZcDPa166h8fd4ae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/logout"
);

const headers = {
    "Authorization": "3V5EgbkvZcDPa166h8fd4ae",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Successfully logged out."
}
 

Request      

POST api/logout

Headers

Authorization      

Example: 3V5EgbkvZcDPa166h8fd4ae

Content-Type      

Example: application/json

Accept      

Example: application/json

UserInactive

Example request:
curl --request PATCH \
    "http://localhost:8000/api/users/inactivate-user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 2
}"
const url = new URL(
    "http://localhost:8000/api/users/inactivate-user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 2
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "User inactivated successfully"
}
 

Example response (404):


{
    "message": "User not found."
}
 

Request      

PATCH api/users/inactivate-user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

The ID of the user to inactivate. Example: 2

TenantInactive

Example request:
curl --request PATCH \
    "http://localhost:8000/api/users/inactivate-tenant" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 3
}"
const url = new URL(
    "http://localhost:8000/api/users/inactivate-tenant"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 3
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "All users under tenant inactivated successfully"
}
 

Example response (404):


{
    "message": "Tenant not found."
}
 

Request      

PATCH api/users/inactivate-tenant

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

The ID of the tenant. Example: 3