Create a holding

POST /api/v1/plans/{plan_uuid}/sub-accounts/{subAccount_uuid}/holdings

Headers

Path parameters

application/json

Body Required

  • fund_name string Required

    The name of the fund for the holding.

  • The reference of the holding/fund.

  • provider string

    The provider of the holding/fund.

  • sector string

    The sector of the holding/fund.

  • sedol string

    The SEDOL of the holding/fund.

  • isin string

    The ISIN of the holding/fund.

  • citi string

    The CITI of the holding/fund.

  • units number Required

    The units of the holding

  • unit_price integer

    The current price of the units in pennies.

  • The current price of the units in it's raw format with decimals.

  • The original purchase price of the holding in pennies.

  • is_active boolean

    Denotes if the holding is active/inactive.

  • Optional UUID of a portfolio to add the holding to.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
POST /api/v1/plans/{plan_uuid}/sub-accounts/{subAccount_uuid}/holdings
curl \
 -X POST https://api.plannrcrm.com/api/v1/plans/plan_uuid/sub-accounts/subAccount_uuid/holdings \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -d '{"fund_name":"My Fund","reference":"ABC12345","provider":"Financial Provider","sector":"Europe","sedol":"ABC12345","isin":"ABC12345","citi":"ABC12345","units":10.0,"unit_price":10000,"unit_price_raw":100.2334234,"purchase_price":5000,"is_active":true,"portfolio_uuid":"dcbd4fad-38f7-4897-b00a-d203230a6ff9"}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json

# Payload
{
  "fund_name": "My Fund",
  "reference": "ABC12345",
  "provider": "Financial Provider",
  "sector": "Europe",
  "sedol": "ABC12345",
  "isin": "ABC12345",
  "citi": "ABC12345",
  "units": 10.0,
  "unit_price": 10000,
  "unit_price_raw": 100.2334234,
  "purchase_price": 5000,
  "is_active": true,
  "portfolio_uuid": "dcbd4fad-38f7-4897-b00a-d203230a6ff9"
}
Response examples (200)
{
  "citi": "ACB123",
  "isin": "ACB123",
  "uuid": "47eb57b3-b2c4-4eb5-b2a6-375936b5a68e",
  "sedol": "ACB123",
  "units": 5,
  "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"
    }
  },
  "sector": "Europe",
  "fund_name": "Fund",
  "is_active": true,
  "reference": "REF123",
  "created_at": "2024-10-16T11:10:16+01:00",
  "unit_price": {
    "amount": {
      "example": "1000",
      "description": "Money amount at their lowest denominator (for example: pennies)"
    },
    "currency": {
      "example": "GBP",
      "description": "Currency of the money"
    },
    "formatted": {
      "example": "£10.00",
      "description": "Money amount formatted with currency"
    }
  },
  "updated_at": "2024-10-16T11:10:16+01:00",
  "sub_account": {
    "name": "John's ISA",
    "uuid": "51444d1e-f197-441e-af2e-d1ff32f22255",
    "created_at": "2024-10-16T11:10:16+01:00",
    "statistics": {
      "recent_growth": 100
    },
    "updated_at": "2024-10-16T11:10:16+01:00",
    "policy_number": "AVI-4837",
    "is_main_account": false,
    "active_portfolio": "App\\Http\\Resources\\Plans\\PortfolioResource",
    "latest_valuation": "App\\Http\\Resources\\Plans\\ValuationResource"
  },
  "purchase_price": {
    "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"
    }
  },
  "unit_price_raw": 10
}