Skip to content
MCPProductWhat you sellProduct

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.

Text
do: return await $.Product.update(input)

Emits Product.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Product.
namestringThe name of the Product.
promisetextWhat the Customer can rely on.

Returns

OutputTypeRequiredDescription
productProductrequiredThe Product.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.

Text
do: return await $.Product.delete(input)

Emits Product.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Product.

Returns

OutputTypeRequiredDescription
productProductrequiredThe Product.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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' })"
  }
}