Appearance
GET /api/v1/me/legal-entities/[id]/documents
Retrieve documents for a legal entity. Returns non-admin documents such as the Certificate of Organization, Rider to Agreement of Coexistence, and Certificate of Good Standing.
Endpoint
GET /api/v1/me/legal-entities/{id}/documentsAuthentication
Requires a valid OAuth access token with the eprospera:entity.documents.read scope.
Authorization: Bearer <access-token>Required Scopes
eprospera:entity.documents.read
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | The legal entity ID |
Example Request
bash
curl https://portal.eprospera.com/api/v1/me/legal-entities/a1b2c3d4-e5f6-7890-abcd-ef1234567890/documents \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."Response
Success Response (200 OK)
Returns an array of documents for the entity.
| Field | Type | Description |
|---|---|---|
data | array | Array of document objects |
data[].id | string | Unique identifier for the document |
data[].name | string | Document name (e.g., "Certificate of Organization") |
data[].slug | string | null | Document slug identifier |
data[].version | string | null | Document version |
data[].fileUrl | string | URL to download the document file |
Example Response
json
{
"data": [
{
"id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"name": "Certificate of Organization",
"slug": "certificate-of-organization",
"version": "1.0",
"fileUrl": "https://storage.example.com/documents/cert-of-org.pdf"
},
{
"id": "e2f3a4b5-c6d7-8901-bcde-f12345678901",
"name": "Rider to Agreement of Coexistence",
"slug": "rider-to-aoc",
"version": "1.0",
"fileUrl": "https://storage.example.com/documents/rider-aoc.pdf"
}
]
}404 Not Found
Returned when the entity doesn't exist, wasn't consented, or the user is no longer a representative.
json
{
"error": "Legal entity not found"
}Error Responses
401 Unauthorized - Missing Token
json
{
"error": "missing_token"
}401 Unauthorized - Invalid Token
json
{
"error": "invalid_token"
}401 Unauthorized - Insufficient Scopes
json
{
"error": "missing_scopes: eprospera:entity.documents.read"
}500 Internal Server Error
json
{
"error": "Internal server error"
}Usage Notes
- Only non-admin documents are returned (admin-only documents are excluded)
- Document URLs are signed and may expire — fetch documents promptly after retrieving URLs
- Common documents include: Certificate of Organization, Rider to Agreement of Coexistence, Certificate of Good Standing
Related Endpoints
- GET /api/v1/me/legal-entities - List all consented entities
- GET /api/v1/me/legal-entities/[id] - Get a single legal entity