---
title: "Update Gem Investment"
method: PATCH
path: "/api/v1/gems/{gem_id}/investment"
tags: ["Gemstones"]
---

# Update Gem Investment

`PATCH /api/v1/gems/{gem_id}/investment`

## Request

- Base URL: `https://api.gemstoneaiapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gemstoneaiapp.com/api/v1/gems/{gem_id}/investment`
- Auth: none declared

PATCH /api/v1/gems/{gem_id}/investment (LNK-MKT2)
Set or clear the gem's purchase price / date. Owner-only — same user/device
ownership rules as other gem mutations (authenticated users own by user_id,
anonymous devices by X-Device-Id). Null purchase_price_usd clears the
investment data. Returns the updated "investment" block (null when cleared).

## Path parameters

- `gem_id` integer, required

## Headers

- `X-Device-Id` integer, nullable
- `authorization` string, nullable

## Request body

- InvestmentUpdateRequest: Body for PATCH /api/v1/gems/{gem_id}/investment. Null price clears the investment data (purchase_date is cleared with it).
  - `purchase_price_usd` number, nullable
  - `purchase_date` string, date, nullable

## Response `200`

Successful Response

- GemInvestmentBlock: Additive per-gem "investment" block (LNK-MKT2). The whole block is null when the user never set a purchase price. unrealized_gain_usd is null when the gem has no usable est value; unrealized_gain_pct additionally when the purchase price is 0.
  - `purchase_price_usd` number, required
  - `purchase_date` string, date, nullable
  - `unrealized_gain_usd` number, nullable
  - `unrealized_gain_pct` number, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api.md) · [All operations](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/revisions/fcb441f55161?raw)
