Bundle
This section covers the API endpoints for managing bundles in the admin panel.
List Bundles
GET /v1/admin/bundles
Returns a paginated list of all bundles.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
search_text | string | Search bundles by name or ID |
filter[active] | boolean | Filter by active status |
filter[can_comment] | boolean | Filter by comment permission |
filter[is_purchasable] | boolean | Filter by purchasable status |
filter[trashed] | boolean | Include trashed bundles |
sort | string | Sort by field (prefix with - for descending) |
per_page | integer | Number of items per page. Defaults to 10 |
list | boolean | Return simplified list format |
Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"current_page": 1,
"first_page_url": "http://192.168.0.139:8080/v1/admin/bundles?filter%5Bactive%5D=true&page=1",
"from": 1,
"last_page": 2,
"last_page_url": "http://192.168.0.139:8080/v1/admin/bundles?filter%5Bactive%5D=true&page=2",
"links": [
{
"url": null,
"label": "« السابق",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/bundles?filter%5Bactive%5D=true&page=1",
"label": "1",
"active": true
},
{
"url": "http://192.168.0.139:8080/v1/admin/bundles?filter%5Bactive%5D=true&page=2",
"label": "2",
"active": false
},
{
"url": "http://192.168.0.139:8080/v1/admin/bundles?filter%5Bactive%5D=true&page=2",
"label": "التالي »",
"active": false
}
],
"next_page_url": "http://192.168.0.139:8080/v1/admin/bundles?filter%5Bactive%5D=true&page=2",
"path": "http://192.168.0.139:8080/v1/admin/bundles",
"per_page": 10,
"prev_page_url": null,
"to": 10,
"total": 13,
"bundles": [
{
"id": "0cd19d50-c7af-11ef-8625-19aeda79ef02",
"short_id": "0cd19d50",
"poster": "http://192.168.0.139:8080/storage/28573/4--باقة-الاستقلال-المادي-3مواد.jpg",
"name": "باقة الاستقلال المادي",
"price": "1253.74",
"subscriptions": 33,
"products_count": 3,
"comments_count": 1,
"views_count": 0,
"active": true
},
{
"id": "29c635a0-c7ae-11ef-80de-3d668c0c06ee",
"short_id": "29c635a0",
"poster": "http://192.168.0.139:8080/storage/28572/3--باقة-من-الصفر-للثراء-6مواد).jpg",
"name": "باقة من الصفر إلى الثراء",
"price": "2036.20",
"subscriptions": 39,
"products_count": 5,
"comments_count": 0,
"views_count": 0,
"active": true
},
{
"id": "a4f49ce0-c7ac-11ef-91b8-45aded535706",
"short_id": "a4f49ce0",
"poster": "http://192.168.0.139:8080/storage/28574/6--باقة-الاحتمال-الافضل-المواد2.jpg",
"name": "باقة الاحتمال الأفضل",
"price": "387.38",
"subscriptions": 33,
"products_count": 2,
"comments_count": 1,
"views_count": 0,
"active": true
},
{
"id": "bab2e300-c7ab-11ef-8ef6-55889112cf47",
"short_id": "bab2e300",
"poster": "http://192.168.0.139:8080/storage/28569/5--باقة-الحماية-المالية-المواد2.jpg",
"name": "باقة الحماية المالية",
"price": "612.90",
"subscriptions": 10,
"products_count": 2,
"comments_count": 0,
"views_count": 0,
"active": true
},
{
"id": "db5f9360-c7a9-11ef-8bfa-f9e56828d4da",
"short_id": "db5f9360",
"poster": "http://192.168.0.139:8080/storage/28575/7--باقة-البدايات-المواد2.jpg",
"name": "باقة البدايات",
"price": "567.00",
"subscriptions": 11,
"products_count": 2,
"comments_count": 0,
"views_count": 0,
"active": true
},
{
"id": "0df628f0-c7a8-11ef-978b-a9906faffaec",
"short_id": "0df628f0",
"poster": "http://192.168.0.139:8080/storage/28568/2--باقة-جديدة-للثراء-4مواد).jpg",
"name": "باقة المنتجات الجديدة لنية الثراء",
"price": "1586.21",
"subscriptions": 60,
"products_count": 4,
"comments_count": 0,
"views_count": 0,
"active": true
},
{
"id": "051dd0b0-b082-11ef-a315-f1dd5149d0a2",
"short_id": "051dd0b0",
"poster": "http://192.168.0.139:8080/storage/27472/4--باقة-القفزة-(4مواد).jpg",
"name": "باقة القفزة",
"price": "546.30",
"subscriptions": 356,
"products_count": 4,
"comments_count": 1,
"views_count": 0,
"active": true
},
{
"id": "2bc3f780-afc8-11ef-b158-e1b4689fdf3a",
"short_id": "2bc3f780",
"poster": "http://192.168.0.139:8080/storage/27420/2--باقة-المواد-الجديدة-لنية-الاستعداد(4مواد).jpg",
"name": "المواد الجديدة لنية الاستعداد للعام الجديد",
"price": "1018.83",
"subscriptions": 166,
"products_count": 5,
"comments_count": 3,
"views_count": 0,
"active": true
},
{
"id": "c05ca060-afc5-11ef-a434-31810c580d4a",
"short_id": "c05ca060",
"poster": "http://192.168.0.139:8080/storage/27417/3--باقة-معرفة-الذات-(4مواد).jpg",
"name": "باقة معرفة الذات",
"price": "903.10",
"subscriptions": 66,
"products_count": 4,
"comments_count": 0,
"views_count": 0,
"active": true
},
{
"id": "bbf65120-afc4-11ef-9156-3d14a65a5aea",
"short_id": "bbf65120",
"poster": "http://192.168.0.139:8080/storage/27415/5--(باقة-النهايات-2(-مادة.jpg",
"name": "باقة النهايات",
"price": "600.35",
"subscriptions": 47,
"products_count": 2,
"comments_count": 0,
"views_count": 0,
"active": true
}
]
},
"status_code": 200
}
Create Bundle
POST /v1/admin/bundles
Create a new bundle.
Request Body
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
name | string | Bundle name | Required, min: 3 characters |
price | number | Bundle price | Required, greater than 0 |
description | string | Bundle description | Required, min: 3 characters |
poster | file | Bundle poster image | Required, image, max: 1MB |
hide_price | boolean | Hide bundle price | Required |
can_comment | boolean | Allow comments | Required |
is_purchasable | boolean | Can be purchased | Required |
has_special_id | boolean | Has special ID | Optional |
has_certificate | boolean | Has certificate | Required |
has_summary | boolean | Has summary | Required |
active | boolean | Bundle active status | Required |
has_quantity | boolean | Has quantity limit | Optional |
quantity | number | Available quantity | Required if has_quantity is true, min: 0 |
certificate_price | number | Certificate price | Min: 0 |
summary_price | number | Summary price | Min: 0 |
category_ids | array | Category IDs | Optional |
category_ids.* | string | Category UUID | Must exist in categories table |
product_ids | array | Product IDs | Required |
product_ids.*.id | string | Product UUID | Required, distinct |
product_ids.*.type | string | Product type | Required, values: ebook, course |
tag_names | array | Tag names | Optional |
tag_names.* | string | Tag name | Min: 1 character |
Response
{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"id": "14598550-0594-11f0-81a2-1170a1c84ce4",
"poster": "/storage/29012/Screenshot-from-2025-02-24-13-39-01.png",
"name": "باقة العظمة 4",
"description": "سؤالٌ صعب سؤالٌ صعب",
"price": "2500",
"price_after_tax": 2875,
"summary_price": 0,
"certificate_price": 0,
"has_certificate": false,
"can_comment": true,
"hide_price": false,
"quantity": null,
"has_special_id": null,
"has_quantity": null,
"is_purchasable": true,
"has_summary": false,
"comments_count": 0,
"views_count": 0,
"active": true,
"categories": [
"e4e0bb10-db44-11ec-91f3-dff7c0899e8e"
],
"products": [
{
"id": "8cd64f80-26a4-11ed-bcac-63a9679507d2",
"poster": "http://192.168.0.139:8080/storage/24894/التأمل.png",
"name": "التأمل (102) - المكان والزمان",
"price": 35.65,
"videos_count": 2,
"type": "course",
"is_newly_added": true,
"product_id": null
},
{
"id": "684b5220-26c3-11ed-930a-1f9c8d17efe2",
"poster": "http://192.168.0.139:8080/storage/24883/العزلة.png",
"name": "العزلة",
"price": 520,
"videos_count": 11,
"type": "course",
"is_newly_added": true,
"product_id": null
}
],
"tag_names": [
"الصدمة",
"كلام"
]
},
"status_code": 200
}
Get Bundle
GET /v1/admin/bundles/{id}
Retrieve details of a specific bundle.
Response
{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"id": "0cd19d50-c7af-11ef-8625-19aeda79ef02",
"poster": "http://192.168.0.139:8080/storage/28573/4--باقة-الاستقلال-المادي-3مواد.jpg",
"name": "باقة الاستقلال المادي",
"description": "<h3 class=\"ql-align-right\"><strong style=\"color: rgb(61, 20, 102);\">باقة الاستقلال المادي</strong></h3><h3><br></h3><h3><span style=\"color: rgb(61, 20, 102);\">1) الهوية المالية</span></h3><p><br></p><p>ماهي الهوية المالية ؟ وكيف تكتشف هويتك المالية ؟ </p><p>33 سؤال يساعدك على اكتشاف هويتك المالية .. وبناء على تجربة د.سمية الناصر ستخبرك عن نتيجتها والحلول التي قررت ان تعملها لتطوير هويتها المالية .</p><p><br></p><p><strong>مرفق المادة : اختبار الهوية المالية </strong></p><h3><br></h3><h3><span style=\"color: rgb(61, 20, 102);\">2) مصادر الثراء</span></h3><p><strong>المحاور : </strong></p><ul><li>المصدر الأول.</li><li>المصدر الثاني.</li><li>المصدر الثالث.</li><li>المصدر الرابع.</li><li>المصدر الخامس.</li><li>المصدر السادس.</li><li>المصدر السابع.</li><li>المصدر الثامن.</li></ul><p><br></p><h3 class=\"ql-align-right\"><span style=\"color: rgb(61, 20, 102);\">3) ابتلع أموالك</span></h3><p class=\"ql-align-right\">لتبدأ في لعبة المال</p><p class=\"ql-align-right\"><br></p><p class=\"ql-align-right\">11 لعبة للمال لتبدأ في برنامج استحقاق الثراء لتضاعف متعتك في أثناء سعيك لتحقيق الثراء، وتتعرف على مشاعر وسلوكيات وتطبيقات تدعم تجلي نية الثراء في حياتك.</p><p class=\"ql-align-right\"><br></p><p class=\"ql-align-right\"><strong>المحاور:</strong></p><ul><li class=\"ql-align-right\">1- <span style=\"background-color: rgb(246, 245, 247);\">مقدمة</span></li><li class=\"ql-align-right\">2- 11 <span style=\"background-color: rgb(246, 245, 247);\">لعبة للمال</span></li><li class=\"ql-align-right\">3- <span style=\"background-color: rgb(246, 245, 247);\">مضاعفة المتعة</span></li><li class=\"ql-align-right\">4- <span style=\"background-color: rgb(246, 245, 247);\">نوايا الوعي الجمعي</span></li><li class=\"ql-align-right\">5- <span style=\"background-color: rgb(246, 245, 247);\">تطبيقات عملية لاستحقاق الثراء</span></li></ul><h3 class=\"ql-align-right\"><br></h3><p class=\"ql-align-right\"><br></p><p>*هذه الباقة مناسبة للحامل</p><p>*هذه الباقة مناسبة للمرضع</p><p><br></p><p><br></p><hr><p><br></p><p class=\"ql-align-right\"><strong style=\"color: black;\">بشراءك أي منتج تفيد أنك قد قرأت ووافقت على </strong><a href=\"https://sumaya369.net/privacy-policy\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"background-color: rgb(246, 245, 247);\"><strong>الشروط والأحكام</strong></a></p><p class=\"ql-align-right\"><strong>للمساعدة : </strong><a href=\"https://sumaya369.net/FAQ\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"background-color: rgb(246, 245, 247);\"><strong>تواصل معنا</strong></a></p><p class=\"ql-align-right\"><br></p><p class=\"ql-align-right\"><br></p>",
"price": "1253.74",
"price_after_tax": 1441.801,
"summary_price": 0,
"certificate_price": 0,
"has_certificate": false,
"can_comment": true,
"hide_price": false,
"quantity": 0,
"has_special_id": false,
"has_quantity": false,
"is_purchasable": true,
"has_summary": false,
"comments_count": 1,
"views_count": 0,
"active": true,
"categories": [
"0c2a59f0-ec6e-11ec-8108-6d5b206372c7",
"265f31ad-1b4e-355f-844a-af92d88de7b0",
"e4e0bb10-db44-11ec-91f3-dff7c0899e8e",
"eb8fec80-b43f-11ec-8195-abf33b22a6c8",
"13abeb60-9d51-11ed-84f2-8977484be6d3",
"ac81c0f0-a5e0-11ed-9aae-a54c23a59df0"
],
"products": [
{
"id": "8a620ad0-a5a2-11ee-8c63-07e9c26c60de",
"poster": "http://192.168.0.139:8080/storage/20786/مصادر-الثراء.png",
"name": "مصادر الثراء",
"price": 333,
"videos_count": 9,
"type": "course",
"is_newly_added": false,
"product_id": null
},
{
"id": "638631b0-84f1-11ed-a786-5ba26e1aea87",
"poster": "http://192.168.0.139:8080/storage/20782/الهوية-المالية.png",
"name": "الهوية المالية",
"price": 190.44,
"videos_count": 2,
"type": "course",
"is_newly_added": false,
"product_id": null
},
{
"id": "135ebb10-c76b-11ef-94c7-610b2c08a5d6",
"poster": "http://192.168.0.139:8080/storage/28545/ابتلع-اموالك.jpg",
"name": "ابتلع أموالك",
"price": 869.6,
"videos_count": 14,
"type": "course",
"is_newly_added": false,
"product_id": null
}
],
"tag_names": []
},
"status_code": 200
}
Update Bundle
PATCH /v1/admin/bundles/{id}
Update an existing bundle.
Request Body
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
name | string | Bundle name | Min: 3 characters |
price | number | Bundle price | Greater than 0 |
description | string | Bundle description | Min: 3 characters |
poster | file | Bundle poster image | Image, max: 1MB |
hide_price | boolean | Hide bundle price | Optional |
can_comment | boolean | Allow comments | Optional |
is_purchasable | boolean | Can be purchased | Optional |
has_special_id | boolean | Has special ID | Optional |
has_certificate | boolean | Has certificate | Optional |
has_summary | boolean | Has summary | Optional |
active | boolean | Bundle active status | Optional |
has_quantity | boolean | Has quantity limit | Optional |
quantity | number | Available quantity | Required if has_quantity is true, min: 0 |
certificate_price | number | Certificate price | Min: 0 |
summary_price | number | Summary price | Min: 0 |
category_ids | array | Category IDs | Optional |
category_ids.* | string | Category UUID | Must exist in categories table |
product_ids | array | Product IDs | Optional |
product_ids.*.id | string | Product UUID | Required with product_ids, distinct |
product_ids.*.type | string | Product type | Required with product_ids, values: ebook, course |
tag_names | array | Tag names | Optional |
tag_names.* | string | Tag name | Min: 1 character |
Response
{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"id": "14598550-0594-11f0-81a2-1170a1c84ce4",
"poster": "/storage/29012/Screenshot-from-2025-02-24-13-39-01.png",
"name": "باقة العظمة 4",
"description": "سؤالٌ صعب سؤالٌ صعب",
"price": "2500.00",
"price_after_tax": 2875,
"summary_price": 0,
"certificate_price": 0,
"has_certificate": false,
"can_comment": true,
"hide_price": false,
"quantity": 0,
"has_special_id": false,
"has_quantity": false,
"is_purchasable": true,
"has_summary": false,
"comments_count": 0,
"views_count": 0,
"active": true,
"categories": [
"e4e0bb10-db44-11ec-91f3-dff7c0899e8e"
],
"products": [
{
"id": "8cd64f80-26a4-11ed-bcac-63a9679507d2",
"poster": "http://192.168.0.139:8080/storage/24894/التأمل.png",
"name": "التأمل (102) - المكان والزمان",
"price": 35.65,
"videos_count": 2,
"type": "course",
"is_newly_added": true,
"product_id": null
},
{
"id": "684b5220-26c3-11ed-930a-1f9c8d17efe2",
"poster": "http://192.168.0.139:8080/storage/24883/العزلة.png",
"name": "العزلة",
"price": 520,
"videos_count": 11,
"type": "course",
"is_newly_added": true,
"product_id": null
}
],
"tag_names": [
"الصدمة",
"كلام"
]
},
"status_code": 200
}
Delete Bundles
DELETE /v1/admin/bundles
Delete one or more bundles.
Request Body
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
ids | array | Array of bundle IDs to delete | Required |
ids.* | string | Bundle UUID | Required, UUID format |
confirm_deletion | boolean | Confirm permanent deletion | Optional |
Response
{
"success": true,
"message": "تم حذف البيانات بنجاح.",
"data": null,
"status_code": 200
}
Bundle Statistics
GET /v1/admin/statistics/bundles
Returns statistics about bundles in the system.
Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"bundles_count": "13/39",
"total_orders": "5.8K",
"most_viewed_bundle": {
"poster": "http://192.168.0.139:8080/storage/28573/4--باقة-الاستقلال-المادي-3مواد.jpg",
"name": "باقة الاستقلال المادي"
},
"most_profitable_bundles": [
{
"id": "2b091e90-40c6-11ed-b4bd-8d988b91cc4e",
"name": "باقة التنظيفات العميقة",
"profit": "3.1M"
},
{
"id": "2af497e0-ba19-11ec-960a-093aa65c415e",
"name": "باقة تنظيف المشاعر الأساسية",
"profit": "1.8M"
},
{
"id": "29b43300-86a5-11ed-b6a1-55c32e318e68",
"name": "باقة الثراء",
"profit": "692.8K"
},
{
"id": "c69a84a0-13ed-11ee-8bfa-7dbff866ec99",
"name": "باقة الأنوثة",
"profit": "582.2K"
}
]
},
"status_code": 200
}
Notes
- Bundle names and descriptions must be at least 3 characters long
- Poster images must be between 25KB and 1MB in size
- When
has_certificateis false, certificate_price will be set to 0 - When
has_summaryis false, summary_price will be set to 0 - Bundles with existing orders cannot be permanently deleted
- The statistics endpoint shows active/total bundles ratio and most profitable bundles
- Bundle duplication is supported through a separate endpoint
- Results can be sorted by name, price, active status, subscriptions count, and products count