Appearance
GET /api/v1/me/legal-entities
Retrieve the list of legal entities that the authenticated user has consented to share with this OAuth client.
Endpoint
GET /api/v1/me/legal-entitiesAuthentication
Requires a valid OAuth access token with the eprospera:entity.read scope.
Authorization: Bearer <access-token>Required Scopes
eprospera:entity.read
Request
No request body or query parameters required.
Example Request
bash
curl https://portal.eprospera.com/api/v1/me/legal-entities \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."Response
Success Response (200 OK)
Returns an array of legal entities that the user consented to share and where the user is still an active representative.
| Field | Type | Description |
|---|---|---|
data | array | Array of legal entity objects |
data[].id | string | Unique identifier for the legal entity |
data[].optionId | string | Entity formation option (e.g., llc, for_profit_corp) |
data[].type | string | Entity type (e.g., "Limited Liability Company") |
data[].name | string | Legal name of the entity |
data[].extension | string | Name extension (e.g., "LLC", "Inc.") |
data[].nameStartsWithExtension | boolean | Whether the name starts with the extension |
data[].residentPermitNumber | string | null | Entity's Resident Permit Number |
Example Response
json
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"optionId": "llc",
"type": "Limited Liability Company",
"name": "Acme Holdings",
"extension": "LLC",
"nameStartsWithExtension": false,
"residentPermitNumber": "80123456789012"
}
]
}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.read"
}500 Internal Server Error
json
{
"error": "Internal server error"
}Usage Notes
- Only entities the user explicitly consented to share on the authorization page are returned
- If the user loses representative access to an entity after consenting, that entity will no longer appear in the results
- An empty array is returned if no consented entities match (the user may have deselected all entities)
- Use GET /api/v1/me/legal-entities/[id] to retrieve full details for a specific entity
Related Endpoints
- GET /api/v1/me/legal-entities/[id] - Get a single legal entity
- GET /api/v1/me/legal-entities/[id]/documents - Get entity documents