create_discount
Create a discount; it comes out of the operator's payout, never out of the platform commission. Returns the stored discount.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>",
"discount_type": "<discount_type>",
"discount_value": "<discount_value>"
},
"name": "create_discount"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The code guests type; required unless trigger is pay_in_full. | |
| stay_to | No | Latest check-in it covers, YYYY-MM-DD. | |
| trigger | No | `code` (default) or `pay_in_full`, a percentage taken when the guest pays everything at once. | |
| boat_ids | No | ||
| currency | No | EUR or USD: the currency a fixed amount is in. | |
| end_date | No | Last day it can be booked, YYYY-MM-DD. | |
| max_uses | No | ||
| all_boats | No | false limits it to `boat_ids`. | |
| stay_from | No | Earliest check-in it covers, YYYY-MM-DD. | |
| auto_apply | No | true applies it without a code. | |
| company_id | Yes | Company id, from list_boats (`company_id`) or get_company. | |
| start_date | No | First day it can be booked, YYYY-MM-DD. | |
| description | No | Shown to the guest. | |
| discount_type | Yes | `percentage` or `fixed`. | |
| discount_value | Yes | The percent, or for fixed the amount in `currency` (EUR when omitted). |