Appearance
User - Notes
Base URL:
https://your-domain.com
Admin endpoints for managing notes attached to subscribers or users. All endpoints require admin/staff authentication.
Fetch All Notes
Retrieve all notes.
| Property | Value |
|---|---|
| Endpoint | Fetch All Notes |
| Method | GET |
| URL | /api/v1/notes |
| 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": "Connection Issue",
"to_profile_type": 2,
"to_username": "subscriber1",
"created_by": "Admin",
"created_at": "2024-01-15 10:30:00"
}
]
}Fetch Note
Retrieve details of a specific note.
| Property | Value |
|---|---|
| Endpoint | Fetch Note |
| Method | GET |
| URL | /api/v1/notes/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": {
"id": 1,
"title": "Connection Issue",
"content": "Customer reported slow speeds",
"to_profile_type": 2,
"to_id": 1,
"to_username": "subscriber1",
"created_by": "Admin",
"created_at": "2024-01-15 10:30:00"
}
}Create Note
Create a new note for a subscriber or user.
| Property | Value |
|---|---|
| Endpoint | Create Note |
| Method | POST |
| URL | /api/v1/notes |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "Note Title",
"content": "Note content here",
"to_profile_type": 2,
"to_id": 1,
"to_username": "subscriber1"
}| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Note title |
content | string | No | Note content |
to_profile_type | integer | Yes | 1=User, 2=Subscriber |
to_id | integer | Yes | Target entity ID |
Success Response (201 Created):
json
{
"success": true,
"message": "Note created successfully",
"data": {
"id": 1
}
}Update Note
Update an existing note.
| Property | Value |
|---|---|
| Endpoint | Update Note |
| Method | PUT |
| URL | /api/v1/notes/{id} |
| Authentication | Bearer Token |
Request Body:
json
{
"title": "Updated Note",
"content": "Updated content"
}Success Response (200 OK):
json
{
"success": true,
"message": "Note updated successfully"
}Delete Note
Delete a note.
| Property | Value |
|---|---|
| Endpoint | Delete Note |
| Method | DELETE |
| URL | /api/v1/notes/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"message": "Note deleted successfully"
}