---
title: "Updates a holding's note."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › portfolio

`PATCH /v1/stores/{store}/products/{product}/portfolio/holdings/{holding}`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `portfolio:write`

## Path parameters

- `store` (`updateHolding.path.store`; string, required) — The store's id.
- `product` (`updateHolding.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1
- `holding` (`updateHolding.path.holding`; string, required)
  - minLength 1

## Header parameters

- `Idempotency-Key` (`updateHolding.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Optional._

- `note` (`updateHolding.note`; any of, optional)
  - any of: `string`, `null`

## Example request

```json
{
  "note": "string"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/portfolio/holdings/<holding>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "note": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/portfolio/holdings/<holding>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({note: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/portfolio/holdings/<holding>"

payload = { "note": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Updates a holding's note.

#### Example

```json
{
  "id": "string",
  "portfolio_id": "string",
  "symbol": "string",
  "shares": 0,
  "avg_cost": 0,
  "cost_currency": "string",
  "cost_exponent": 0,
  "price_currency": "string",
  "price_exponent": 0,
  "name": "string",
  "symbol_type": "string",
  "currency": "string",
  "note": "string",
  "removed_note": "string",
  "removed_at": "string",
  "updated_at": "string",
  "metadata": {
    "property1": true,
    "property2": true
  }
}
```

- `id` (`updateHolding.response.200.id`; string, required)
- `portfolio_id` (`updateHolding.response.200.portfolio_id`; string, required)
- `symbol` (`updateHolding.response.200.symbol`; string, required)
- `shares` (`updateHolding.response.200.shares`; number, required)
- `avg_cost` (`updateHolding.response.200.avg_cost`; any of, required)
  - any of: `number`, `null`
- `cost_currency` (`updateHolding.response.200.cost_currency`; string, required)
- `cost_exponent` (`updateHolding.response.200.cost_exponent`; any of, required)
  - any of: `number`, `null`
- `price_currency` (`updateHolding.response.200.price_currency`; string, required)
- `price_exponent` (`updateHolding.response.200.price_exponent`; any of, required)
  - any of: `number`, `null`
- `name` (`updateHolding.response.200.name`; string, required)
- `symbol_type` (`updateHolding.response.200.symbol_type`; any of, required)
  - any of: `string`, `null`
- `currency` (`updateHolding.response.200.currency`; any of, required)
  - any of: `string`, `null`
- `note` (`updateHolding.response.200.note`; any of, required)
  - any of: `string`, `null`
- `removed_note` (`updateHolding.response.200.removed_note`; any of, required)
  - any of: `string`, `null`
- `removed_at` (`updateHolding.response.200.removed_at`; any of, required)
  - any of: `string`, `null`
- `updated_at` (`updateHolding.response.200.updated_at`; any of, required)
  - any of: `string`, `null`
- `metadata` (`updateHolding.response.200.metadata`; map<any of>, required)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`updateHolding.response.default.type`; string, required)
  - format `uri`
- `title` (`updateHolding.response.default.title`; string, required)
- `status` (`updateHolding.response.default.status`; integer, required)
- `detail` (`updateHolding.response.default.detail`; string, required)
- `code` (`updateHolding.response.default.code`; string, optional)
- `context` (`updateHolding.response.default.context`; object, optional)
- `reached_core` (`updateHolding.response.default.reached_core`; boolean, optional)
- `core_answer` (`updateHolding.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/update-holding/index.md
