Monthly Events
The Monthly Events API provides access to monthly event pages and their associated notes within the Sumaya369 platform. This API enables users to view monthly event content and download related notes.
List Monthly Events
Retrieve the monthly events page content. This endpoint returns the current monthly event information along with any associated media and content.
Endpoint
- Method: GET
- URL:
/v1/customer/monthly-events
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
Success Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"title": "تطوير الجسد المشاعري",
"description": "أنوي تطوير جسدي المشاعري بأيسر الطرق.",
"key": "monthly-events",
"movie": {
"title": "PENGUIN BLOOM",
"description": "@NetflixMENA",
"poster": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23155/nayomi-beauty-salon-s-en-ar.jpg",
"note_file": "https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/22255/%D9%85%D9%81%D9%83%D8%B1%D8%A9-%D8%A7%D9%84%D8%AD%D8%B8-.pdf"
},
"backgrounds": [
"https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/6294/Fi6yI87UAAA6NKH.jpeg"
],
"views": 2272,
"views_unique": 871,
"event": "monthly-events"
},
"status_code": 200
}
Download Monthly Note
Download the PDF note associated with the current monthly event. This endpoint streams the PDF file for download.
Endpoint
- Method: GET
- URL:
/v1/customer/monthly-events/download-note
Request Headers
| Header | Value | Required |
|---|---|---|
| Accept | application/json | Yes |
Response
The endpoint returns a streamed PDF file with the following headers:
Content-Type: application/pdf
Content-Disposition: attachment; filename="month-event-media-note{date}.pdf"
Error Response
Note Not Found (404)
{
"success": false,
"message": "لم يتم العثور على السجل",
"data": [],
"status_code": 404
}
Implementation Flow
-
Monthly Events Page
- Application sends request to
/v1/customer/monthly-events - Display monthly event content and media
- Show download note button if available
- Application sends request to
-
Note Download
- User clicks download note button
- Application sends request to
/v1/customer/monthly-events/download-note - Browser handles PDF file download
Key Considerations
- Server-side caching is implemented for unauthorized users
- Views are tracked using the CustomVisitor implementation
- PDF downloads are streamed to optimize memory usage
- Action views are recorded for analytics purposes