Appearance
GET legal_entities/[id]/documents
Retrieve documents for a specific legal entity.
Endpoint
GET /api/v1/legal_entities/{id}/documentsAuthentication
Requires a valid API key in the Authorization header:
Authorization: Bearer <your-api-key>Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | The unique identifier of the legal entity |
Example Request
bash
curl -X GET https://portal.eprospera.com/api/v1/legal_entities/7c7397bc-bd67-4f7d-90fe-318b667595cc/documents \
-H "Authorization: Bearer <your-api-key>"Response
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
data | array | Array of document objects |
Document Object Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Document unique identifier |
name | string | Document name |
createdAt | string | Creation timestamp (ISO 8601) |
slug | string | Document slug |
version | number | Document version |
fileUrl | string | URL to access the document file |
Example Response
json
{
"data": [
{
"id": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"name": "Certificate of Formation",
"createdAt": "2024-01-15T10:30:00.000Z",
"slug": "certificate-of-formation",
"version": 1,
"fileUrl": "https://example.com/documents/cert.pdf"
}
]
}Error Responses
401 Unauthorized
Invalid or missing API key:
json
{
"error": "Invalid API key"
}404 Not Found
Legal entity not found or you don't have access:
json
{
"error": "Legal entity not found"
}500 Internal Server Error
Server error:
json
{
"error": "Internal server error"
}Access Control
You can only access documents for legal entities where you are a representative.