Skip to content

Update Asset

PUT
/api/v1/assets/{id}
curl --request PUT \
--url https://indepai.app/api/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Vanguard FTSE All-World UCITS ETF", "assetType": "stock", "tickerSymbol": "VWCE.DE", "isin": "IE00BK5BQT80", "quantity": 50, "purchasePrice": 110.5, "currentPrice": 118.4, "purchaseDate": "2024-01-15", "currency": "EUR", "expenseRatio": 0.22, "geographicRegion": "Global", "sector": "Technology", "address": "ul. Marszałkowska 1", "city": "Warsaw", "countryCode": "PL", "categoryId": "550e8400-e29b-41d4-a716-446655440000", "portfolioId": "550e8400-e29b-41d4-a716-446655440000", "sellWillingnessTier": "gladly_sell", "bondFaceValue": 100, "bondFirstYearRate": 6, "bondMargin": 1, "bondRateType": "fixed", "bondCapitalization": "annual_compound", "bondMaturityDate": "2033-05-25", "bondSeries": "EDO0335", "bondEarlyRedemptionFee": 0.7 }'

Update an existing asset

id
required

Asset ID (UUID)

string format: uuid
Media typeapplication/json
object
name
required

Name of the asset

string
>= 1 characters <= 255 characters
Example
Vanguard FTSE All-World UCITS ETF
assetType
required

Type of asset

string
Allowed values: stock etf crypto real_estate cash bond other
Example
etf
tickerSymbol

Stock/ETF ticker symbol

string
<= 20 characters
Example
VWCE.DE
isin

International Securities Identification Number

string
>= 12 characters <= 12 characters
Example
IE00BK5BQT80
quantity
required

Number of units/shares held

number
> 0 <= 1000000000000000
Example
50
purchasePrice
required

Purchase price per unit

number
> 0 <= 1000000000000000
Example
110.5
currentPrice

User-supplied current price per unit (defaults to purchase price)

number
> 0 <= 1000000000000000
Example
118.4
purchaseDate

Date of purchase

string format: date
Example
2024-01-15
currency

Currency of the asset

string
default: EUR >= 3 characters <= 3 characters
Example
EUR
expenseRatio

Annual expense ratio for ETFs/funds (%)

number
<= 10
Example
0.22
geographicRegion

Geographic region of the asset

string
Example
Global
sector

Industry sector

string
Example
Technology
address

Street address for real_estate assets

string
<= 255 characters
Example
ul. Marszałkowska 1
city

City for real_estate assets

string
<= 120 characters
Example
Warsaw
countryCode

Country (ISO code or free text) for real_estate assets

string
<= 80 characters
Example
PL
categoryId
required

Category ID for grouping assets

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440000
portfolioId

Target portfolio (defaults to the user’s default portfolio)

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440000
sellWillingnessTier

Willingness to sell this asset to fund living costs

string
Allowed values: gladly_sell sell_if_needed avoid_selling
Example
sell_if_needed
bondFaceValue

Bond face value per unit (e.g. EDO = 100 PLN)

number
> 0 <= 1000000000000000
Example
100
bondFirstYearRate

Fixed year-1 coupon rate (% p.a.)

number
<= 100
Example
6
bondMargin

Margin over the reference rate for year 2+ (%)

number
<= 100
Example
1
bondRateType

How the bond’s coupon rate is determined after year 1

string
Allowed values: fixed cpi_plus_margin reference_plus_margin
Example
cpi_plus_margin
bondCapitalization

How bond interest is capitalized or paid out

string
Allowed values: annual_compound annual_payout at_maturity
Example
annual_compound
bondMaturityDate

Bond maturity date

string format: date
Example
2033-05-25
bondSeries

Bond series identifier

string
<= 20 characters
Example
EDO0335
bondEarlyRedemptionFee

Early redemption fee per unit (native currency)

number
<= 1000000000000000
Example
0.7

Asset updated

Media typeapplication/json
object
success
required
boolean
data
required
object
id
required

Asset ID

string format: uuid
userId
required

Owner user ID

string format: uuid
portfolioId
required

Owning portfolio ID

string | null format: uuid
name
required
string
assetType
required

Type of financial asset

string
Allowed values: stock etf crypto real_estate cash bond other
tickerSymbol
required
string | null
isin
required
string | null
quantity
required
number
purchasePrice
required
number
currentPrice
required
number | null
currentValue
required
number | null
valueEur
required
number | null
valueUsd
number | null
purchaseDate
required
string | null
currency
required
string
expenseRatio
required
number | null
geographicRegion
required
string | null
sector
required
string | null
address
string | null
city
string | null
countryCode
string | null
propertyValue
number | null
annualGrossRent
number | null
annualOperatingExpenses
number | null
mortgagePrincipal
number | null
mortgageRate
number | null
mortgageTermMonths
number | null
mortgageStartDate
string | null
mortgageType
string | null
Allowed values: fixed variable interest_only
downPayment
number | null
closingCosts
number | null
sellWillingnessTier

Willingness to sell this asset to fund living costs

string | null
Allowed values: gladly_sell sell_if_needed avoid_selling
bondFaceValue
number | null
bondFirstYearRate
number | null
bondMargin
number | null
bondRateType

How the bond’s coupon rate is determined after year 1

string | null
Allowed values: fixed cpi_plus_margin reference_plus_margin
bondCapitalization

How bond interest is capitalized or paid out

string | null
Allowed values: annual_compound annual_payout at_maturity
bondMaturityDate
string | null
bondSeries
string | null
bondEarlyRedemptionFee
number | null
marketQuote
object
price
required
number
> 0
currency
required
string
dailyChange
required
number | null
dailyChangePercent
required
number | null
asOf
required

Timestamp in ISO 8601 format

string | null format: date-time
source
required
string
status
required
string
Allowed values: fresh stale
categoryId
required

Unique identifier (UUID v4)

string format: uuid
categoryName
required
string
lastUpdated
required

Timestamp in ISO 8601 format

string | null format: date-time
createdAt
required

Timestamp in ISO 8601 format

string format: date-time
updatedAt
required

Timestamp in ISO 8601 format

string format: date-time
meta
required
object
timestamp
required

Timestamp in ISO 8601 format

string format: date-time
recalculated
boolean
Example
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"userId": "550e8400-e29b-41d4-a716-446655440000",
"portfolioId": "550e8400-e29b-41d4-a716-446655440000",
"assetType": "stock",
"mortgageType": "fixed",
"sellWillingnessTier": "gladly_sell",
"bondRateType": "fixed",
"bondCapitalization": "annual_compound",
"marketQuote": {
"asOf": "2024-01-15T10:30:00Z",
"status": "fresh"
},
"categoryId": "550e8400-e29b-41d4-a716-446655440000",
"lastUpdated": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
}
}

Validation error

Media typeapplication/json
object
success
required

Always false for error responses

boolean
error
required

Error type

string
code

Machine-readable error code

string
details

Detailed validation errors

Array<object>
object
path
required

Path to the invalid field

string
message
required

Error message

string
Example
{
"success": false,
"error": "Validation error",
"code": "VALIDATION_ERROR",
"details": [
{
"path": "currentAge",
"message": "Must be between 18 and 100"
}
]
}

Unauthorized

Media typeapplication/json
object
success
required

Always false for error responses

boolean
error
required

Error type

string
code

Machine-readable error code

string
details

Detailed validation errors

Array<object>
object
path
required

Path to the invalid field

string
message
required

Error message

string
Example
{
"success": false,
"error": "Validation error",
"code": "VALIDATION_ERROR",
"details": [
{
"path": "currentAge",
"message": "Must be between 18 and 100"
}
]
}

Asset not found

Media typeapplication/json
object
success
required

Always false for error responses

boolean
error
required

Error type

string
code

Machine-readable error code

string
details

Detailed validation errors

Array<object>
object
path
required

Path to the invalid field

string
message
required

Error message

string
Example
{
"success": false,
"error": "Validation error",
"code": "VALIDATION_ERROR",
"details": [
{
"path": "currentAge",
"message": "Must be between 18 and 100"
}
]
}