Estimated Returns
Estimated returns represent projected or expected return values for entities on specific dates. They can be used for forecasting and scenario analysis.
| Base route | /v1/estimated_returns |
| Endpoints | GET /v1/estimated_returns |
| Produces | JSON |
| Application permissions required | "API Access: Create, edit, and delete" |
| OAuth scopes | GET ESTIMATED_RETURNS_READ |
Access requirements
All requests require an API key with "API Access: Create, edit, and delete" application permissions.
Resource attributes
| Attribute | Description |
|---|---|
entity_id | The entity ID that the estimated return is for. Number. Required. |
date | The date for which the return is estimated, in YYYY-MM-DD format. String. Required. |
return_value | The estimated return value (decimal representation). Number. Required. |
Get estimated returns
Returns estimated returns filtered by one or more entity IDs.
GET /v1/estimated_returns
filter[entity_id]-- Comma-separated list of entity IDs to filter by (required).page[after]-- Cursor for pagination. The cursor is the composite ID of the last item from the previous page (optional).page[limit]-- Maximum number of items to return per page (optional).
Authentication
This endpoint requires a valid API key or OAuth token. See Authentication for details.
GET https://{firm}.addepar.com/api/v1/estimated_returns?filter[entity_id]=123{
"data": [
{
"id": "123_2024-01-15",
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-01-15",
"return_value": 0.05
}
}
],
"links": {
"prev": null,
"next": null
}
}Response codes
200 OK-- Success400 Bad Request-- Missing or invalidfilter[entity_id]parameter403 Forbidden-- Lacking necessary permissions404 Not Found-- Entity ID is nonexistent or not permissioned
Get a single estimated return
Returns a single estimated return by its composite ID.
GET /v1/estimated_returns/:id
id-- The composite ID in format{entityId}_{date}(e.g.,123_2024-01-15) (required).
GET https://{firm}.addepar.com/api/v1/estimated_returns/123_2024-01-15{
"data": {
"id": "123_2024-01-15",
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-01-15",
"return_value": 0.05
}
}
}Response codes
200 OK-- Success400 Bad Request-- Invalid ID format403 Forbidden-- Lacking necessary permissions404 Not Found-- Estimated return not found or entity not permissioned
Create or update estimated returns
Creates or updates estimated returns using upsert semantics. If an estimated return with the same entity ID and date already exists, it will be updated; otherwise, a new one will be created.
POST /v1/estimated_returns
Example (single)
POST https://{firm}.addepar.com/api/v1/estimated_returns
{
"data": {
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-01-15",
"return_value": 0.05
}
}
}Example (bulk)
POST https://{firm}.addepar.com/api/v1/estimated_returns
{
"data": [
{
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-01-15",
"return_value": 0.05
}
},
{
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-02-15",
"return_value": 0.03
}
}
]
}{
"data": [
{
"id": "123_2024-01-15",
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-01-15",
"return_value": 0.05
}
}
]
}Response codes
201 Created-- Success400 Bad Request-- Invalid payload or missing required attributes403 Forbidden-- Lacking the required permissions to write estimated returns404 Not Found-- Entity ID is nonexistent or not permissioned
Update a single estimated return
Updates the return value of an existing estimated return. Only the return_value attribute can be modified; entity_id and date are immutable.
PATCH /v1/estimated_returns/:id
id-- The composite ID in format{entityId}_{date}(e.g.,123_2024-01-15) (required).
PATCH https://{firm}.addepar.com/api/v1/estimated_returns/123_2024-01-15
{
"data": {
"id": "123_2024-01-15",
"type": "estimated_returns",
"attributes": {
"return_value": 0.07
}
}
}{
"data": {
"id": "123_2024-01-15",
"type": "estimated_returns",
"attributes": {
"entity_id": 123,
"date": "2024-01-15",
"return_value": 0.07
}
}
}Response codes
200 OK-- Success400 Bad Request-- Invalid payload or attempting to modify immutable attributes403 Forbidden-- Lacking the required permissions to write estimated returns404 Not Found-- Estimated return not found or entity not permissioned
Delete a single estimated return
Deletes a single estimated return.
DELETE /v1/estimated_returns/:id
id-- The composite ID in format{entityId}_{date}(e.g.,123_2024-01-15) (required).
DELETE https://{firm}.addepar.com/api/v1/estimated_returns/123_2024-01-15HTTP/1.1 204 No ContentResponse codes
204 No Content-- Successfully deleted the estimated return400 Bad Request-- Invalid ID format403 Forbidden-- Lacking the required permissions to write estimated returns404 Not Found-- Estimated return not found or entity not permissioned
Delete all estimated returns for an entity
Deletes all estimated returns for a specific entity.
DELETE /v1/estimated_returns/entity/:entityId
entityId-- The entity ID (integer) (required).
DELETE https://{firm}.addepar.com/api/v1/estimated_returns/entity/123HTTP/1.1 204 No ContentResponse codes
204 No Content-- Successfully deleted all estimated returns for the entity400 Bad Request-- Invalid entity ID format403 Forbidden-- Lacking the required permissions to write estimated returns404 Not Found-- Entity ID is nonexistent or not permissioned
Related resources
Updated 6 days ago