Get all sub accounts

GET /api/v1/plans/{plan_uuid}/sub-accounts

Query parameters

  • include string

    Comma separated list of relationships to include in the response. Valid relationships are [latest_valuation].

  • Filter by a comma separated list of UUIDs.

  • sort string

    Field to sort by. Valid fields are [created_at, name]. Negative sign to denote DESC. Defaults to 'name'.

  • per_page integer

    Number of results to return with pagination (Default 15. Max 500).

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data array[object]

      Additional properties are allowed.

GET /api/v1/plans/{plan_uuid}/sub-accounts
curl \
 -X GET https://api.plannrcrm.com/api/v1/plans/plan_uuid/sub-accounts \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json"
Response examples (200)
{
  "data": [
    {
      "name": "John's ISA",
      "uuid": "10a3a488-3dca-4fe5-9a43-f7c2e4831d80",
      "created_at": "2024-11-20T13:24:02+00:00",
      "statistics": {
        "recent_growth": 100
      },
      "updated_at": "2024-11-20T13:24:02+00:00",
      "policy_number": "AVI-4837",
      "is_main_account": false,
      "active_portfolio": {
        "name": "Risky Portfolio",
        "uuid": "def54fb4-3771-46ab-86d6-d84f05b817f5",
        "created_at": "2024-11-20T13:24:02+00:00",
        "updated_at": "2024-11-20T13:24:02+00:00",
        "is_proposed": true,
        "proposed_at": "2024-11-20T00:00:00+00:00"
      },
      "latest_valuation": {
        "uuid": "1225c7b3-2ef0-4ca7-bc26-2efe96d17dc5",
        "value": {
          "amount": {
            "example": "4000",
            "description": "Money amount at their lowest denominator (for example: pennies)"
          },
          "currency": {
            "example": "GBP",
            "description": "Currency of the money"
          },
          "formatted": {
            "example": "£40.00",
            "description": "Money amount formatted with currency"
          }
        },
        "valued_at": "2024-11-20T13:24:02+00:00",
        "created_at": "2024-11-20T13:24:02+00:00",
        "updated_at": "2024-11-20T13:24:02+00:00",
        "sub_account": "App\\Http\\Resources\\Plans\\SubAccountResource"
      }
    }
  ]
}