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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.