Introduction
API Documentation for Family/Tribe Management Application
This documentation provides all the information you need to work with the Family Tribe App API.
The API supports Arabic and English localization via the `Accept-Language` header.
<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_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Authenticate via the POST /api/v1/auth/login endpoint to receive a Bearer token. Include it in the Authorization header as Bearer {token}.
Authentication
APIs for user authentication and registration.
Login
Authenticate user with phone number or national ID.
Example request:
curl --request POST \
"http://algfari.test/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"login\": \"0551234567\",
\"password\": \"secret123\"
}"
const url = new URL(
"http://algfari.test/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"login": "0551234567",
"password": "secret123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, success):
{
"user": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "محمد القحطاني",
"phone_number": "0551234567",
"national_id": "1234567890",
"email": "mohammed@example.com",
"city": "الرياض",
"region": "منطقة الرياض",
"gender": "male",
"role": "member",
"status": "active",
"is_featured": false,
"profile_image": null
},
"token": "1|a2b3c4d5e6f7g8h9i0jklmnopqrstuvwxyz"
}
Example response (401, invalid credentials):
{
"message": "بيانات الدخول غير صحيحة"
}
Example response (403, inactive account):
{
"message": "الحساب غير مفعل"
}
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 OTP
Send a one-time password to the given phone number.
Example request:
curl --request POST \
"http://algfari.test/api/v1/auth/send-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"phone_number\": \"0551234567\",
\"purpose\": \"register\"
}"
const url = new URL(
"http://algfari.test/api/v1/auth/send-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"phone_number": "0551234567",
"purpose": "register"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "تم إرسال رمز التحقق"
}
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.
Verify OTP
Verify the OTP code sent to the phone number.
Example request:
curl --request POST \
"http://algfari.test/api/v1/auth/verify-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"phone_number\": \"0551234567\",
\"code\": \"123456\",
\"purpose\": \"architecto\"
}"
const url = new URL(
"http://algfari.test/api/v1/auth/verify-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"phone_number": "0551234567",
"code": "123456",
"purpose": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "تم التحقق بنجاح",
"verified": true
}
Example response (422):
{
"message": "رمز التحقق غير صالح"
}
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 Request
Submit a request to join the family/tribe.
Example request:
curl --request POST \
"http://algfari.test/api/v1/auth/join-request" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--form "full_name=محمد أحمد القحطاني"\
--form "phone_number=0551234567"\
--form "national_id=1234567890"\
--form "email=mohammed@example.com"\
--form "pending_family_name=architecto"\
--form "city=الرياض"\
--form "region=منطقة الرياض"\
--form "password=secret123"\
--form "password_confirmation=secret123"\
--form "profile_image=@C:\Users\hp\AppData\Local\Temp\php45E.tmp" const url = new URL(
"http://algfari.test/api/v1/auth/join-request"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
"Accept-Language": "ar",
};
const body = new FormData();
body.append('full_name', 'محمد أحمد القحطاني');
body.append('phone_number', '0551234567');
body.append('national_id', '1234567890');
body.append('email', 'mohammed@example.com');
body.append('pending_family_name', 'architecto');
body.append('city', 'الرياض');
body.append('region', 'منطقة الرياض');
body.append('password', 'secret123');
body.append('password_confirmation', 'secret123');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (201, success):
{
"message": "تم تقديم طلب الانضمام بنجاح",
"join_request": {
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"full_name": "محمد أحمد القحطاني",
"phone_number": "0551234567",
"national_id": "1234567890",
"email": "mohammed@example.com",
"pending_family_name": "الجربوع",
"city": "الرياض",
"region": "منطقة الرياض",
"status": "pending",
"created_at": "2026-04-13T10:00:00.000000Z"
}
}
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.
Reset Password
Step 3 of password recovery (UI): set a new password after OTP was verified in
verify-otp with purpose reset. Does not accept the code again.
Example request:
curl --request POST \
"http://algfari.test/api/v1/auth/reset-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"phone_number\": \"0551234567\",
\"password\": \"newsecret123\",
\"password_confirmation\": \"newsecret123\"
}"
const url = new URL(
"http://algfari.test/api/v1/auth/reset-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"phone_number": "0551234567",
"password": "newsecret123",
"password_confirmation": "newsecret123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "تم إعادة تعيين كلمة المرور بنجاح"
}
Example response (404):
{
"message": "المستخدم غير موجود"
}
Example response (422):
{
"message": "..."
}
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.
Change Password
requires authentication
Change the authenticated user's password.
Example request:
curl --request PUT \
"http://algfari.test/api/v1/auth/change-password" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"current_password\": \"oldsecret123\",
\"password\": \"newsecret123\",
\"password_confirmation\": \"newsecret123\"
}"
const url = new URL(
"http://algfari.test/api/v1/auth/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"current_password": "oldsecret123",
"password": "newsecret123",
"password_confirmation": "newsecret123"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "تم تغيير كلمة المرور بنجاح"
}
Example response (422):
{
"message": "كلمة المرور الحالية غير صحيحة"
}
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
Revoke the current access token.
Example request:
curl --request POST \
"http://algfari.test/api/v1/auth/logout" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "تم تسجيل الخروج بنجاح"
}
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.
Members
APIs for managing family/tribe members.
List Members
requires authentication
Get a paginated list of active members. Supports search and filtering.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/members?search=%D9%85%D8%AD%D9%85%D8%AF&family=architecto&family_id=16&city=%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6&gender=male&is_featured=1&per_page=15" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/members"
);
const params = {
"search": "محمد",
"family": "architecto",
"family_id": "16",
"city": "الرياض",
"gender": "male",
"is_featured": "1",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": [
{
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "محمد القحطاني",
"phone_number": "0551234567",
"national_id": "1234567890",
"email": "mohammed@example.com",
"city": "الرياض",
"region": "منطقة الرياض",
"bio": "مهندس برمجيات",
"gender": "male",
"role": "member",
"status": "active",
"is_featured": false,
"profile_image": null,
"created_at": "2026-04-01T10:00:00.000000Z"
}
],
"links": {
"first": "http://algfari.test/api/v1/members?page=1",
"last": "http://algfari.test/api/v1/members?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 1
}
}
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.
Member Details
requires authentication
Get detailed information about a specific member.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/members/1" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/members/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "محمد القحطاني",
"phone_number": "0551234567",
"national_id": "1234567890",
"email": "mohammed@example.com",
"city": "الرياض",
"region": "منطقة الرياض",
"bio": "مهندس برمجيات",
"gender": "male",
"role": "member",
"status": "active",
"is_featured": false,
"social_links": {
"twitter": "https://twitter.com/mohammed"
},
"profile_image": "http://algfari.test/storage/media/1/profile.jpg",
"created_at": "2026-04-01T10:00:00.000000Z"
}
}
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 Member
requires authentication
Update a member's profile information.
Example request:
curl --request PUT \
"http://algfari.test/api/v1/members/1" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--form "full_name=محمد أحمد"\
--form "email=mohammed@example.com"\
--form "family_id=16"\
--form "pending_family_name=architecto"\
--form "workplace=g"\
--form "current_job=z"\
--form "city=الرياض"\
--form "region=منطقة الرياض"\
--form "bio=مطور برمجيات"\
--form "profile_image=@C:\Users\hp\AppData\Local\Temp\php49E.tmp" const url = new URL(
"http://algfari.test/api/v1/members/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
"Accept-Language": "ar",
};
const body = new FormData();
body.append('full_name', 'محمد أحمد');
body.append('email', 'mohammed@example.com');
body.append('family_id', '16');
body.append('pending_family_name', 'architecto');
body.append('workplace', 'g');
body.append('current_job', 'z');
body.append('city', 'الرياض');
body.append('region', 'منطقة الرياض');
body.append('bio', 'مطور برمجيات');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Example response (200, success):
{
"message": "تم التحديث بنجاح",
"user": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "محمد أحمد",
"phone_number": "0551234567",
"email": "mohammed@example.com",
"city": "الرياض",
"region": "منطقة الرياض",
"bio": "مطور برمجيات",
"gender": "male",
"role": "member",
"status": "active",
"is_featured": false
}
}
Example response (422, validation error):
{
"message": "The given data was invalid.",
"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.
Member Card
requires authentication
Get the membership card information for a member.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/members/1/card" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/members/1/card"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "محمد القحطاني",
"phone_number": "0551234567",
"national_id": "1234567890",
"city": "الرياض",
"region": "منطقة الرياض",
"gender": "male",
"role": "member",
"profile_image": "http://algfari.test/storage/media/1/profile.jpg"
}
}
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.
News
APIs for browsing family/tribe news.
List News
requires authentication
Get a paginated list of published news articles. Pinned articles appear first.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/news?category=family&search=%D8%A7%D8%AC%D8%AA%D9%85%D8%A7%D8%B9&per_page=15" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/news"
);
const params = {
"category": "family",
"search": "اجتماع",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": [
{
"id": "b2c3d4e5-6789-0abc-def1-234567890abc",
"title": "اجتماع مجلس العائلة السنوي",
"summary": "ملخص عن الاجتماع السنوي للعائلة",
"content": "تفاصيل الخبر الكاملة هنا...",
"category": "family",
"is_pinned": true,
"views_count": 150,
"published_at": "2026-04-10T08:00:00.000000Z",
"author": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "أحمد المشرف"
},
"cover_image": "http://algfari.test/storage/media/5/cover.jpg",
"created_at": "2026-04-10T08:00:00.000000Z"
}
],
"links": {
"first": "http://algfari.test/api/v1/news?page=1",
"last": "http://algfari.test/api/v1/news?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 1
}
}
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.
News Details
requires authentication
Get details of a specific news article. Increments the view count.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/news/1" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/news/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": {
"id": "b2c3d4e5-6789-0abc-def1-234567890abc",
"title": "اجتماع مجلس العائلة السنوي",
"summary": "ملخص عن الاجتماع السنوي للعائلة",
"content": "نص الخبر الكامل مع جميع التفاصيل والمعلومات المهمة عن الاجتماع السنوي لمجلس العائلة.",
"category": "family",
"is_pinned": true,
"views_count": 43,
"published_at": "2026-04-10T08:00:00.000000Z",
"author": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "أحمد المشرف"
},
"cover_image": "http://algfari.test/storage/media/5/cover.jpg",
"gallery": [
"http://algfari.test/storage/media/6/photo1.jpg",
"http://algfari.test/storage/media/7/photo2.jpg"
],
"created_at": "2026-04-10T08:00:00.000000Z"
}
}
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.
Events
APIs for browsing events and managing RSVPs.
List Events
requires authentication
Get a paginated list of active events.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/events?event_type=wedding&upcoming=1&per_page=15" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/events"
);
const params = {
"event_type": "wedding",
"upcoming": "1",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": [
{
"id": "c3d4e5f6-7890-1abc-def2-345678901bcd",
"title": "حفل زفاف آل محمد",
"description": "حفل زفاف الأخ محمد بن عبدالله، يسعدنا دعوتكم للحضور.",
"event_type": "wedding",
"event_date": "2026-05-01T18:00:00.000000Z",
"end_date": "2026-05-01T23:00:00.000000Z",
"location_name": "قاعة الأمير سلطان - الرياض",
"location_lat": "24.71370000",
"location_lng": "46.67530000",
"is_active": true,
"attendees_count": 45,
"creator": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "عبدالله القحطاني"
},
"cover_image": "http://algfari.test/storage/media/10/event-cover.jpg",
"created_at": "2026-04-05T12:00:00.000000Z"
}
],
"links": {
"first": "http://algfari.test/api/v1/events?page=1",
"last": "http://algfari.test/api/v1/events?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 1
}
}
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.
Event Details
requires authentication
Get details of a specific event with attendee count.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/events/1" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/events/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": {
"id": "c3d4e5f6-7890-1abc-def2-345678901bcd",
"title": "حفل زفاف آل محمد",
"description": "حفل زفاف الأخ محمد بن عبدالله، يسعدنا دعوتكم للحضور والمشاركة في هذه المناسبة السعيدة.",
"event_type": "wedding",
"event_date": "2026-05-01T18:00:00.000000Z",
"end_date": "2026-05-01T23:00:00.000000Z",
"location_name": "قاعة الأمير سلطان - الرياض",
"location_lat": "24.71370000",
"location_lng": "46.67530000",
"is_active": true,
"attendees_count": 45,
"creator": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "عبدالله القحطاني"
},
"cover_image": "http://algfari.test/storage/media/10/event-cover.jpg",
"created_at": "2026-04-05T12:00:00.000000Z"
}
}
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.
RSVP to Event
requires authentication
Submit or update your RSVP status for an event.
Example request:
curl --request POST \
"http://algfari.test/api/v1/events/1/rsvp" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"status\": \"going\"
}"
const url = new URL(
"http://algfari.test/api/v1/events/1/rsvp"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"status": "going"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "تم تحديث الحضور"
}
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.
Offers
APIs for browsing member offers and services.
List Offers
requires authentication
Get a paginated list of active, non-expired offers.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/offers?category=commercial&per_page=15" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/offers"
);
const params = {
"category": "commercial",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": [
{
"id": "d4e5f6a7-8901-2bcd-ef34-567890123cde",
"title": "خدمة صيانة المكيفات",
"description": "صيانة وتركيب جميع أنواع المكيفات بأسعار مخفضة لأبناء القبيلة",
"category": "contractor",
"service_address": "الرياض - حي النسيم",
"contact_phone": "0559876543",
"contact_whatsapp": "0559876543",
"is_active": true,
"expires_at": "2026-06-01T00:00:00.000000Z",
"offered_by": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "خالد العتيبي"
},
"offer_image": "http://algfari.test/storage/media/15/offer.jpg",
"created_at": "2026-04-01T10:00:00.000000Z"
}
],
"links": {
"first": "http://algfari.test/api/v1/offers?page=1",
"last": "http://algfari.test/api/v1/offers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 1
}
}
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.
Offer Details
requires authentication
Get details of a specific offer.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/offers/1" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/offers/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": {
"id": "d4e5f6a7-8901-2bcd-ef34-567890123cde",
"title": "خدمة صيانة المكيفات",
"description": "صيانة وتركيب جميع أنواع المكيفات بأسعار مخفضة لأبناء القبيلة. نوفر خدمة منزلية.",
"category": "contractor",
"service_address": "الرياض - حي النسيم",
"contact_phone": "0559876543",
"contact_whatsapp": "0559876543",
"is_active": true,
"expires_at": "2026-06-01T00:00:00.000000Z",
"offered_by": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "خالد العتيبي"
},
"offer_image": "http://algfari.test/storage/media/15/offer.jpg",
"gallery": [
"http://algfari.test/storage/media/16/gallery1.jpg",
"http://algfari.test/storage/media/17/gallery2.jpg"
],
"created_at": "2026-04-01T10:00:00.000000Z"
}
}
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.
Family Fund
APIs for viewing family fund transactions and summary.
List Transactions
requires authentication
Get a paginated list of approved fund transactions.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/fund?type=donation&per_page=15" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/fund"
);
const params = {
"type": "donation",
"per_page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": [
{
"id": "e5f6a7b8-9012-3cde-f456-789012345def",
"amount": "500.00",
"transaction_type": "donation",
"description": "تبرع شهري لصندوق العائلة",
"status": "approved",
"approved_at": "2026-04-10T12:00:00.000000Z",
"contributor": {
"id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
"full_name": "سعد القحطاني"
},
"receipt": "http://algfari.test/storage/media/20/receipt.pdf",
"created_at": "2026-04-09T10:00:00.000000Z"
},
{
"id": "f6a7b8c9-0123-4def-a567-890123456ef0",
"amount": "200.00",
"transaction_type": "expense",
"description": "مصاريف إصلاح مجلس العائلة",
"status": "approved",
"approved_at": "2026-04-11T14:00:00.000000Z",
"contributor": null,
"receipt": null,
"created_at": "2026-04-11T09:00:00.000000Z"
}
],
"links": {
"first": "http://algfari.test/api/v1/fund?page=1",
"last": "http://algfari.test/api/v1/fund?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 2
}
}
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.
Fund Summary
requires authentication
Get the family fund financial summary (total donations, expenses, and balance).
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/fund/summary" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/fund/summary"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"total_donations": 15000,
"total_expenses": 5000,
"balance": 10000,
"transactions_count": 42
}
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.
Suggestions
APIs for submitting member suggestions.
Submit Suggestion
requires authentication
Submit a new suggestion to the administration.
Example request:
curl --request POST \
"http://algfari.test/api/v1/suggestions" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"title\": {
\"ar\": \"اقتراح جديد\",
\"en\": \"New suggestion\"
},
\"description\": {
\"ar\": \"وصف الاقتراح\",
\"en\": \"Suggestion description\"
}
}"
const url = new URL(
"http://algfari.test/api/v1/suggestions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"title": {
"ar": "اقتراح جديد",
"en": "New suggestion"
},
"description": {
"ar": "وصف الاقتراح",
"en": "Suggestion description"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, success):
{
"message": "تم تقديم الاقتراح بنجاح",
"suggestion": {
"id": 1,
"title": {
"ar": "اقتراح جديد",
"en": "New suggestion"
},
"description": {
"ar": "وصف الاقتراح",
"en": "Suggestion description"
},
"submitted_by": 1,
"status": "pending",
"created_at": "2026-04-13T10:00:00.000000Z",
"updated_at": "2026-04-13T10:00:00.000000Z"
}
}
Example response (422, validation error):
{
"message": "The given data was invalid.",
"errors": {
"title": [
"The title field is required."
]
}
}
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
APIs for managing user notifications.
List Notifications
requires authentication
Get a paginated list of the authenticated user's notifications.
Example request:
curl --request GET \
--get "http://algfari.test/api/v1/notifications" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/notifications"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
{
"data": [
{
"id": "b8c9d0e1-2345-6f78-a901-234567890bcd",
"title": "خبر جديد: اجتماع مجلس العائلة",
"body": "تم نشر خبر جديد بعنوان اجتماع مجلس العائلة السنوي",
"type": "news",
"is_read": false,
"created_at": "2026-04-13T10:00:00.000000Z"
},
{
"id": "c9d0e1f2-3456-7a89-b012-345678901cde",
"title": "فعالية جديدة: حفل زفاف",
"body": "تم إنشاء فعالية جديدة بعنوان حفل زفاف آل محمد",
"type": "event",
"is_read": true,
"created_at": "2026-04-12T14:30:00.000000Z"
}
],
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 2
}
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 Notification as Read
requires authentication
Mark a single notification as read.
Example request:
curl --request PUT \
"http://algfari.test/api/v1/notifications/9a8b7c6d-1234-5678-abcd-ef0123456789/read" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/notifications/9a8b7c6d-1234-5678-abcd-ef0123456789/read"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"message": "تم قراءة الإشعار"
}
Example response (404):
{
"message": "غير موجود"
}
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 Notifications as Read
requires authentication
Mark all unread notifications as read for the authenticated user.
Example request:
curl --request PUT \
"http://algfari.test/api/v1/notifications/read-all" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar"const url = new URL(
"http://algfari.test/api/v1/notifications/read-all"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"message": "تم قراءة جميع الإشعارات"
}
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.
Devices
Register Device
requires authentication
Register a device for push notifications.
Example request:
curl --request POST \
"http://algfari.test/api/v1/devices" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Accept-Language: ar" \
--data "{
\"device_token\": \"fcm-token-abc123xyz\",
\"platform\": \"android\"
}"
const url = new URL(
"http://algfari.test/api/v1/devices"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"Accept-Language": "ar",
};
let body = {
"device_token": "fcm-token-abc123xyz",
"platform": "android"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "تم تسجيل الجهاز بنجاح"
}
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.