Base URL: https://{tenant-domain}.agentcis.com/api/v2/attachments/{attachmentableType}/{attachmentableId} Parameters: - attachmentableType (path parameter): The type of entity (e.g. client - attachmentableId (path parameter): The ID of the entity
|
Endpoint:/
Method: GET
Description: Retrieves all documents for a specific entity type and ID
Response:
{ "data": [], “link”:{}, “meta”:{} } |
HTTP Status Codes:
- 200 OK
: Success
- 401 Unauthorized
: Invalid or missing authentication
- 403 Forbidden
: Insufficient permissions
- 404 Not Found
: Entity not found
Endpoint:/
Method: POST
Description: Uploads documents for a specific entity type and ID
Payload:
{ "documents": [] } Note: use body type as form-data and set key as file |
Response:
{ "uploadedFiles": [], "rejectedFiles": [ { "original_name": “", "path":””, "type": "pdf", "description": "", "file_size": , "namespace": "”, "givenName": "" } ] } |
HTTP Status Codes:
- 200 OK
: Success
- 400 Bad Request
: Validation error
- 401 Unauthorized
: Invalid or missing authentication
- 403 Forbidden
: Insufficient permissions
- 404 Not Found
: Entity not found
- 413 Payload Too Large
: File size exceeds limit
Endpoint:/aoi/v2/attachments
Method: POST
Description: Uploads documents for a specific entity type and ID
Payload:
{ ids: [], _method: "delete" } |
Response:
{ “deletedFile”:[], “rejectedFiles”:[] } |
HTTP Status Codes:
- 200 OK
: Success
- 400 Bad Request
: Validation error
- 401 Unauthorized
: Invalid or missing authentication
- 403 Forbidden
: Insufficient permissions