# Market programs: update, delete

URL: /code/mcp/market/records-update · Id: `page:code/mcp/market/records-update`

> The Market Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

Reference for [Market](/business/nouns/market), one group of [Market programs](/code/mcp/market).

### Market.update
Changes the given properties of a Market. [Verb page](/business/nouns/market/update?interface=mcp).

```text
do: return await $.Market.update(input)
```

Emits `Market.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Market. |
| `countries` | `string[]` | No | ISO 3166-1 alpha-2 country codes. |
| `currency` | `string` | No | The ISO 4217 currency Prices show in. |
| `locales` | `string[]` | No | BCP 47 locale tags, the default first. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | [Market](/business/nouns/market) | Yes | The Market. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Market.update({ id: 'market_4uFEzN14G4', currency: 'USD' })"
  }
}
```

### Market.delete
Deletes a Market: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/market/delete?interface=mcp).

```text
do: return await $.Market.delete(input)
```

Emits `Market.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Market. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | [Market](/business/nouns/market) | Yes | The Market. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Market.delete({ id: 'market_4uFEzN14G4' })"
  }
}
```