You can add a multi-value property to most types of entity. Adding a single-value property.
For example, you could add a Portfolio/Manager/Name property to a portfolio to record the names of all its managers.
Once added, you can update a multi-value property at any time. If you no longer need a multi-value property, you can delete it.
Using the LUSID REST API
Each entity type adheres to a specific methodology for adding multi-value properties to entities:
If an entity type has an
Upsert*API (for example UpsertInstruments), you can add multi-value properties when you create or update entities (that is, at any time). There may be a dedicated property API that you can use independently if you want, for example UpsertInstrumentProperties.If an entity type has a
Create*API (for example CreatePortfolio), you can add multi-value properties when you create entities. Subsequently, you must use a dedicated property API, for example UpsertPortfolioProperties.
For example, to add a multi-value Portfolio/Manager/Name property to a transaction portfolio when you create it, call the CreatePortfolio API and append to the properties collection:
The
keymust be a 3-stage property key in thePortfoliodomain.The
valuemust be alabelValueSetobject consisting of avaluesarray with a comma-separated list of string values. If the underlying property type has:A
collectionTypeofSet, these values are unordered and must be unique.A
collectionTypeofArray, values are ordered and can be duplicated. More information.
effectiveFromis nominally optional but for a time-variant multi-value property sets the 'start date' for all the values; it must a valid date.
curl -X POST "https://<your-domain>.lusid.com/api/api/transactionportfolios/examplescope"
-H "Authorization: Bearer <your-API-access-token>"
-H "Content-Type: application/json"
-d '{
"displayName": "Portfolio UK",
"code": "PortfolioUK",
"created": "2020-01-01",
"baseCurrency": "GBP",
"properties": {
"Portfolio/Manager/Name": {
"key": "Portfolio/Manager/Name",
"value": {
"labelValueSet": {
"values": [
"Joe Bloggs",
"Jane Doe",
"Matt Smith"
]
}
},
"effectiveFrom": "2022-01-01T09:00:00.0000000+00:00"
}
}
}'portfolios_api = lusid_api_factory.build(lusid.api.TransactionPortfoliosApi)
portfolio_request = lusid.models.CreateTransactionPortfolioRequest(
display_name="Portfolio UK",
code="PortfolioUK",
base_currency="GBP",
created=datetime.datetime(2020, 1, 1, 0, 0, 0, tzinfo=datetime.timezone.utc),
properties={
"Portfolio/Manager/Name": lusid.models.ModelProperty(
key="Portfolio/Manager/Name",
value=lusid.models.PropertyValue(
label_value_set=lusid.models.LabelValueSet(
values=["Joe Bloggs", "Jane Doe", "Matt Smith"]
)
),
effective_from=datetime.datetime(2022, 1, 1, 9, 0, 0, tzinfo=datetime.timezone.utc)
)
}
)
try:
portfolio_response = portfolios_api.create_portfolio(
create_transaction_portfolio_request=portfolio_request,
scope = "examplescope"
)
except lusid.ApiException as e:
print(e)Using Luminesce
You must first ‘inline’ properties into entity providers before you can add properties to entities using Luminesce. More information.
Using the LUSID web app
You can use the LUSID web app to add a multi-value property to an entity.
For example, to add a multi-value Portfolio/Manager/Name property to a transaction portfolio:
Sign in to the LUSID web app.
Use the left-hand menu to navigate to Data Management > Portfolios:
.png?sv=2022-11-02&spr=https&st=2026-03-25T05%3A42%3A25Z&se=2026-03-25T05%3A54%3A25Z&sr=c&sp=r&sig=rqwpVJ5u4sHXAChzBeRCGjIzSs%2F0o71eO5NPuYJaHuA%3D)
Select Edit on the portfolio you want to add the property to:
.png?sv=2022-11-02&spr=https&st=2026-03-25T05%3A42%3A25Z&se=2026-03-25T05%3A54%3A25Z&sr=c&sp=r&sig=rqwpVJ5u4sHXAChzBeRCGjIzSs%2F0o71eO5NPuYJaHuA%3D)
Select Add property and choose one or more properties to add to the portfolio:
.png?sv=2022-11-02&spr=https&st=2026-03-25T05%3A42%3A25Z&se=2026-03-25T05%3A54%3A25Z&sr=c&sp=r&sig=rqwpVJ5u4sHXAChzBeRCGjIzSs%2F0o71eO5NPuYJaHuA%3D)
Provide line-separated values for the property and save your changes:
.png?sv=2022-11-02&spr=https&st=2026-03-25T05%3A42%3A25Z&se=2026-03-25T05%3A54%3A25Z&sr=c&sp=r&sig=rqwpVJ5u4sHXAChzBeRCGjIzSs%2F0o71eO5NPuYJaHuA%3D)