Accounts API
External integrationThe Accounts API manages financial investment accounts (brokerage and custodial accounts) on the Altafid platform. It covers account discovery, linking accounts to the platform and to households, multi-currency balances and performance, holdings and transactions, and tenant- and household-level aggregation for dashboards.
https://api.altafid.dev.altafid.netAll requests require standard auth headers — see Authentication and Global Headers.
linkState of linked (actively tracked) or unlinked, can be mapped one-to-one to a household for aggregation, and holds balances, positions, and transactions in multiple currencies (USD, CLP, EUR, and others) with FX conversion tracking.
Authentication and headers
All endpoints below require the standard gateway headers. x-tenant-uuid is mandatory and scopes every request to a single tenant.
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <token> | required | Access token. |
x-tenant-uuid | required | Tenant context; checked on every endpoint. |
x-user-id | required | Current user UUID. |
x-user-email | required | Current user email. |
x-user-type | required | SYSTEM_STAFF, TENANT_STAFF, PARTNER_STAFF, or CONTACT. |
x-partner-uuid | optional | Required for partner staff. |
Linking flow
Newly ingested accounts arrive unlinked. To surface an account in reporting you link it to the platform, then map it to a household. Analytics endpoints become meaningful once an account is linked.
Find accounts to onboard
positions, aggregation
linkState=linked before it can be mapped to a household. The household link is a one-to-one mapping.
Account endpoints
| Endpoint | Purpose |
|---|---|
GET /api/accounts/unlinked | Paginated list of unlinked accounts. Optional keyword searches by account number. |
GET /api/accounts/linked | Paginated list of linked accounts (detailed summary). Optional keyword. |
GET /api/accounts/{accountUuid} | Single account detail as AccountDetailedSummary. |
PUT /api/accounts/{accountUuid}/link-state | Set link state. Query state=linked|unlinked. Returns 204. |
GET /api/accounts/{accountUuid}/transactions | Paginated transactions. Optional transactionType; sortable. |
GET /api/accounts/fxc | Latest FX conversion rates (FX↔USD) as of a date (default today). |
List endpoints accept page (zero-indexed, default 0) and size (default 20) and return a PagedResponse. The transactions endpoint sorts on executeDate (default), snapshotDate, transactionType, grossAmount, or accountNumber via sortColumn + sortOrder.
curl "https://api.altafid.dev.altafid.net/api/accounts/unlinked?keyword=12345&page=0&size=20" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "x-tenant-uuid: YOUR_TENANT_UUID" \
-H "x-user-id: YOUR_USER_ID" \
-H "x-user-email: YOUR_EMAIL" \
-H "x-user-type: TENANT_STAFF"
Linking and households
Use the link-state endpoint to attach an account to the platform, then map it to a household. Each mapping is one-to-one.
| Endpoint | Purpose | Response |
|---|---|---|
PUT /api/accounts/{accountUuid}/link-state?state=linked | Link or unlink an account; updates linkDate. | 204 No Content |
PUT /api/accounts/{accountUuid}/household/{householdUuid}/link | Map a linked account to a household. | 204 No Content |
PUT /api/accounts/{accountUuid}/household/{householdUuid}/unlink | Remove the account↔household mapping. | 204 No Content |
PUT /api/accounts/household/{householdUuid}/unlink | Remove all account mappings for a household. | 204 No Content |
Account analytics
Per-account analytics for a single linked account. When a date range is omitted, the service uses startDate = linkDate and endDate = today.
| Endpoint | Purpose | Returns |
|---|---|---|
GET /api/accounts/{accountUuid}/allocations | Latest-snapshot classification allocation (market value and %). | AccountAllocation[] |
GET /api/accounts/{accountUuid}/performance | Daily performance (EOD, BOD, flow, fee, 1D and cumulative return). Optional startDate, endDate. | AccountDailyPerformance[] |
GET /api/accounts/{accountUuid}/performance-by-period | Performance by period (1D, 3M, 6M, YTD, 1Y, Since Funded). | AccountPeriodPerformance[] |
GET /api/accounts/{accountUuid}/performance-by-month | Monthly performance aggregation. | AccountMonthlyPerformance[] |
GET /api/accounts/{accountUuid}/balance-summary | EOD balance, net deposits, and FX-based balances. Optional startDate, endDate. | AccountBalanceSummaryResponse |
GET /api/accounts/{accountUuid}/balance-summary-period | Period balance summaries. | AccountBalancePeriod[] |
GET /api/accounts/{accountUuid}/positions | Latest-snapshot holdings with USD/CLP/EUR valuations. | AccountPosition[] |
Household aggregation
Roll up the accounts mapped to a household.
| Endpoint | Purpose | Returns |
|---|---|---|
GET /api/accounts/household/{householdUuid}/linked | Paginated linked accounts for the household. | PagedResponse<AccountDetailedSummary> |
GET /api/accounts/household/{householdUuid}/summary | Aggregate summary for the household. | AccountsListSummary |
POST /api/accounts/household/bulk/summary | Summaries for many households. Body: list of household UUIDs. | HouseholdAccountsSummary[] |
GET /api/accounts/household/{householdUuid}/asset-class | Asset-class market-value breakdown. | AssetClass[] |
GET /api/accounts/household/{householdUuid}/balance-chart | Daily balances and flows. Optional startDate (default −90d), endDate (default today). | BalanceChart[] |
Tenant aggregation
Roll up every linked account in the tenant.
| Endpoint | Purpose |
|---|---|
GET /api/accounts/tenant/summary | Tenant-wide account summary (AccountsListSummary). |
GET /api/accounts/tenant/asset-class | Tenant-wide asset-class breakdown (AssetClass[]). |
GET /api/accounts/tenant/balance-chart | Tenant-wide daily balances/flows. Optional startDate (default −90d), endDate. |
GET /api/accounts/tenant/contribution-withdrawal | Tenant-wide contribution/withdrawal. Optional startDate (default −1y), endDate. |
POST /api/accounts/tenant | Tenant Admin — provision a tenant mapping (FintreeTenantCreate). Returns 201. |
Workstation
The workstation endpoints power the advisor dashboard: filtered grids and chart aggregates across accounts, households, and contacts. Filter requests support quintile buckets (values 1–5) for MTD, QTD, and YTD returns and for EOD balances, plus an optional staffUuid scope.
Grids
| Endpoint | Filter body |
|---|---|
POST /api/accounts/workstation/filter | WorkstationFilter (by account) |
POST /api/accounts/workstation/household/filter | HouseholdWorkstationFilter |
POST /api/accounts/workstation/contact/filter | ContactWorkstationFilter |
GET /api/accounts/workstation/contact/{contactUuid}/accounts | Accounts for a contact |
Charts
POST /api/accounts/workstation/charts, .../household/charts, and .../contact/charts accept a WorkstationChart request (metric = BALANCE | MTD | QTD | YTD; currency required when metric=BALANCE).
Account detail aggregates
The POST /api/accounts/workstation/account/* family returns specific aggregates for a set of accounts over a date window (WorkstationAccount request: startDate, endDate, optional accountUuids):
The POST /api/accounts/workstation/household/* family mirrors these for households (WorkstationHousehold request: startDate, endDate, optional householdUuids): asset-allocation-pie-chart, asset-allocation-detailed, balance-line-chart, balance-line-chart-summary, performance-line-chart, performance-line-chart-summary, and household-summary.
Securities classification
Admin endpoints for classifying the share-class FIGIs held across the tenant's accounts.
| Endpoint | Purpose |
|---|---|
GET /api/accounts/share_class_figi/non_classified | Paginated FIGIs not yet classified for the tenant. |
GET /api/accounts/share_class_figi/manual_classified | Paginated manually classified FIGIs. |
GET /api/accounts/share_class_figi/hierarchy/{hierarchyId}/leafnodes | Leaf nodes of a classification hierarchy. |
POST /api/accounts/share_class_figi/do_classification | Classify a FIGI (ClassifyFigi). |
DELETE /api/accounts/share_class_figi/classification | Delete a classification (DeleteFigi). |
Audit
POST/api/accounts/audit returns a paginated, filterable log of link/unlink events.
{
"householdUuids": ["H019..."],
"accountUuids": ["A019..."],
"events": ["ACCOUNT_LINKED_HOUSEHOLD", "ACCOUNT_UNLINKED_HOUSEHOLD"],
"startDate": "2026-01-01",
"endDate": "2026-05-31"
}
Query params: sortColumn (id, householdUuid, accountUuid, event, createdAt — default createdAt), sortOrder (asc/desc), page, size. Returns PagedResponse<AccountAudit>.
Data model
PagedResponse
Standard pagination envelope: content[], page, size, totalElements, totalPages.
AccountSummary
Returned by the unlinked list. Core account attributes.
| Field | Type | Notes |
|---|---|---|
accountUuid | string | Identifier. |
linkState | string | linked | unlinked. |
linkDate | datetime | When linked. |
tenantUuid | string | Owning tenant. |
accountNumber | string | Custodian account number. |
custodian | string | Source custodian. |
accountStatus / accountType | string | Status and type. |
marginAccount / positionOnly / taxable | boolean | Account flags. |
taxResidency / w8W9Indicator | string | Tax attributes. |
disposalMethodForMutualFunds / disposalMethodForOtherSecurities | string | Disposal methods. |
baseCurrency / defaultFxCurrency | string | Currencies. |
householdUuid / householdName | string | Mapped household (nullable). |
AccountDetailedSummary
Returned by the linked list and single-account detail. Includes everything in AccountSummary plus portfolio/manager attribution, snapshotDate, trading, distinctFxCurrencies, and current/previous EOD balances, net deposits, day change, and gain/loss in USD, CLP, and EUR.
Transaction
Fields: accountUuid, accountNumber, snapshotDate, executeDate, transactionType, description, actionCode, pricePerShare, grossAmount, custodian, fxCurrency, fxRate, transactionQuantity, executePrice, and the CLP/USD conversions (executePriceClp, pricePerShareClp, grossAmountClp, executePriceUsd, pricePerShareUsd, grossAmountUsd).
AccountPosition
Holding for the latest snapshot: name, ticker, price, rank, quantity, market value in USD/CLP/EUR/CAD/GBP, fxCurrency, reinvestDividend, ppShareClassFigi, fsShareClassFigi, countryCode.
AccountAllocation & AssetClass
Classification breakdown: level1Classification plus total market value and percentage in USD, CLP, and EUR.
AccountFxRate
conversionDate, fxCurrency, fxCurrencyInUsd, usdInFxCurrency.
AccountsListSummary / HouseholdAccountsSummary
Aggregate roll-up: accountCount, householdBaseCurrency, total assets, beginning/ending value, net deposits, change in value, and gain/loss across USD, CLP, and EUR. HouseholdAccountsSummary adds householdUuid.
AccountAudit
tenantUuid, householdUuid, householdName, accountNumber, accountUuid, event (AccountAuditEvent), createdAt.
Request bodies
| DTO | Fields |
|---|---|
WorkstationFilter | accountUuid[], custodian[], quintiles (mtdReturnQuintile, qtdReturnQuintile, ytdReturnQuintile, eodBalanceUsdQuintile, eodBalanceClpQuintile) values 1–5, staffUuid — all optional. |
WorkstationAccount | startDate, endDate (required for most), accountUuids[] (empty = all tenant accounts). |
WorkstationHousehold | startDate, endDate, householdUuids[] (empty = all). |
WorkstationChart | metric (BALANCE/MTD/QTD/YTD), currency (required if BALANCE: USD/CLP/EUR), optional accountUuids[], householdUuids[], contactUuids[], staffUuid. |
ClassifyFigi | tenant, shareClassFigi, symbol, currency, country (required); securityName, securityMastersList, companyName, riskScore, validStart, validEnd (optional). |
DeleteFigi | tenant, symbol, currency, country (all optional). |
FintreeTenantCreate | fintree_tenant_id, dev_tenant_id, tenant_name, default_reconciliation_service_level (≥0) — all required. |
Enum reference
The following fields accept a fixed set of values. Pass the exact string value shown.