# Partner

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

> A Partner is an outside Organization that is party to an Agreement with a Startup, supplying it, distributing its Offers, or both.

A Partner is an outside [Organization](/business/nouns/organization) that is party to an [Agreement](/business/nouns/agreement) with a [Startup](/business/nouns/startup), supplying it, distributing its [Offers](/business/nouns/offer), or both.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `side` | `string` | Yes | One of `supply`, `distribution`, or `both`. |

<details>
<summary>Inherited from [Organization](/business/nouns/organization): 2 properties</summary>

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | The name it trades under. |
| `hostname` | `string` | No | The web domain that keys it. |

</details>

## Object
```json
{
  "$id": "https://api.sb/kilnbakery.com/partners/partner_1",
  "$type": "Partner",
  "name": "Kiln Bakery",
  "hostname": "kilnbakery.com",
  "side": "supply"
}
```

## Relationships
- <a id="rel-reserves"></a>A Partner **reserves** many [Organizations](/business/nouns/organization): an [Organization](/business/nouns/organization) a Partner reserved before referring it, for the `partner.reservationWindow` [Setting](/business/nouns/setting) (90 days by default); outbound skips it. `reserves`, inverse [`reservedBy`](/business/nouns/organization#rel-reserved-by).

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

## Call it

**Ask**

```text
Add a partner to PetPantry.
```

**API**

```bash
curl -X POST https://api.sb/petpantry.shop/partners \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"PetPantry","side":"supply"}'
```

```json
{
  "api": "https://api.sb/petpantry.shop",
  "partner": {
    "$id": "https://api.sb/petpantry.shop/partners/partner_1",
    "$type": "Partner",
    "name": "PetPantry",
    "side": "supply"
  },
  "action": {
    "$id": "https://api.sb/petpantry.shop/actions/action_1",
    "operation": "Partner.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/petpantry.shop/actions/action_1"
  }
}
```

**SDK**

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

const partner = await $.Partner.create({ name: 'PetPantry', side: 'supply' })
```

**CLI**

```bash
npx startup-builder do Partner.create --json '{"name":"PetPantry","side":"supply"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Partner.create({ name: 'PetPantry', side: 'supply' })"
  }
}
```

## Example
A practice-management vendor refers law firms to a court-filings API under an [Agreement](/business/nouns/agreement) for 20% of first-year revenue. It is a Partner on the distribution side.