# Product

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

> A Product is what a Customer gets from a Startup, with a promise the Customer can rely on.

A Product is what a [Customer](/business/nouns/customer) gets from a [Startup](/business/nouns/startup), with a promise the Customer can rely on. An [Offer](/business/nouns/offer) sells it at a [Price](/business/nouns/price); the Product itself carries none.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | The name of the Product. |
| `promise` | `text` | Yes | What the Customer can rely on. |
| `status` | `string` | Yes | One of `draft`, `selling` or `retired`, set by its Offers. |

## Object
```json
{
  "$id": "https://api.sb/routewise.dev/products/product_1",
  "$type": "Product",
  "name": "RouteWise",
  "promise": "A route plan for 500 stops in under two seconds.",
  "status": "draft"
}
```

## Relationships
- <a id="rel-builds-into"></a>A Product **builds into** many [Products](/business/nouns/product): a Product composes other Products; a change to a part reaches every Product built from it. `buildsInto`, inverse `builtFrom`.
- <a id="rel-built-from"></a>A Product **is built from** many [Products](/business/nouns/product): a Product composes other Products; a change to a part reaches every Product built from it. `builtFrom`, inverse `buildsInto`.
- <a id="rel-draws-on"></a>A Product **draws on** many [Sources](/business/nouns/source): a Product keeps its promise with [Sources](/business/nouns/source) it did not build: owned, wrapped, or recruited. `drawsOn`, inverse [`supplies`](/business/nouns/source#rel-supplies).
- <a id="rel-implementations"></a>A Product **has** many [Implementations](/business/nouns/implementation): an [Implementation](/business/nouns/implementation) runs an [Interface](/business/nouns/interface), [System](/business/nouns/system) or [Verb](/business/nouns/verb) of one Product. `implementations`, inverse [`runs`](/business/nouns/implementation#rel-runs).
- <a id="rel-included-in"></a>A Product **is included in** many [Offers](/business/nouns/offer): each [Offer](/business/nouns/offer) sells one Product; one Product sits inside many Offers at different prices and terms. `includedIn`, inverse [`includes`](/business/nouns/offer#rel-includes).
- <a id="rel-made-by"></a>A Product **is made by** one [Startup](/business/nouns/startup): each Product belongs to exactly one [Startup](/business/nouns/startup), which builds it and stands behind its promise. `madeBy`, inverse [`makes`](/business/nouns/startup#rel-makes).
- <a id="rel-publication"></a>A Product **has** one [Publication](/business/nouns/publication): a Product reaches its [Customers](/business/nouns/customer) through one [Publication](/business/nouns/publication); nothing inside it names the platform. `publication`, inverse [`publishes`](/business/nouns/publication#rel-publishes).
- <a id="rel-reached-via"></a>A Product **is reached via** many [Interfaces](/business/nouns/interface): each [Interface](/business/nouns/interface) exposes one Product; a Product is reached through many Interfaces. `reachedVia`, inverse [`reaches`](/business/nouns/interface#rel-reaches).

## Lifecycle

| State | Meaning | Moves to |
| --- | --- | --- |
| `draft` (first) | Defined, with no published Offer selling it. | `selling` on [`Offer.published`](/business/events/Offer.published) when the Offer is the first published Offer on this Product |
| `selling` | At least one published Offer sells it. | `retired` on [`Offer.withdrawn`](/business/events/Offer.withdrawn) when the last published Offer on this Product is withdrawn |
| `retired` | No published Offer sells it; Customers keep what their Orders and Subscriptions bought. | `selling` on [`Offer.published`](/business/events/Offer.published) when an Offer on this Product is published again |

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

## Call it

**Ask**

```text
Add a product to LedgerLark.
```

**API**

```bash
curl -X POST https://api.sb/ledgerlark.com/products \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"LedgerLark","promise":"Books closed by the fifth of each month."}'
```

```json
{
  "api": "https://api.sb/ledgerlark.com",
  "product": {
    "$id": "https://api.sb/ledgerlark.com/products/product_1",
    "$type": "Product",
    "name": "LedgerLark",
    "promise": "Books closed by the fifth of each month.",
    "status": "draft"
  },
  "action": {
    "$id": "https://api.sb/ledgerlark.com/actions/action_1",
    "operation": "Product.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/ledgerlark.com/actions/action_1"
  }
}
```

**SDK**

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

const product = await $.Product.create({ name: 'LedgerLark', promise: 'Books closed by the fifth of each month.' })
```

**CLI**

```bash
npx startup-builder do Product.create --json '{"name":"LedgerLark","promise":"Books closed by the fifth of each month."}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Product.create({ name: 'LedgerLark', promise: 'Books closed by the fifth of each month.' })"
  }
}
```

## Example
A certified translation is a Product whose `promise` reads "accepted by the receiving agency within 48 hours, or redone free." Two Offers sell it: $40 a page, and $300 a month for 10 pages.