# create_oversell_rules

Create one or more cancelation-driven oversell rules for unit types on their
OTA channels. Accepts an array of rule definitions processed in parallel;
partial success is reported per item.

<!-- INPUT_BLOCK_START -->

## Input

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `oversellRules` | `CreateOversellRuleInput[]` | Yes | Oversell rules to create (1-100, processed in parallel) - [CreateOversellRuleInput](#createoversellruleinput) |

### CreateOversellRuleInput

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `channel` | `OversellRuleChannel` | Yes | OTA channel the rule applies to (e.g. BOOKING_COM) - [OversellRuleChannel](#oversellrulechannel) |
| `unitTypeId` | `string` | Yes | The ID of the unit type (multi-unit group) the rule is for |
| `name` | `string` | Yes | Human-readable label for the rule |
| `maxOversell` | `number` | Yes | Hard cap on the computed per-night oversell (0 = blackout: force no oversell) |
| `span` | `OversellRuleDateSpanInput` | No | Effective date window (omit = always in force) - [OversellRuleDateSpanInput](#oversellruledatespaninput) |
| `leadDays` | `OversellRuleLeadTimeWindowInput` | No | Lead-time window (days to arrival) the rule applies within - [OversellRuleLeadTimeWindowInput](#oversellruleleadtimewindowinput) |
| `pCancel` | `number \| null` | No | Per-booking cancellation probability used to size the oversell |
| `aversionZ` | `number \| null` | No | Std-dev discount off the expected cancellations (higher = more conservative) |
| `priority` | `number \| null` | No | Precedence among overlapping rules; the highest-priority rule in force on a night wins |

### OversellRuleDateSpanInput

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | `string \| null` | No | Start of the window (inclusive), ISO8601 date. On updates, pass null to clear; omit to leave unchanged. |
| `to` | `string \| null` | No | End of the window (inclusive), ISO8601 date. On updates, pass null to clear; omit to leave unchanged. |

### OversellRuleLeadTimeWindowInput

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `min` | `number \| null` | No | Minimum days to arrival. On updates, pass null to clear; omit to leave unchanged. |
| `max` | `number \| null` | No | Maximum days to arrival. On updates, pass null to clear; omit to leave unchanged. |

### OversellRuleChannel

| Value | Description |
| --- | --- |
| `BOOKING_COM` | Booking.com — the only OTA channel supported by oversell rules in v1 |

<!-- INPUT_BLOCK_END -->

<!-- OUTPUT_BLOCK_START -->

## Output

| Field | Type | Description |
| --- | --- | --- |
| `content` | `ContentItem[]` | Array of content items returned by the tool - [ContentItem](#contentitem) |
| `isError` | `boolean` | Whether the tool execution resulted in an error |

### ContentItem

| Field | Type | Description |
| --- | --- | --- |
| `type` | `'text'` | Content type (currently only 'text' is supported) |
| `text` | `string` | The text content to display |

<!-- OUTPUT_BLOCK_END -->
