Introduction
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 an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
AI Blood Assistant
Grounded Claude chatbot answering donation questions (can I donate, why deferred, where to donate, what to eat). Works for guests and logged-in users.
Whether the assistant is configured/available
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/assistant/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/assistant/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/assistant/status could not be 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.
Send a message to the assistant
Pass conversation_uuid to continue a conversation, or omit to start a new one.
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/assistant/message" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"message\": \"vmqeopfuudtdsufvyvddq\",
\"conversation_uuid\": \"66529e01-d113-3473-8d6f-9e11e09332ea\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/assistant/message"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": "vmqeopfuudtdsufvyvddq",
"conversation_uuid": "66529e01-d113-3473-8d6f-9e11e09332ea"
};
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.
Authentication
Registration and Sanctum token issuance for the mobile app. Tokens are bearer
tokens returned in the token field; send as Authorization: Bearer {token}.
Login
Authenticate a donor, patient, doctor or admin by email OR phone.
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\",
\"phone\": \"consequatur\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com",
"phone": "consequatur",
"password": "O[2UZ5ij-e\/dl4m{o,"
};
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.
Register donor
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/auth/register/donor" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"gender\": \"consequatur\",
\"email\": \"carolyne.luettgen@example.org\",
\"phone\": \"consequatur\",
\"password\": \"[2UZ5ij-e\\/dl4\",
\"address\": \"consequatur\",
\"city\": \"consequatur\",
\"blood_group\": \"consequatur\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/auth/register/donor"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"gender": "consequatur",
"email": "carolyne.luettgen@example.org",
"phone": "consequatur",
"password": "[2UZ5ij-e\/dl4",
"address": "consequatur",
"city": "consequatur",
"blood_group": "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.
Register patient
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/auth/register/patient" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"gender\": \"consequatur\",
\"email\": \"carolyne.luettgen@example.org\",
\"phone\": \"consequatur\",
\"password\": \"[2UZ5ij-e\\/dl4\",
\"blood_group\": \"consequatur\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/auth/register/patient"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"gender": "consequatur",
"email": "carolyne.luettgen@example.org",
"phone": "consequatur",
"password": "[2UZ5ij-e\/dl4",
"blood_group": "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.
Current user
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/me could not be 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.
Logout
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/auth/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
Blood Requests
List blood requests
requires authentication
Patients see their own requests; donors see active requests compatible with their blood group.
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/blood-requests" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-requests"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/blood-requests could not be 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.
Compatible appeals near me
requires authentication
Open appeals the donor can donate to, ranked by urgency + proximity to home or the town they're currently visiting.
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/blood-requests/compatible" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-requests/compatible"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/blood-requests/compatible could not be 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.
Create a blood request
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/blood-requests" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"blood_group\": \"consequatur\",
\"number_of_bags\": 45,
\"health_facility\": \"consequatur\",
\"hospital_id\": 17,
\"medical_info\": \"consequatur\",
\"priority\": \"emergency\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-requests"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"blood_group": "consequatur",
"number_of_bags": 45,
"health_facility": "consequatur",
"hospital_id": 17,
"medical_info": "consequatur",
"priority": "emergency"
};
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.
Respond to a blood request
requires authentication
A donor pledges/accepts a request. Records the response and credits the donor.
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/blood-requests/1/respond" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-requests/1/respond"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
Escalate to Emergency Mode
requires authentication
Ranks compatible nearby donors and fans out a multi-channel appeal. Only the requester (or an admin) may escalate.
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/blood-requests/1/escalate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-requests/1/escalate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
Ranked donor matches for a request (staff/requester view).
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/blood-requests/1/matches" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-requests/1/matches"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/blood-requests/1/matches could not be 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.
Campaigns (Blood Drives)
List published campaigns (public)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/campaigns" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/campaigns"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/campaigns could not be 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.
Show one campaign with progress (public)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/campaigns/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/campaigns/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/campaigns/3 could not be 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.
Register for a campaign
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/campaigns/3/register" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/campaigns/3/register"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
My campaign registrations
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/my/campaign-registrations" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/my/campaign-registrations"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/my/campaign-registrations could not be 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.
Community Media
Upload community photos/videos. Prefer the direct-to-Cloudinary flow (get a signature, upload from the device, then attach the descriptor to a post) for large files — it keeps media off the app server.
Upload a media file (server compresses/offloads); returns a media descriptor
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/media" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@C:\Users\USER\AppData\Local\Temp\phpE57C.tmp" const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/media"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
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.
Signature for a direct browser/device upload to Cloudinary
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/media/signature" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/media/signature"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/media/signature could not be 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.
Content & Community
Knowledge Center and the community feed.
Knowledge categories with published article counts
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/knowledge/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/knowledge/categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/knowledge/categories could not be 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.
List published knowledge articles (optionally by category slug)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/knowledge/articles" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/knowledge/articles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/knowledge/articles could not be 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.
Show a single knowledge article
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/knowledge/articles/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/knowledge/articles/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/knowledge/articles/1 could not be 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.
Community feed (public posts), ranked for the viewer
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/feed" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/feed"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/feed could not be 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.
List a post's comments
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/posts/170/comments" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/posts/170/comments"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/posts/170/comments could not be 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.
Create a post
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/posts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"body\": \"vmqeopfuudtdsufvyvddq\",
\"type\": \"update\",
\"image_url\": \"http:\\/\\/www.kunde.com\\/\",
\"is_anonymous\": true,
\"media\": [
{
\"type\": \"video\",
\"url\": \"http:\\/\\/www.harber.com\\/fuga-aspernatur-natus-earum-quas\"
}
]
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/posts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"body": "vmqeopfuudtdsufvyvddq",
"type": "update",
"image_url": "http:\/\/www.kunde.com\/",
"is_anonymous": true,
"media": [
{
"type": "video",
"url": "http:\/\/www.harber.com\/fuga-aspernatur-natus-earum-quas"
}
]
};
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.
React to a post (toggle)
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/posts/170/react" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/posts/170/react"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
Comment on a post
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/posts/170/comment" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"body\": \"vmqeopfuudtdsufvyvddq\",
\"parent_id\": 17,
\"is_anonymous\": true
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/posts/170/comment"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"body": "vmqeopfuudtdsufvyvddq",
"parent_id": 17,
"is_anonymous": true
};
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.
Donor Data
Get donor credit balance
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/credit" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/credit"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/credit could not be 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.
Next eligible donation date
requires authentication
Males wait 3 months, females 4 months between donations.
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/donation-info" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/donation-info"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/donation-info could not be 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.
Get serology / blood test results
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/results" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/results"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/results could not be 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.
Engagement
Achievements, certificates, leaderboards, referrals and the health tracker.
Public leaderboard (scope: national|region|hospital|gender)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/leaderboard" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/leaderboard"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/leaderboard could not be 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.
My achievements
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/achievements" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/achievements"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/achievements could not be 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.
My certificates
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/certificates" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/certificates"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/certificates could not be 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.
Download a certificate PDF
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/certificates/66529e01-d113-3473-8d6f-9e11e09332ea/download" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/certificates/66529e01-d113-3473-8d6f-9e11e09332ea/download"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/certificates/66529e01-d113-3473-8d6f-9e11e09332ea/download could not be 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.
My referral code + stats
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/referral" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/referral"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/referral could not be 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.
List my health records
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/health-records" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/health-records"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/health-records could not be 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.
Add a health record (BMI auto-computed)
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/health-records" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"weight_kg\": 21,
\"height_cm\": 13,
\"hemoglobin\": 16,
\"bp_systolic\": 5,
\"bp_diastolic\": 14,
\"pulse\": 16,
\"temperature\": 6,
\"recorded_at\": \"2026-07-14T09:48:26\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/health-records"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"weight_kg": 21,
"height_cm": 13,
"hemoglobin": 16,
"bp_systolic": 5,
"bp_diastolic": 14,
"pulse": 16,
"temperature": 6,
"recorded_at": "2026-07-14T09:48:26"
};
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.
Lookups
Reference data for populating mobile dropdowns. Public (no auth required).
List hospitals & health facilities
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/hospitals" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/hospitals"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/hospitals could not be 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.
Get one hospital's GPS coordinates
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/hospitals/1/location" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/hospitals/1/location"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/hospitals/1/location could not be 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.
List blood groups
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/blood-groups" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/blood-groups"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/blood-groups could not be 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.
List regions (geography)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/regions" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/regions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/regions could not be 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.
Gamification assets — mascot moods, celebration banners + sounds, by trigger
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/celebration-assets" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/celebration-assets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/celebration-assets could not be 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.
Notifications
In-app notification history for the mobile app (blood appeals, emergencies, request updates, milestones). Push delivery is separate (FCM); this is the durable list the user can browse and mark as read.
List my notifications (paginated, newest first) + unread count
requires authentication
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/notifications" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/notifications"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/notifications could not be 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.
Mark a single notification as read
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/notifications/consequatur/read" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/notifications/consequatur/read"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
Mark all my notifications as read
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/notifications/read-all" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/notifications/read-all"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.
Organizations & Volunteers
Public organization leaderboard (by lives impacted)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/organizations/leaderboard" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/organizations/leaderboard"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/organizations/leaderboard could not be 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.
Public organization profile + impact stats
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/organizations/4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/organizations/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/organizations/4 could not be 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.
Join an organization via its invite code (as a registered donor)
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/organizations/join" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"invite_code\": \"consequatur\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/organizations/join"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"invite_code": "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.
Apply to volunteer
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/volunteers/apply" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"regional_ambassador\",
\"organization_id\": 17
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/volunteers/apply"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "regional_ambassador",
"organization_id": 17
};
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.
Payments
CamPay mobile-money flow for the (optional) blood-appeal fee. When payment is disabled the appeal is created immediately and no charge is made.
Payment configuration (call before showing a payment UI)
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/payments/info" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/payments/info"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/payments/info could not be 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.
Check payment status (poll every ~5s) — reconciles with CamPay.
Example request:
curl --request GET \
--get "http://localhost/elifesaver-app/public/api/v1/payments/consequatur/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/payments/consequatur/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route elifesaver-app/public/api/v1/payments/consequatur/status could not be 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.
Initiate a blood-appeal payment
requires authentication
If payment is disabled the appeal is created immediately (free). Otherwise a payment record is created and a CamPay collection is initiated.
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/payments/initiate" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"consequatur\",
\"blood_group\": \"consequatur\",
\"number_of_bags\": 45,
\"health_facility\": \"consequatur\",
\"medical_info\": \"consequatur\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/payments/initiate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "consequatur",
"blood_group": "consequatur",
"number_of_bags": 45,
"health_facility": "consequatur",
"medical_info": "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.
Profile
Update the authenticated user's profile
requires authentication
Example request:
curl --request PUT \
"http://localhost/elifesaver-app/public/api/v1/profile" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"password\": \"OP>@;4\",
\"phone\": \"consequatur\",
\"address\": \"consequatur\",
\"city\": \"consequatur\",
\"blood_group\": \"consequatur\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/profile"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"password": "OP>@;4",
"phone": "consequatur",
"address": "consequatur",
"city": "consequatur",
"blood_group": "consequatur"
};
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.
Register / update the device FCM token for push notifications
requires authentication
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/profile/device-token" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"registration_token\": \"consequatur\"
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/profile/device-token"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"registration_token": "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.
Update my coarse current location (town I'm visiting)
requires authentication
Consent-based and deliberately imprecise (city/subdivision only) so nearby
appeals follow the donor when travelling. Send shares_location:false to stop.
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/profile/location" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"current_subdivision_id\": 17,
\"current_city\": \"mqeopfuudtdsufvyvddqa\",
\"shares_location\": false
}"
const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/profile/location"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"current_subdivision_id": 17,
"current_city": "mqeopfuudtdsufvyvddqa",
"shares_location": false
};
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.
Webhooks
Server-to-server callbacks. No user auth — verified by a shared key instead.
CamPay payment IPN
Example request:
curl --request POST \
"http://localhost/elifesaver-app/public/api/v1/webhooks/campay" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/elifesaver-app/public/api/v1/webhooks/campay"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).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.