Groups Application Request
This guide explains how to interact with the Groups Application Request API in the Sumaya369 web application. The API provides endpoints for submitting and managing group application requests for different types of users (students, social security beneficiaries, pupils, and those with special needs).
List Groups Application Requests
Retrieve a list of groups application requests for the authenticated customer.
Endpoint
- Method: GET
- URL:
/v1/customer/groups-application-requests
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Success Response
{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"id": "d32bbd80-f312-11ef-9a74-87d68ef96a4c",
"type": "pupils",
"status": "accept",
"school_name": "جامعة الاحقاف",
"school_enrollment_year": "2000-01-11",
"school_expected_graduation_year": "2001-01-11",
"created_at": "2025-02-25 03:52:44",
"school_certificate_files": [
"https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23622/360_F_421755953_LitQ8sAhxJ88bFPVjYTjKI3FBhGqrEP2.jpg"
],
"notes": [],
"can_modified": false,
"is_employed": false,
"is_agree_to_terms": true
},
"status_code": 200
}
Submit Groups Application Request
Submit a new groups application request with the required documents based on the type of request.
Endpoint
- Method: POST
- URL:
/v1/customer/groups-application-requests
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | multipart/form-data | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
| Parameter | Type | Description | Required |
|---|---|---|---|
| type | string | Type of application (student, social_security, pupils, special_needs) | Yes |
| meta | object | Additional metadata for the request | Yes |
Type-specific Required Files
Student Type:
- university_card_files[]
- acadimec_regsteration_files[] (optional)
- letter_from_university_files[] (optional)
Social Security Type:
- warranty_certificate_files[]
- proof_kinship_files[] (optional)
Pupils Type:
- school_certificate_files[]
Special Needs Type:
- identification_files[]
- medical_report_files[]
Success Response
{
"success": true,
"message": "تم حفظ البيانات بنجاح.",
"data": {
"id": "d32bbd80-f312-11ef-9a74-87d68ef96a4c",
"type": "pupils",
"status": "pending",
"school_name": "جامعة الاحقاف",
"school_enrollment_year": "2000-01-11",
"school_expected_graduation_year": "2001-01-11",
"created_at": "2025-02-25 03:52:44",
"school_certificate_files": [
"https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23622/360_F_421755953_LitQ8sAhxJ88bFPVjYTjKI3FBhGqrEP2.jpg"
],
"notes": [],
"can_modified": true,
"is_employed": false,
"is_agree_to_terms": true
},
"status_code": 200
}
Update Groups Application Request
Update an existing groups application request. Note that updates are only allowed within 3 days of the last update for pending requests.
Endpoint
- Method: PUT
- URL:
/v1/customer/groups-application-requests/{id}
Request Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | multipart/form-data | Yes |
| Accept | application/json | Yes |
| Authorization | Bearer token | Yes |
Request Body
Same parameters as the submit endpoint, plus:
| Parameter | Type | Description | Required |
|---|---|---|---|
| deleted_university_card_files[] | array | URLs of files to remove | No |
| deleted_acadimec_regsteration_files[] | array | URLs of files to remove | No |
| deleted_letter_from_university_files[] | array | URLs of files to remove | No |
| deleted_warranty_certificate_files[] | array | URLs of files to remove | No |
| deleted_proof_kinship_files[] | array | URLs of files to remove | No |
| deleted_school_certificate_files[] | array | URLs of files to remove | No |
| deleted_medical_report_files[] | array | URLs of files to remove | No |
| deleted_identification_files[] | array | URLs of files to remove | No |
Success Response
{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"id": "a1f46380-f344-11ef-b7d6-9374da080168",
"type": "pupils",
"status": "pending",
"school_name": "جامعة الاحقاف2",
"school_enrollment_year": "2000-01-11",
"school_expected_graduation_year": "2001-01-11",
"created_at": "2025-02-25 09:49:17",
"school_certificate_files": [
"https://sumaya369-testing-media.s3.us-east-2.amazonaws.com/23624/360_F_421755953_LitQ8sAhxJ88bFPVjYTjKI3FBhGqrEP2.jpg"
],
"notes": [],
"can_modified": true,
"is_employed": false,
"is_agree_to_terms": true
},
"status_code": 200
}
Error Response
Update Time Exceeded (405)
{
"success": false,
"message": "لا يمكن التحديث بعد مرور 3 أيام",
"data": null,
"status_code": 405
}
Example Implementation Flow
-
Submit Application Request
- Determine application type (student, social_security, pupils, special_needs)
- Prepare required documents based on type
- Submit multipart form request with files and metadata
- Handle success/error responses
-
Update Application
- Check if request is still within 3-day update window
- Prepare updated documents and metadata
- Submit update request with new files and/or deletions
- Handle response appropriately
-
View Applications
- Fetch list of applications
- Display status and attached documents
- Show warning status information
Key Considerations
- Different application types require different sets of documents
- Updates are only allowed within 3 days for pending requests
- File management includes both adding new files and removing existing ones
- Warning status tracking for different application states
- Authentication is required for all endpoints
- Media files are stored in specific collections based on document type