Skip to content

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.

PropertyValue
EndpointFetch All Notes
MethodGET
URL/api/v1/notes
AuthenticationBearer Token

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer your-auth-tokenYes

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.

PropertyValue
EndpointFetch Note
MethodGET
URL/api/v1/notes/{id}
AuthenticationBearer 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.

PropertyValue
EndpointCreate Note
MethodPOST
URL/api/v1/notes
AuthenticationBearer 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"
}
ParameterTypeRequiredDescription
titlestringYesNote title
contentstringNoNote content
to_profile_typeintegerYes1=User, 2=Subscriber
to_idintegerYesTarget entity ID

Success Response (201 Created):

json
{
    "success": true,
    "message": "Note created successfully",
    "data": {
        "id": 1
    }
}

Update Note

Update an existing note.

PropertyValue
EndpointUpdate Note
MethodPUT
URL/api/v1/notes/{id}
AuthenticationBearer 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.

PropertyValue
EndpointDelete Note
MethodDELETE
URL/api/v1/notes/{id}
AuthenticationBearer Token

Success Response (200 OK):

json
{
    "success": true,
    "message": "Note deleted successfully"
}

www.onezeroart.com