backend: correspondents
This commit is contained in:
+11
-1
@@ -16,7 +16,7 @@ Health
|
||||
|
||||
Documents
|
||||
---------
|
||||
- GET /api/documents - List documents, optionally filtered by `folder_id` and `include_deleted`.
|
||||
- GET /api/documents - List documents, optionally filtered by `folder_id` and `include_deleted`; each entry includes tags, correspondent assignments, and current version info.
|
||||
- POST /api/documents - Upload a document via multipart form-data (`file`, optional metadata/folder fields).
|
||||
- POST /api/documents/reanalyze - Queue re-analysis for every non-deleted document.
|
||||
- POST /api/documents/bulk/move - Move multiple documents to a target folder.
|
||||
@@ -29,6 +29,8 @@ Documents
|
||||
- PATCH /api/documents/:id/folder - Move a document to another folder.
|
||||
- POST /api/documents/:id/tags - Assign one or more tags to a document.
|
||||
- DELETE /api/documents/:id/tags/:tag_id - Remove a single tag from a document.
|
||||
- POST /api/documents/:id/correspondents - Assign correspondents to roles (`assignments[]` with `correspondent_id` and `role`; optional `replace=true` overwrites existing assignments for those roles). Valid roles: `sender`, `receiver`, `other`.
|
||||
- DELETE /api/documents/:id/correspondents/:correspondent_id - Remove a correspondent assignment (requires `role` query string).
|
||||
|
||||
Document Assets
|
||||
---------------
|
||||
@@ -54,3 +56,11 @@ Tags
|
||||
- GET /api/tags - List all tags with usage counts.
|
||||
- POST /api/tags - Create a new tag.
|
||||
- PATCH /api/tags/:id - Update a tag's label or color.
|
||||
- DELETE /api/tags/:id - Remove a tag; fails with 400 if still assigned to any document.
|
||||
|
||||
Correspondents
|
||||
--------------
|
||||
- GET /api/correspondents - List correspondents with usage totals and per-role counts (roles: `sender`, `receiver`, `other`).
|
||||
- POST /api/correspondents - Create a correspondent (name + optional metadata JSON).
|
||||
- PATCH /api/correspondents/:id - Update name and/or metadata.
|
||||
- DELETE /api/correspondents/:id - Remove a correspondent; fails with 400 if referenced by any document.
|
||||
|
||||
Reference in New Issue
Block a user