validate_promotion
Check if a promotion code is valid for a given order. Returns isValid, discount amount, and an error code/message if invalid. Use before applying to a checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Order subtotal in major units (dollars, not cents) | |
| channel | Yes | Where the promo is being applied | |
| accountId | No | Customer account ID — used for per-customer usage limits | |
| promotionCode | Yes | The code customer entered |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Tool result payload — shape varies per tool, see the tool description | |
| summary | Yes | One-line human-readable summary of the action | |
| renderType | Yes | UI rendering hint for the result |