To get the current SMA weightings assigned to an account, make a GET call to https://www.orioneclipse.com/v1/account/accounts/<eclipseAccountId>/sma.
Below is a sample response:
{
“selectedLevelId”: 3,
“weightings”: [
{
“id”: 60,
“subModelId”: 14601,
“subModelName”: “Nick – Subclass 1”,
“weightPercent”: 50,
“modelId”: 1178,
“modelDetailId”: 22096,
“isDeleted”: 0,
“createdOn”: “2024-11-06T15:32:30.000Z”,
“createdBy”: “Nicholas.Pedicino”,
“editedOn”: “2024-11-06T15:32:30.000Z”,
“editedBy”: “Nicholas.Pedicino”
},
{
“id”: 61,
“subModelId”: 14663,
“subModelName”: “Nick – Subclass 2”,
“weightPercent”: 50,
“modelId”: 1178,
“modelDetailId”: 22097,
“isDeleted”: 0,
“createdOn”: “2024-11-06T15:32:30.000Z”,
“createdBy”: “Nicholas.Pedicino”,
“editedOn”: “2024-11-06T15:32:30.000Z”,
“editedBy”: “Nicholas.Pedicino”
}
]
}
selectedLevelId – this shows the level of the model that is selected for the weightings.
To see what levels SMA weightings can be set at, make a GET call to https://www.orioneclipse.com/v1/account/accounts/<eclipseAccountId>/model/modelTypes, and that will return the levels associated with the assigned model, which is the value you would use when adding SMA weights.
Below is a sample response:
[{
“id”: 2,
“name”: “Class”
},
{
“id”: 3,
“name”: “Sub Class”
}
]
To see how many Subclasses there are within the model, make a GET call to
https://www.orioneclipse.com/v1/account/accounts/<eclipseAccountId>/model/submodels?modelTypeId=3, where modelTypeId of 3 is the value for Subclass from the previous call.
Below is a sample response:
[{
“subModelId”: 14601,
“subModelName”: “Nick – Subclass 1”,
“modelId”: 1178,
“modelDetailId”: 22096
},
{
“subModelId”: 14663,
“subModelName”: “Nick – Subclass 2”,
“modelId”: 1178,
“modelDetailId”: 22097
}
]
To add SMA weights on an account you will make a PUT call to https://www.orioneclipse.com/v1/account/accounts/<eclipseAccountId>/sma and provide the Level ID, weight % to be assigned, Model ID and Model Detail ID (model ID and model detail ID are both returned in the GET call to get submodels).
Below is a sample request to add SMA weights to an account:
{
“selectedLevelId”: 3,
“weightings”: [
{
“id”: null,
“subModelId”: 14601,
“weightPercent”: 75,
“modelId”: 1178,
“modelDetailId”: 22096
},
{
“id”: null,
“subModelId”: 14663,
“weightPercent”: 25,
“modelId”: 1178,
“modelDetailId”: 22097
}
]
}
If you want to add a new weighting, the ID will be null. But if you want to update existing weightings the ID should be listed.
Below is an example payload:
{
“selectedLevelId”: 3,
“weightings”: [
{
“id”: 62,
“subModelId”: 14601,
“weightPercent”: 50,
“modelId”: 1178,
“modelDetailId”: 22096
},
{
“id”: null,
“subModelId”: 14663,
“weightPercent”: 50,
“modelId”: 1178,
“modelDetailId”: 22097
}
]
}