Appearance
User - Notices
Base URL:
https://your-domain.com
Admin endpoints for managing system notices/announcements. All endpoints require admin/staff authentication.
Fetch All Notices
Retrieve all notices.
| Property | Value |
|---|---|
| Endpoint | Fetch All Notices |
| Method | GET |
| URL | /api/v1/notices |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"id": 1,
"title": "Maintenance Notice",
"content": "Scheduled maintenance tonight",
"is_active": true,
"created_at": "2024-01-15 10:30:00"
}
]
}Fetch Notice
Retrieve details of a specific notice.
| Property | Value |
|---|---|
| Endpoint | Fetch Notice |
| Method | GET |
| URL | /api/v1/notices/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": {
"id": 1,
"title": "Maintenance Notice",
"content": "Scheduled maintenance tonight from 10 PM to 2 AM",
"is_active": true,
"created_by": "Admin",
"created_at": "2024-01-15 10:30:00"
}
}Create Notice
Create a new notice/announcement.
| Property | Value |
|---|---|
| Endpoint | Create Notice |
| Method | POST |
| URL | /api/v1/notices |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "Maintenance Notice",
"content": "Scheduled maintenance tonight",
"is_active": true
}| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Notice title |
content | string | Yes | Notice content |
is_active | boolean | No | Whether notice is active |
Success Response (201 Created):
json
{
"success": true,
"message": "Notice created successfully",
"data": {
"id": 1
}
}Update Notice
Update an existing notice.
| Property | Value |
|---|---|
| Endpoint | Update Notice |
| Method | PUT |
| URL | /api/v1/notices/{id} |
| Authentication | Bearer Token |
Request Body:
json
{
"title": "Updated Notice",
"is_active": false
}Success Response (200 OK):
json
{
"success": true,
"message": "Notice updated successfully"
}Delete Notice
Delete a notice.
| Property | Value |
|---|---|
| Endpoint | Delete Notice |
| Method | DELETE |
| URL | /api/v1/notices/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"message": "Notice deleted successfully"
}