Product programs: update, delete
The Product Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Product, one group of Product programs.
Product.update
Changes the given properties of a Product. Verb page.
do: return await $.Product.update(input)Emits Product.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Product. |
name | string | The name of the Product. | |
promise | text | What the Customer can rely on. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
product | Product | required | The Product. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"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.
do: return await $.Product.delete(input)Emits Product.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Product. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
product | Product | required | The Product. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Product.delete({ id: 'prod_MJmgS5dysq' })"
}
}