# Product programs: update, delete

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

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

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

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

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

Emits `Product.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Product. |
| `name` | `string` | No | The name of the Product. |
| `promise` | `text` | No | What the Customer can rely on. |

**Returns**

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

**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 $.Product.update({ id: 'prod_MJmgS5dysq', name: 'Leaseline' })"
  }
}
```

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

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

Emits `Product.deleted`.

**Inputs**

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

**Returns**

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

**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 $.Product.delete({ id: 'prod_MJmgS5dysq' })"
  }
}
```