Skip to main content

Monthly Event Section

This section covers the API endpoints for managing monthly event sections in the admin panel.

List Monthly Event Sections

GET /v1/admin/monthly-event-sections

Returns a paginated list of all monthly event sections.

Query Parameters

ParameterTypeDescription
search_textstringSearch in subtitle, title, and tag
filter[active]booleanFilter by active status
filter[date_range]stringFilter by date range
filter[trashed]booleanInclude trashed sections
sortstringSort by field (default: -active)
per_pageintegerNumber of items per page. Defaults to 10

Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"current_page": 1,
"first_page_url": "http://testing-api.sumaya369.net/v1/admin/monthly-event-sections?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://testing-api.sumaya369.net/v1/admin/monthly-event-sections?page=1",
"links": [
{
"url": null,
"label": "« السابق",
"active": false
},
{
"url": "http://testing-api.sumaya369.net/v1/admin/monthly-event-sections?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "التالي »",
"active": false
}
],
"next_page_url": null,
"path": "http://testing-api.sumaya369.net/v1/admin/monthly-event-sections",
"per_page": 10,
"prev_page_url": null,
"to": 6,
"total": 6,
"monthlyEventSections": [
{
"id": "4bc60e90-fe59-11ef-ad2a-a570058d6755",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23647/1a085368c48e7540911adbcc9b47b0ba.jpg",
"title": "النجاح",
"subtitle": "jjjjjjjjj",
"tag": "🎯 نية الشهر: الثراء",
"starts_at": "2025-03-11 00:10:10",
"ends_at": "2025-03-31 06:29:30",
"active": true
},
{
"id": "835e5bc0-e916-11ef-bd7e-37b50e1c1106",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23517/%E2%80%94Pngtree%E2%80%94rose-icon-design-template_6261877.png",
"title": "إنه اليوم الجديد لنية جديدة بداخلها نوايا",
"subtitle": "النيّة تنوي وتجعلك نائيًا",
"tag": "نية الشهر: الفلوس",
"starts_at": "2025-02-09 10:20:01",
"ends_at": "2025-03-11 10:20:00",
"active": false
},
{
"id": "5a5092c0-f37f-11ef-9407-07ac85eb0932",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23636/monthly-image.png",
"title": "أنوي الثراء بأيسر الطرق وأفضل الاحتمالات",
"subtitle": "انطلق نحو تحقيق الوفرة والازدهار مع فعاليات هذا الشهر، المصممة خصيصًا لدعمك في تبني عقلية النجاح.",
"tag": "🎯 نية الشهر: الثراء",
"starts_at": "2025-02-09 10:20:01",
"ends_at": "2025-12-12 12:12:12",
"active": false
},
{
"id": "67597320-f37f-11ef-8194-d91ccf4984ac",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23630/Screenshot-from-2025-02-22-10-15-38.png",
"title": "إنه اليوم الجديد لنية جديدة بداخلها نوايا",
"subtitle": "النيّة تنوي وتجعلك نائيًا",
"tag": "نية الشهر: الفلوس",
"starts_at": "2025-02-09 10:20:01",
"ends_at": "2025-03-11 10:20:00",
"active": false
},
{
"id": "69c59970-f37f-11ef-96a4-6dd682351054",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23632/Screenshot-from-2025-02-22-10-15-38.png",
"title": "إنه اليوم الجديد لنية جديدة بداخلها نوايا",
"subtitle": "النيّة تنوي وتجعلك نائيًا",
"tag": "نية الشهر: الفلوس",
"starts_at": "2025-02-09 10:20:01",
"ends_at": "2025-03-11 10:20:00",
"active": false
},
{
"id": "01c9b910-f454-11ef-98ab-01008be8a164",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23634/600x400.jpg",
"title": "رمضان كريم",
"subtitle": "رمضان هو شهر عظيم عند المسلمين",
"tag": "الشهر الفضيل",
"starts_at": "2025-02-28 10:04:09",
"ends_at": "2025-03-07 10:05:20",
"active": false
}
]
},
"status_code": 200
}

Create Monthly Event Section

POST /v1/admin/monthly-event-sections

Create a new monthly event section.

Request Body

ParameterTypeDescriptionValidation Rules
titlestringSection titleRequired, 3-255 characters
subtitlestringSection subtitleOptional, min 3 characters
tagstringSection tagRequired, 3-80 characters
tag_colorstringTag color in hex formatRequired, hex color code
show_subtitlebooleanDisplay subtitleOptional
show_eventsbooleanDisplay eventsOptional
show_buttonbooleanDisplay buttonOptional
button_textstringButton textOptional, 3-48 characters
button_urlstringButton URLOptional, valid URL
eventsarrayArray of event namesOptional
events.*stringEvent nameRequired if events present, 3-80 characters
activebooleanActive statusOptional
starts_atstringStart date and timeRequired, format: Y-m-d H:i:s
ends_atstringEnd date and timeRequired, format: Y-m-d H:i:s
mobile_imagefileMobile version imageRequired, max: 10MB, types: jpeg,png,jpg
web_imagefileWeb version imageRequired, max: 10MB, types: jpeg,png,jpg

Response

{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"id": "cc850140-07ee-11f0-99f5-0b327054111a",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23668/WhatsApp-Image-2024-06-21-at-00.07.55_8df2bcbc.jpg",
"mobile_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23667/WhatsApp-Image-2024-06-21-at-00.07.55_8df2bcbc.jpg",
"title": "إنه اليوم الجديد لنية جديدة بداخلها نوايا",
"subtitle": "النيّة تنوي وتجعلك نائيًا",
"show_subtitle": true,
"tag": "نية الشهر: الفلوس",
"tag_color": "#000000",
"events": [
"إحصل على مذكرات تذكرك بالذاكرة",
"خلفيات حصريّة آخر موديل"
],
"show_events": true,
"button_text": "إنتقل لصفحة أحداث الشهر",
"button_url": "https://testing-storefront.sumaya369.net/",
"show_button": true,
"starts_at": "2025-02-09 10:20:01",
"ends_at": "2025-03-11 10:20:00",
"active": false
},
"status_code": 200
}

Get Monthly Event Section

GET /v1/admin/monthly-event-sections/{id}

Retrieve details of a specific monthly event section.

Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"id": "4bc60e90-fe59-11ef-ad2a-a570058d6755",
"web_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23647/1a085368c48e7540911adbcc9b47b0ba.jpg",
"mobile_image": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23646/2.jpg",
"title": "النجاح",
"subtitle": "jjjjjjjjj",
"show_subtitle": true,
"tag": "🎯 نية الشهر: الثراء",
"tag_color": "#79B919",
"events": [
"ooo"
],
"show_events": true,
"button_text": "ggg",
"button_url": "https://testing-storefront.sumaya369.net/events",
"show_button": true,
"starts_at": "2025-03-11 00:10:10",
"ends_at": "2025-03-31 06:29:30",
"active": true
},
"status_code": 200
}

Update Monthly Event Section

PATCH /v1/admin/monthly-event-sections/{id}

Update an existing monthly event section.

Request Body

ParameterTypeDescriptionValidation Rules
titlestringSection titleOptional, 3-255 characters
subtitlestringSection subtitleOptional, min 3 characters
tagstringSection tagOptional, 3-80 characters
tag_colorstringTag color in hex formatOptional, hex color code
show_subtitlebooleanDisplay subtitleOptional
show_eventsbooleanDisplay eventsOptional
show_buttonbooleanDisplay buttonOptional
button_textstringButton textOptional, 3-48 characters
button_urlstringButton URLOptional, valid URL
eventsarrayArray of event namesOptional
events.*stringEvent nameOptional, 3-80 characters
activebooleanActive statusOptional
starts_atstringStart date and timeOptional, format: Y-m-d H:i:s
ends_atstringEnd date and timeOptional, format: Y-m-d H:i:s
mobile_imagefileMobile version imageOptional, max: 10MB, types: jpeg,png,jpg
web_imagefileWeb version imageOptional, max: 10MB, types: jpeg,png,jpg

Response

{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"id": "7c745ee0-39bd-11ee-a2bc-bf1e549fbddb",
"title": "Updated Summer Events",
"subtitle": "Updated activities for summer",
"tag": "Summer 2025",
"tag_color": "#FF5733",
"show_subtitle": true,
"show_events": true,
"show_button": true,
"button_text": "Learn More",
"button_url": "https://example.com/summer-events",
"events": ["Updated Beach Party", "Summer Camp", "Water Festival"],
"active": true,
"starts_at": "2025-06-01 00:00:00",
"ends_at": "2025-08-31 23:59:59"
},
"status_code": 200
}

Delete Monthly Event Sections

DELETE /v1/admin/monthly-event-sections

Delete one or more monthly event sections.

Request Body

ParameterTypeDescriptionValidation Rules
idsarrayArray of section UUIDs to deleteRequired
ids.*stringUUID formatRequired

Response

{
"success": true,
"message": "تم حذف البيانات بنجاح.",
"data": null,
"status_code": 200
}

Notes

  • When a section is marked as active, any previously active section will be automatically deactivated
  • The section must be within its active period (between starts_at and ends_at) to be updated
  • Both mobile and web images are required when creating a new section
  • The events array is optional but if provided, each event name must be between 3 and 80 characters