Accounts API

External integration

The 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.

Base URL: https://api.altafid.dev.altafid.net
All requests require standard auth headers — see Authentication and Global Headers.
What is an account? An account is a financial investment account sourced from a custodian. Each account has a 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.

HeaderRequiredNotes
Authorization: Bearer <token>requiredAccess token.
x-tenant-uuidrequiredTenant context; checked on every endpoint.
x-user-idrequiredCurrent user UUID.
x-user-emailrequiredCurrent user email.
x-user-typerequiredSYSTEM_STAFF, TENANT_STAFF, PARTNER_STAFF, or CONTACT.
x-partner-uuidoptionalRequired 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.

1
Discover
GET /api/accounts/unlinked
Find accounts to onboard
2
Link to platform
PUT .../{accountUuid}/link-state?state=linked
3
Map to household
PUT .../{accountUuid}/household/{householdUuid}/link
4
Report
Balances, performance,
positions, aggregation
Order matters: an account must have linkState=linked before it can be mapped to a household. The household link is a one-to-one mapping.

Account endpoints

EndpointPurpose
GET /api/accounts/unlinkedPaginated list of unlinked accounts. Optional keyword searches by account number.
GET /api/accounts/linkedPaginated list of linked accounts (detailed summary). Optional keyword.
GET /api/accounts/{accountUuid}Single account detail as AccountDetailedSummary.
PUT /api/accounts/{accountUuid}/link-stateSet link state. Query state=linked|unlinked. Returns 204.
GET /api/accounts/{accountUuid}/transactionsPaginated transactions. Optional transactionType; sortable.
GET /api/accounts/fxcLatest 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.

EndpointPurposeResponse
PUT /api/accounts/{accountUuid}/link-state?state=linkedLink or unlink an account; updates linkDate.204 No Content
PUT /api/accounts/{accountUuid}/household/{householdUuid}/linkMap a linked account to a household.204 No Content
PUT /api/accounts/{accountUuid}/household/{householdUuid}/unlinkRemove the account↔household mapping.204 No Content
PUT /api/accounts/household/{householdUuid}/unlinkRemove 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.

EndpointPurposeReturns
GET /api/accounts/{accountUuid}/allocationsLatest-snapshot classification allocation (market value and %).AccountAllocation[]
GET /api/accounts/{accountUuid}/performanceDaily performance (EOD, BOD, flow, fee, 1D and cumulative return). Optional startDate, endDate.AccountDailyPerformance[]
GET /api/accounts/{accountUuid}/performance-by-periodPerformance by period (1D, 3M, 6M, YTD, 1Y, Since Funded).AccountPeriodPerformance[]
GET /api/accounts/{accountUuid}/performance-by-monthMonthly performance aggregation.AccountMonthlyPerformance[]
GET /api/accounts/{accountUuid}/balance-summaryEOD balance, net deposits, and FX-based balances. Optional startDate, endDate.AccountBalanceSummaryResponse
GET /api/accounts/{accountUuid}/balance-summary-periodPeriod balance summaries.AccountBalancePeriod[]
GET /api/accounts/{accountUuid}/positionsLatest-snapshot holdings with USD/CLP/EUR valuations.AccountPosition[]

Household aggregation

Roll up the accounts mapped to a household.

EndpointPurposeReturns
GET /api/accounts/household/{householdUuid}/linkedPaginated linked accounts for the household.PagedResponse<AccountDetailedSummary>
GET /api/accounts/household/{householdUuid}/summaryAggregate summary for the household.AccountsListSummary
POST /api/accounts/household/bulk/summarySummaries for many households. Body: list of household UUIDs.HouseholdAccountsSummary[]
GET /api/accounts/household/{householdUuid}/asset-classAsset-class market-value breakdown.AssetClass[]
GET /api/accounts/household/{householdUuid}/balance-chartDaily balances and flows. Optional startDate (default −90d), endDate (default today).BalanceChart[]

Tenant aggregation

Roll up every linked account in the tenant.

EndpointPurpose
GET /api/accounts/tenant/summaryTenant-wide account summary (AccountsListSummary).
GET /api/accounts/tenant/asset-classTenant-wide asset-class breakdown (AssetClass[]).
GET /api/accounts/tenant/balance-chartTenant-wide daily balances/flows. Optional startDate (default −90d), endDate.
GET /api/accounts/tenant/contribution-withdrawalTenant-wide contribution/withdrawal. Optional startDate (default −1y), endDate.
POST /api/accounts/tenantTenant 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 15) for MTD, QTD, and YTD returns and for EOD balances, plus an optional staffUuid scope.

Grids

EndpointFilter body
POST /api/accounts/workstation/filterWorkstationFilter (by account)
POST /api/accounts/workstation/household/filterHouseholdWorkstationFilter
POST /api/accounts/workstation/contact/filterContactWorkstationFilter
GET /api/accounts/workstation/contact/{contactUuid}/accountsAccounts 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):

asset-allocation asset-allocation-detailed balance-aggregates balance-line-chart performance-aggregates performance-monthly-aggregates performance-line-chart account-summary contribution-withdrawal-summary contribution-withdrawal-table fx-disclosure

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.

EndpointPurpose
GET /api/accounts/share_class_figi/non_classifiedPaginated FIGIs not yet classified for the tenant.
GET /api/accounts/share_class_figi/manual_classifiedPaginated manually classified FIGIs.
GET /api/accounts/share_class_figi/hierarchy/{hierarchyId}/leafnodesLeaf nodes of a classification hierarchy.
POST /api/accounts/share_class_figi/do_classificationClassify a FIGI (ClassifyFigi).
DELETE /api/accounts/share_class_figi/classificationDelete 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.

FieldTypeNotes
accountUuidstringIdentifier.
linkStatestringlinked | unlinked.
linkDatedatetimeWhen linked.
tenantUuidstringOwning tenant.
accountNumberstringCustodian account number.
custodianstringSource custodian.
accountStatus / accountTypestringStatus and type.
marginAccount / positionOnly / taxablebooleanAccount flags.
taxResidency / w8W9IndicatorstringTax attributes.
disposalMethodForMutualFunds / disposalMethodForOtherSecuritiesstringDisposal methods.
baseCurrency / defaultFxCurrencystringCurrencies.
householdUuid / householdNamestringMapped 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

DTOFields
WorkstationFilteraccountUuid[], custodian[], quintiles (mtdReturnQuintile, qtdReturnQuintile, ytdReturnQuintile, eodBalanceUsdQuintile, eodBalanceClpQuintile) values 1–5, staffUuid — all optional.
WorkstationAccountstartDate, endDate (required for most), accountUuids[] (empty = all tenant accounts).
WorkstationHouseholdstartDate, endDate, householdUuids[] (empty = all).
WorkstationChartmetric (BALANCE/MTD/QTD/YTD), currency (required if BALANCE: USD/CLP/EUR), optional accountUuids[], householdUuids[], contactUuids[], staffUuid.
ClassifyFigitenant, shareClassFigi, symbol, currency, country (required); securityName, securityMastersList, companyName, riskScore, validStart, validEnd (optional).
DeleteFigitenant, symbol, currency, country (all optional).
FintreeTenantCreatefintree_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.

linkState

linked unlinked

AccountAuditEvent

ACCOUNT_LINKED_PLATFORM ACCOUNT_UNLINKED_PLATFORM ACCOUNT_LINKED_HOUSEHOLD ACCOUNT_UNLINKED_HOUSEHOLD

workstation chart metric

BALANCE MTD QTD YTD

currency

USD CLP EUR

performance / balance period labels

1D 3M 6M YTD 1Y Since Funded