Check Code
check_codeCheck one specific code: status (verified/declared/stale/dead/unknown_code), structured constraints, success stats, and — if a cart is supplied — whether it would apply.
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": {
"merchant": "<merchant>",
"code": "<code>"
},
"name": "check_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart | No | Optional cart context — when supplied, the answer includes whether the code would apply to this cart | |
| code | Yes | The promo code to check, exactly as a shopper would enter it at checkout | |
| merchant | Yes | Merchant slug, e.g. 'nike' |