chatbot
clear chat
Skip to main content

Create

POST 

https://api.envizage.me/scenarios/:scenarioId/assets/portfolio/:portfolioId/allocation

Creates a new risk profile allocation to the given portfolio with {portfolioId} for the given time-frame under the Scenario with {scenarioId}.

Request

Path Parameters

    scenarioId stringrequired

    The scenario's id

    portfolioId stringrequired

    The portfolio's id

Body

required
    allocation double[]

    Array of custom allocation percentages, overrides profile.

    description string

    Description of the resource.

    endDate date-timerequired

    The end date of the allocation. Valid date string in simplified extended ISO-8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). Will be respected only in conjuction with endsOn equals to USER_DEFINED.

    endsOn stringrequired

    Possible values: [USER_DEFINED, ON_RETIREMENT, ON_DEATH]

    Can be any of USER_DEFINED, ON_RETIREMENT, ON_DEATH.

    id string

    The id of the resource.

    name string

    The name of the resource.

    profile string

    The risk profile of the portfolio.

    startDate date-timerequired

    The start date of the allocation. Valid date string in simplified extended ISO-8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). Will be respected only in conjuction with startsOn equals to USER_DEFINED.

    startsOn stringrequired

    Possible values: [USER_DEFINED, ON_RETIREMENT, ON_DEATH]

    Can be any of USER_DEFINED, ON_RETIREMENT, ON_DEATH.

Responses

Created

Schema
    allocation double[]

    Array of custom allocation percentages, overrides profile.

    description string

    Description of the resource.

    endDate date-timerequired

    The end date of the allocation. Valid date string in simplified extended ISO-8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). Will be respected only in conjuction with endsOn equals to USER_DEFINED.

    endsOn stringrequired

    Possible values: [USER_DEFINED, ON_RETIREMENT, ON_DEATH]

    Can be any of USER_DEFINED, ON_RETIREMENT, ON_DEATH.

    id string

    The id of the resource.

    name string

    The name of the resource.

    profile string

    The risk profile of the portfolio.

    startDate date-timerequired

    The start date of the allocation. Valid date string in simplified extended ISO-8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). Will be respected only in conjuction with startsOn equals to USER_DEFINED.

    startsOn stringrequired

    Possible values: [USER_DEFINED, ON_RETIREMENT, ON_DEATH]

    Can be any of USER_DEFINED, ON_RETIREMENT, ON_DEATH.

Authorization: openIdConnect

name: authenticationtype: openIdConnectscopes: scenarios:full,scenarios:writebearerFormat: JWTopenIdConnectUrl: https://id.production.envizage.me/realms/:realmId/protocol/openid-connectscheme: Bearer
curl -L -X POST 'https://api.envizage.me/scenarios/:scenarioId/assets/portfolio/:portfolioId/allocation' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"allocation": [
0.12,
0.05,
0.12,
0.15,
0.45,
0.11,
0,
0,
0
],
"description": "My resource'\''s description",
"endDate": "2023-07-26T12:27:29.363Z",
"endsOn": "ON_RETIREMENT",
"id": "1",
"name": "My resource",
"profile": "medium",
"startDate": "2023-07-26T12:27:29.363Z",
"startsOn": "USER_DEFINED"
}'
Request Collapse all
Base URL
https://api.envizage.me
Auth
Parameters
— pathrequired
— pathrequired
Body required
{
  "allocation": [
    0.12,
    0.05,
    0.12,
    0.15,
    0.45,
    0.11,
    0,
    0,
    0
  ],
  "description": "My resource's description",
  "endDate": "2023-07-26T12:27:29.363Z",
  "endsOn": "ON_RETIREMENT",
  "id": "1",
  "name": "My resource",
  "profile": "medium",
  "startDate": "2023-07-26T12:27:29.363Z",
  "startsOn": "USER_DEFINED"
}
ResponseClear

Click the Send API Request button above and see the response here!