Skip to main content
POST
Pre-flight check of a proposed allocation plan

Authorizations

x-api-key
string
header
required

Raw API key shown once when created in the Allocait app (Settings > API keys). Send it verbatim in this header; the server stores and compares only its SHA-256 hash. Allocait generates every key: alc_ followed by 64 lowercase hex characters. Keys issued before 2026-10-10 are 64 hex characters with no prefix and keep working. A key may carry an expiry (90 days or 1 year, or never). A malformed, unknown, revoked or expired key gets 401 with no further detail, and a malformed one is refused before any lookup. Keys cannot be created through this API.

Body

application/json
portfolio_id
string<uuid>
required
allocations
object
required

Symbol-to-percentage map. Should sum to 100. An entry can be negative (a short) or above 100, between -1000000 and 1000000. A CASH or $CASH entry cannot be negative (CASH cannot be negative. Cash is never held below zero.), and an entry beyond the bound is refused ({symbol} must be between -1000000 and 1000000.); each is a 400 INVALID_INPUT with the field name in front (allocations.CASH ...). At most 500 keys; a portfolio holds far fewer real positions than that; a larger map is rejected with 400 rather than processed and echoed back in unknown_symbols.

Example:
scenario_id
string<uuid>

Default is the portfolio's active scenario, and only that (ADR-187, ADR-232).

asset_classes
object

Optional symbol-to-asset-class map. Files a symbol the portfolio does not hold yet under a class, or a held symbol under a different one (the class positions/apply would write). Each value is an asset class name, a rules text alias or an id, resolved your own class first; one that matches nothing is a 404 with error_code NOT_FOUND and the names in valid_values. Symbols are read as positions stores them: upper case, and CASH is the cash row.

Example:

Response

Validation result

Pre-flight check of a proposed allocation plan. is_valid is true only when sum_ok AND violation_count=0 AND size_violation_count=0 AND unknown_symbols is empty.

portfolio_id
string<uuid>
scenario_id
string<uuid>
sum_pct
number

Sum of proposed allocation percentages; should be ~100

sum_ok
boolean

True when sum_pct is within 0.01 of 100

unknown_symbols
string[]

Symbols in the proposal that this portfolio does not hold and that asset_classes does not file under a class. No rule judges them.

violation_count
integer
violations
object[]

One entry per asset class whose proposed total is outside its allocation band. Every class with a band is judged; a class with nothing proposed above 0 sits at 0% (ADR-069).

size_violation_count
integer
size_violations
object[]

One entry per proposed non-cash symbol outside its class's range for the side it is on. A positive entry is a long, judged against the position size range; a negative entry is a short, judged by its size without the minus sign against the short size range (ADR-144). A class with no range for that side sets no limit. A symbol proposed at 0 is an exit (or no buy) and is never judged here; it still counts as 0 toward its class band. A short subtracts from its class (ADR-153).

is_valid
boolean

Overall verdict. Safe to proceed if true