Get Asset
GET
/api/v1/assets/{id}
const url = 'https://indepai.app/api/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://indepai.app/api/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Get a single asset by ID
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
Asset ID (UUID)
string format: uuid
Responses
Section titled “Responses”Asset details
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
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
downPayment
number | null
closingCosts
number | null
sellWillingnessTier
Willingness to sell this asset to fund living costs
string | null
bondFaceValue
number | null
bondFirstYearRate
number | null
bondMargin
number | null
bondRateType
How the bond’s coupon rate is determined after year 1
string | null
bondCapitalization
How bond interest is capitalized or paid out
string | null
bondMaturityDate
string | null
bondSeries
string | null
bondEarlyRedemptionFee
number | null
marketQuote
object
price
required
number
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
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" }}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" } ]}