Skip to main content
POST
/
portfolios
/
me
/
allocation
Update target allocation for the signed-in user
curl --request POST \
  --url https://{host}/portfolios/me/allocation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <x-user-id>' \
  --data '
{
  "allocation": {
    "equities_uk": 50,
    "equities_eu": 50
  }
}
'
{
  "id": "<string>",
  "currency": "<string>",
  "holdings": [
    {
      "isin": "<string>",
      "assetCommonId": "<string>",
      "quantity": 123
    }
  ],
  "targetAllocation": [
    {
      "assetCommonId": "<string>",
      "percentage": 123
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Auth0-issued access token that includes the scopes listed for the route.

Headers

x-user-id
string
required

MongoDB identifier of the user whose portfolio is being queried.

Pattern: ^[a-f0-9]{24}$

Body

application/json
allocation
object
required

Map of assetCommonId to percentage weight. Must sum to 100.

flow
enum<string>

Optional creation flow. Omit when not applicable.

Available options:
builder,
robo_advisor,
from_scratch

Response

Updated portfolio view (same shape as GET portfolio by id), including holdings and target allocation.

id
string
required

Portfolio unique identifier.

currency
string
required

ISO currency code for the portfolio (e.g. EUR, GBP, USD).

holdings
object[]
required

Array of holdings with asset details and quantities.

targetAllocation
object[]
required

Target allocation by asset. Weights are persisted with the portfolio. May be an empty array when unset.

createdAt
string<date-time>
required

Portfolio creation timestamp.

updatedAt
string<date-time>
required

Last update timestamp.