# Product Template

URL: /business/nouns/product-template · Id: `noun:product-template`

> A Product Template is a reusable definition of one kind of Product: what it sells, who supplies the work, who buys, and how it earns.

A Product Template is a reusable definition of one kind of [Product](/business/nouns/product): what it sells, who supplies the work, who buys, and how it earns.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | `string` | Yes | The page path under `/start/templates/products`. |
| `kind` | `string` | Yes | The abstract Product: `data`, `software`, `agent`, or `service`. |
| `supply` | `string` | Yes | Who supplies the work: `digital`, which is unlimited, or `human`, which is recruited and credentialed. |
| `worker` | `string` | Yes | Who does the work: `agents`, `humans`, or `agents-and-humans`. |
| `buyer` | `string` | Yes | Who buys: `human`, `agent`, or `human-or-agent`. |
| `earningModel` | `string` | Yes | How it earns: `subscription`, `usage`, `commerce`, `marketplace`, or `directory`. |
| `assurance` | `text` | No | What the buyer can rely on, in one sentence. |

## Object
```json
{
  "$id": "https://api.sb/kilnbakery.com/product-templates/product_template_1",
  "$type": "ProductTemplate",
  "slug": "kiln-bakery",
  "kind": "data",
  "supply": "Example supply",
  "worker": "agents",
  "buyer": "human",
  "earningModel": "subscription",
  "assurance": "Example assurance"
}
```

## Relationships
- <a id="rel-built-from"></a>A Product Template **is built from** many [Product Templates](/business/nouns/product-template): a Product Template built on others, such as a [Service](/business/nouns/service) run on [Software](/business/nouns/software), inherits their coverage, cost and assurance. `builtFrom`, inverse `underlies`.
- <a id="rel-combined-in"></a>A Product Template **is combined in** many [Startup Templates](/business/nouns/startup-template): a [Startup Template](/business/nouns/startup-template) combines one or more Product Templates, each one kind of [Product](/business/nouns/product) its [Startups](/business/nouns/startup) sell. `combinedIn`, inverse [`combines`](/business/nouns/startup-template#rel-combines).
- <a id="rel-underlies"></a>A Product Template **underlies** many [Product Templates](/business/nouns/product-template): a Product Template built on others, such as a [Service](/business/nouns/service) run on [Software](/business/nouns/software), inherits their coverage, cost and assurance. `underlies`, inverse `builtFrom`.

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| <a id="create"></a>[ProductTemplate.create](/business/nouns/product-template/create) | Creates a Product Template. Inherited from [Noun](/business/nouns/noun). | None. | `ProductTemplate.created` | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[ProductTemplate.get](/business/nouns/product-template/get) | Returns one Product Template by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[ProductTemplate.list](/business/nouns/product-template/list) | Returns Product Templates, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[ProductTemplate.update](/business/nouns/product-template/update) | Changes the given properties of a Product Template. Inherited from [Noun](/business/nouns/noun). | None. | `ProductTemplate.updated` | Two-way: `try`, `send`, `do` |
| <a id="delete"></a>[ProductTemplate.delete](/business/nouns/product-template/delete) | Deletes a Product Template; its history is kept. Inherited from [Noun](/business/nouns/noun). | None. | `ProductTemplate.deleted` | One-way: `send`, `do` |

## Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `ProductTemplate.create` | Yes | Yes | Yes | No |
| `ProductTemplate.get` | Yes | Yes | Yes | Yes |
| `ProductTemplate.list` | Yes | Yes | Yes | Yes |
| `ProductTemplate.update` | Yes | Yes | Yes | No |
| `ProductTemplate.delete` | Yes | Yes | Yes | No |

## Call it

**Ask**

```text
Add a product template to RouteWise.
```

**API**

```bash
curl -X POST https://api.sb/routewise.dev/product-templates \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"route-wise","kind":"data","supply":"Example supply","worker":"agents","buyer":"human","earningModel":"subscription"}'
```

```json
{
  "api": "https://api.sb/routewise.dev",
  "productTemplate": {
    "$id": "https://api.sb/routewise.dev/product-templates/product_template_1",
    "$type": "ProductTemplate",
    "slug": "route-wise",
    "kind": "data",
    "supply": "Example supply",
    "worker": "agents"
  },
  "action": {
    "$id": "https://api.sb/routewise.dev/actions/action_1",
    "operation": "ProductTemplate.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/routewise.dev/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const productTemplate = await $.ProductTemplate.create({ slug: 'route-wise', kind: 'data', supply: 'Example supply', worker: 'agents', buyer: 'human', earningModel: 'subscription' })
```

**CLI**

```bash
npx startup-builder do ProductTemplate.create --json '{"slug":"route-wise","kind":"data","supply":"Example supply","worker":"agents","buyer":"human","earningModel":"subscription"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.ProductTemplate.create({ slug: 'route-wise', kind: 'data', supply: 'Example supply', worker: 'agents', buyer: 'human', earningModel: 'subscription' })"
  }
}
```

## Example
The [SaaS](/products/templates/saas) Product Template gives a new invoice-tracking app its [Nouns](/business/nouns/noun), [Verbs](/business/nouns/verb), [Interfaces](/business/nouns/interface), [Pages](/business/nouns/page) and default [Offers](/business/nouns/offer). The [Startup](/business/nouns/startup) changes only its [Problem](/business/nouns/problem), [Price](/business/nouns/price) and data.