# Market

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

> A Market is a region where a Startup sells, hires, or keeps books, with its currency, locales, and the floor rows that wake there.

A Market is a region where a [Startup](/business/nouns/startup) sells, hires, or keeps books, with its currency, locales, and the floor rows that wake there.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `countries` | `string[]` | Yes | ISO 3166-1 alpha-2 country codes. |
| `currency` | `string` | Yes | The ISO 4217 currency Prices show in. |
| `locales` | `string[]` | Yes | BCP 47 locale tags, the default first. |

## Object
```json
{
  "$id": "https://api.sb/kilnbakery.com/markets/market_1",
  "$type": "Market",
  "countries": [
    "Example countries"
  ],
  "currency": "USD",
  "locales": [
    "Example locales"
  ]
}
```

## Relationships
- <a id="rel-startups"></a>A Market **has** many [Startups](/business/nouns/startup): where the [Startup](/business/nouns/startup) sells, hires, or keeps books. Each Market wakes its floor rows. `startups`, inverse [`markets`](/business/nouns/startup#rel-markets).

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| [Market.enter](/business/nouns/market/enter) | Enter opens a Market to a Startup: Prices in its currency, the Site in its locales, and its floor rows woken. | [Finance Lead](/agents/finance/finance-lead) | [`Market.entered`](/business/events/Market.entered) | One-way (money): `send`, `do` |
| <a id="create"></a>[Market.create](/business/nouns/market/create) | Creates a Market. Inherited from [Noun](/business/nouns/noun). | None. | `Market.created` | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[Market.get](/business/nouns/market/get) | Returns one Market by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[Market.list](/business/nouns/market/list) | Returns Markets, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[Market.update](/business/nouns/market/update) | Changes the given properties of a Market. Inherited from [Noun](/business/nouns/noun). | None. | `Market.updated` | Two-way: `try`, `send`, `do` |
| <a id="delete"></a>[Market.delete](/business/nouns/market/delete) | Deletes a Market; its history is kept. Inherited from [Noun](/business/nouns/noun). | None. | `Market.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` |
| --- | --- | --- | --- | --- |
| `Market.create` | Yes | Yes | Yes | No |
| `Market.get` | Yes | Yes | Yes | Yes |
| `Market.list` | Yes | Yes | Yes | Yes |
| `Market.update` | Yes | Yes | Yes | No |
| `Market.delete` | Yes | Yes | Yes | No |
| `Market.enter` | Yes | No | No | No |

## Call it

**Ask**

```text
Enter the latest market with a startup.
```

**API**

```bash
curl -X POST https://api.sb/petpantry.shop/markets/market_1/enter \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"startup":"startup_1"}'
```

```json
{
  "api": "https://api.sb/petpantry.shop",
  "market": {
    "$id": "https://api.sb/petpantry.shop/markets/market_1",
    "$type": "Market",
    "countries": [
      "Example countries"
    ],
    "currency": "USD",
    "locales": [
      "Example locales"
    ]
  },
  "action": {
    "$id": "https://api.sb/petpantry.shop/actions/action_1",
    "operation": "Market.enter",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/petpantry.shop/actions/action_1"
  }
}
```

**SDK**

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

const market = await $.Market.enter({ startup: 'startup_1', market: 'market_1' })
```

**CLI**

```bash
npx startup-builder do Market.enter --json '{"startup":"startup_1","market":"market_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Market.enter({ startup: 'startup_1', market: 'market_1' })"
  }
}
```

## Example
A [Startup](/business/nouns/startup) that enters the European Union Market shows [Prices](/business/nouns/price) in euros and translates its [Site](/business/nouns/site) into `de-DE` and `fr-FR`. The Market wakes the VAT and accessibility floor rows.