get_promo_code
Retrieve a promo code by ID to view its settings, usage count, and enable status. Use before a campaign to verify code availability.
Instructions
Retrieve a single promo code by ID with its current settings and usage stats.
Use to check a code's usage_count before a campaign, or confirm a code is enabled. Use list_promo_codes to browse codes for a rule.
Returns 404 if any of store_id, promo_rule_id, or promo_code_id is invalid.
Args: store_id: E-commerce store ID. promo_rule_id: Rule ID the code is attached to. promo_code_id: Code ID to inspect.
Returns: JSON with id, code, redemption_url, usage_count, enabled, created_at, updated_at.
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": {
"store_id": "<store_id>",
"promo_rule_id": "<promo_rule_id>",
"promo_code_id": "<promo_code_id>"
},
"name": "get_promo_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | ||
| store_id | Yes | ||
| promo_code_id | Yes | ||
| promo_rule_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |