# Outcome Contract

URL: /business/nouns/outcome-contract · Id: `noun:outcome-contract`

> An Outcome Contract is the terms on an Offer that warrant a Service’s result: done, acceptance, assurance, remedy, and earnings.

An Outcome Contract is the terms on an [Offer](/business/nouns/offer) that warrant a [Service](/business/nouns/service)’s result: done, acceptance, assurance, remedy, and earnings.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `done` | `text` | Yes | The state or Event that counts as done. |
| `accept` | `text` | Yes | Who accepts the result, and within what window. |
| `remedy` | `text` | Yes | What happens on a miss: redo, refund, or credit. |
| `revisions` | `integer` | No | How many times the Customer may send work back before the remedy applies, such as 1. |
| `silence` | `string` | No | What the Customer’s silence means once the acceptance window passes. |
| `earns` | `string` | No | The Event that captures payment and earns the fee. |
| `assurance` | `json` | No | The Evaluators that check done before every delivery, and the share of work a person grades, such as 2%. |
| `window` | `string` | No | How long the Customer has to confirm, revise or dispute each delivery, as an ISO duration. |

## Object
```json
{
  "$id": "https://api.sb/patentpad.com/outcome-contracts/outcome_contract_1",
  "$type": "OutcomeContract",
  "done": "Order.accepted",
  "accept": "The buyer, within 5 business days of delivery",
  "remedy": "Redo once, then refund in full",
  "revisions": 1,
  "silence": "accepts",
  "earns": "Order.confirmed",
  "assurance": {},
  "window": "P3D"
}
```

## Relationships
- <a id="rel-governs"></a>An Outcome Contract **governs** one [Offer](/business/nouns/offer): an Outcome Contract warrants the result an [Offer](/business/nouns/offer) sells: its done state, acceptance, assurance and remedy. `governs`, inverse [`governedBy`](/business/nouns/offer#rel-governed-by).
- <a id="rel-verified-by"></a>An Outcome Contract **is verified by** many [Evaluators](/business/nouns/evaluator): [Evaluators](/business/nouns/evaluator) grade delivered work against an Outcome Contract’s done state before the [Customer](/business/nouns/customer) accepts it. `verifiedBy`, inverse [`verifies`](/business/nouns/evaluator#rel-verifies).

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| <a id="get"></a>[OutcomeContract.get](/business/nouns/outcome-contract/get) | Returns one Outcome Contract by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[OutcomeContract.list](/business/nouns/outcome-contract/list) | Returns Outcome Contracts, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[OutcomeContract.update](/business/nouns/outcome-contract/update) | Changes the given properties of an Outcome Contract. Inherited from [Noun](/business/nouns/noun). | None. | `OutcomeContract.updated` | Two-way: `try`, `send`, `do` |

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

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `OutcomeContract.get` | Yes | Yes | Yes | Yes |
| `OutcomeContract.list` | Yes | Yes | Yes | Yes |
| `OutcomeContract.update` | Yes | Yes | Yes | No |

## Call it

**Ask**

```text
Show me the latest outcome contract.
```

**API**

```bash
curl https://api.sb/tutorloop.com/outcome-contracts/outcome_contract_1 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/tutorloop.com",
  "$type": "OutcomeContract",
  "$id": "https://api.sb/tutorloop.com/outcome-contracts/outcome_contract_1",
  "outcomeContract": {
    "$id": "https://api.sb/tutorloop.com/outcome-contracts/outcome_contract_1",
    "$type": "OutcomeContract",
    "done": "Order.accepted",
    "accept": "The buyer, within 5 business days of delivery",
    "remedy": "Redo once, then refund in full"
  },
  "links": {
    "self": "https://api.sb/tutorloop.com/outcome-contracts/outcome_contract_1",
    "up": "https://api.sb/tutorloop.com/outcome-contracts"
  }
}
```

**SDK**

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

const outcomeContract = await $.OutcomeContract.get({ id: 'outcome_contract_1' })
```

**CLI**

```bash
npx startup-builder do OutcomeContract.get --json '{"id":"outcome_contract_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.OutcomeContract.get({ id: 'outcome_contract_1' })"
  }
}
```

## Example
A bookkeeping Service's Outcome Contract defines done as a reconciled month, accepted by the [Customer](/business/nouns/customer) within 5 days, with one redo as the remedy.