Restricted Plans allow you to create a list of securities that are available to be purchased in an account. For example, you may use this for clients with a 401(k) that are unable to vary from a set of securities. A Restricted Plan limits the securities that are purchased in that account while allowing other accounts in the portfolio to purchase any security targeted in the model.
Get Restricted Plans List
This endpoint returns a list of active Restricted Plans in the database.
GET https://baseurl/v1/restrictedPlans
Sample Response
[
{
"id": 1,
"name": "NorthStar Employee 401k Plan",
"useInTradeFile": 1,
"accountCount": 2,
"createdBy": "Riley.Lambert",
"editedBy": "Seth.Kong",
"createdOn": "2018-02-06T04:39:30.000Z",
"editedOn": "2023-10-17T18:43:34.000Z",
"externalPlanId": "RP_401_EXTERNAL_01"
},
{
"id": 2,
"name": "RP",
"useInTradeFile": 0,
"accountCount": 1,
"createdBy": "Riley.Lambert",
"editedBy": "Riley.Lambert",
"createdOn": "2018-02-21T22:03:18.000Z",
"editedOn": "2018-02-21T22:03:18.000Z",
"externalPlanId": "RP_401_EXTERNAL_02"
},
{
"id": 3,
"name": "Test Restricted Plans",
"useInTradeFile": 1,
"accountCount": 0,
"createdBy": "Dibya.Shakya",
"editedBy": "Dibya.Shakya",
"createdOn": "2023-11-24T15:05:23.000Z",
"editedOn": "2023-11-24T15:05:23.000Z",
"externalPlanId": null
}
]
Search Restricted Plans
GET https://baseurl/v1/restrictedPlans?search=<searchTerm>
property | description | required | datatype |
searchTerm | specifies search term which is used to filter restricted plans whose name containing search term. | Yes | String |
Sample Request
GET https://baseurl/v1/restrictedPlans?search=employee
Sample Response
[
{
"id": 1,
"name": "NorthStar Employee 401k Plan",
"useInTradeFile": 1,
"externalPlanId": "RP_401_EXTERNAL_01",
"accountCount": 2,
"createdBy": "Riley.Lambert",
"editedBy": "Seth.Kong",
"createdOn": "2018-02-06T04:39:30.000Z",
"editedOn": "2023-10-17T18:43:34.000Z"
}
]
Get Restricted Plan Details
Using Id
GET https://baseurl/v1/restrictedPlans?id=<id>
property | description | required | datatype |
id | restricted plan id | Yes | Integer |
Sample Request
GET https://baseurl/v1/restrictedPlans?id=5
Sample Response
{
"id": 5,
"name": "Test Restricted Plans",
"useInTradeFile": 0,
"externalPlanId": "RP_TEST_EXTERNAL_05",
"securities": [
{
"securityId": 45902,
"securityName": "TestMF15.4",
"securitySymbol": "TestMF15.4",
"type": "Mutual Fund",
"doNotBuyGroupEquivalency": 0,
"class": "Uncategorized",
"category": "Equity",
"subClass": "Security",
"createdBy": "Dibya.Shakya",
"editedBy": "Dibya.Shakya",
"createdOn": "2023-11-28T20:47:34.000Z",
"editedOn": "2023-11-28T20:49:07.000Z",
"sellPriorityId": 4,
"sellPriority": "Can Sell",
"buyPriorityId": null,
"buyPriority": null
}
]
}
Using External Plan Id
GET https://baseurl/v1/restrictedPlans?externalPlanId=<externalPlanId>
property | description | required | datatype |
externalPlanId | External Plan Id | Yes | String |
Sample Request
GET https://baseurl/v1/restrictedPlans?externalPlanId=RP_TEST_EXTERNAL_05
Sample Response
{
"id": 5,
"name": "Test Restricted Plans",
"useInTradeFile": 0,
"externalPlanId": "RP_TEST_EXTERNAL_05",
"securities": [
{
"securityId": 45902,
"securityName": "TestMF15.4",
"securitySymbol": "TestMF15.4",
"type": "Mutual Fund",
"doNotBuyGroupEquivalency": 0,
"class": "Uncategorized",
"category": "Equity",
"subClass": "Security",
"createdBy": "Dibya.Shakya",
"editedBy": "Dibya.Shakya",
"createdOn": "2023-11-28T20:47:34.000Z",
"editedOn": "2023-11-28T20:49:07.000Z",
"sellPriorityId": 4,
"sellPriority": "Can Sell",
"buyPriorityId": null,
"buyPriority": null
}
]
}
Delete Restricted Plan
DELETE https://baseurl/v1/restrictedPlans?id=<id>
property | description | required | datatype |
id | Restricted Plan Id | Yes | Integer |
Sample Request
DELETE https://baseurl/v1/restrictedPlans?id=3
Sample Response
{
"id": "3",
"message": "Restricted plan deleted successfully"
}
Add Restricted Plan
POST https://baseurl/v1/restrictedPlans
BODY
property | description | required | datatype |
name | name of restricted plan | Yes | String |
useInTradeFile | If set to true the trade file goes to a restricted plan file, rather than the custodian trade file | No | Boolean |
securities | list of securities | Yes | Object |
securityId | security id | Yes | Integer |
doNotBuyGroupEquivalency | If set to true this makes sure the security doesn’t get purchased in a non-restricted plan account | No | Boolean |
buyPriorityId | Buy Priority Id | No | Integer |
buyPriority | Buy Priority Description If you are setting a Buy Priority, both the buyPriorityId and buyPriority are required | No | String |
sellPriorityId | Sell Priority Id | No | Integer |
sellPriority | Sell Priority Description If you are setting a Sell Priority, both the sellPriorityId and sellPriority are required | No | String |
externalPlanId | External Plan Id | No | String |
Sample Request
{
"securities": {
"securities": [
{
"securityId": 37818,
"securityName": "TestEQ13.5",
"securitySymbol": "TestEQ13.5",
"buyPriority": null,
"sellPriority": null,
"doNotBuyGroupEquivalency": true,
"buyPriorityId": 0,
"sellPriorityId": 0
},
{
"securityId": 45902,
"securityName": "TestMF15.4",
"securitySymbol": "TestMF15.4",
"buyPriority": null,
"sellPriority": null,
"doNotBuyGroupEquivalency": true,
"buyPriorityId": 0,
"sellPriorityId": 0
}
]
},
"name": "Test Restricted Plans",
"externalPlanId": "Test_RP_001",
"useInTradeFile": true,
"id": null
}
Sample Response
{
"id": 5,
"name": "Test Restricted Plans",
"useInTradeFile": 0,
"securities": [
{
"securityId": 45902,
"securityName": "TestMF15.4",
"securitySymbol": "TestMF15.4",
"type": "Mutual Fund",
"class": "Security",
"category": "Equity",
"buyPriority": 0,
"sellPriority": 0,
"createdBy": "Dibya.Shakya",
"editedBy": "Dibya.Shakya",
"createdOn": "2023-11-28T17:35:38.000Z",
"editedOn": "2023-11-28T17:35:38.000Z",
"doNotBuyGroupEquivalency": 1
},
{
"securityId": 37818,
"securityName": "TestEQ13.5",
"securitySymbol": "TestEQ13.5",
"type": "Equity",
"class": "Security",
"category": "Equity",
"buyPriority": 0,
"sellPriority": 0,
"createdBy": "Dibya.Shakya",
"editedBy": "Dibya.Shakya",
"createdOn": "2023-11-28T17:35:38.000Z",
"editedOn": "2023-11-28T17:35:38.000Z",
"doNotBuyGroupEquivalency": 1
}
]
}
Edit Restricted Plan
PUT https://baseurl/v1/restrictedPlans?id=<id>
BODY
property | description | required | datatype |
id | Restricted Plan Id | Yes | Integer |
externalPlanId | External Plan Id | No | String |
name | name of restricted plan | Yes | String |
useInTradeFile | If set to true the trade file goes to a restricted plan file, rather than the custodian trade file | No | Boolean |
securities | list of securities | Yes | Object |
deletedSecurities | list of security ids. It can be empty list. | Yes | List |
securityId | security id | Yes | Integer |
doNotBuyGroupEquivalency | If set to true this makes sure the security doesn’t get purchased in a non-restricted plan account | No | Boolean |
buyPriorityId | Buy Priority Id | No | Integer |
buyPriority | Buy Priority Description If you are setting a Buy Priority, both the buyPriorityId and buyPriority are required | No | String |
sellPriorityId | Sell Priority Id | No | Integer |
sellPriority | Sell Priority Description If you are setting a Sell Priority, both the sellPriorityId and sellPriority are required | No | String |
Sample Request
PUT https://baseurl/v1/restrictedPlans?id=5
{
"id": 5,
"name": "Test Restricted Plans",
"externalPlanId": "Test_RP_005",
"useInTradeFile": 1,
"securities": {
"securities": [
{
"securityId": 45902,
"securityName": "TestMF15.4",
"securitySymbol": "TestMF15.4",
"doNotBuyGroupEquivalency": true,
"sellPriorityId": 0,
"sellPriority": null,
"buyPriorityId": 0,
"buyPriority": null
}
],
"deletedSecurities": [
37818
]
}
}
Sample Response
{
"id": 5,
"name": "Test Restricted Plans",
"externalPlanId": "Test_RP_005",
"useInTradeFile": 1,
"securities": [
{
"securityId": 45902,
"securityName": "TestMF15.4",
"securitySymbol": "TestMF15.4",
"type": "Mutual Fund",
"doNotBuyGroupEquivalency": 1,
"class": "Uncategorized",
"category": "Equity",
"subClass": "Security",
"createdBy": "Dibya.Shakya",
"editedBy": "Dibya.Shakya",
"createdOn": "2023-11-28T20:47:34.000Z",
"editedOn": "2023-12-01T20:31:19.000Z",
"sellPriorityId": null,
"sellPriority": null,
"buyPriorityId": null,
"buyPriority": null
}
]
}
Sell Priority Possible Values
GET https://baseurl/v1/security/securityset/sellpriority
Sell Priority Id | Sell Priority Description |
1 | Do Not Sell |
2 | Hard To Sell |
3 | Sell If No Gain |
4 | Can Sell |
5 | Sell To Target |
6 | Priority Sell |
Buy Priority Possible Values
GET https://baseurl/v1/security/securityset/buypriority
Buy Priority Id | Buy Priority Description |
1 | Do Not Buy |
2 | Hard To Buy |
3 | Can Buy |
4 | Buy To Target |
5 | Priority Buy |
6 | Preferred if held |