Notes API Endpoint
Component Detail
Infrastructure
low complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Backend REST API endpoint serving filtered and paginated note queries scoped to the authenticated user. Enforces multi-tenancy via application-level filtering on user, organisation, and contact access rights before executing the PostgreSQL query.
notes-api-endpoint
Responsibilities
- Expose GET /api/v1/notes with page, search, sort, and contact_id query parameters
- Apply multi-tenancy filtering to restrict results to accessible contacts and organisations
- Validate and parse all query parameters with appropriate defaults
- Return standardised paginated response envelope with total count and page metadata
Interfaces
GET /api/v1/notes?page={n}&limit={n}&search={q}&sort={field}&contact_id={id}
Response: { items: NoteDto[], total: number, page: number, limit: number }