hotmart_batch_subscriptions_reactivate
Batch reactivate multiple Hotmart subscriptions by providing a list of subscriber codes. Optionally charge immediately.
Instructions
Batch Reactivate Subscriptions. Use this for multiple subscriber_codes at once. For a single one, prefer hotmart_subscription_reactivate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subscriber_code | Yes | List of subscriber codess. Pass a JSON array of strings, e.g. `['ABC123XY', 'DEF456ZW']`. | |
| charge | No | Cobrar imediatamente |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- Main handler for hotmart_batch_subscriptions_reactivate. Sends POST request to /payments/api/v1/subscriptions/reactivate with a list of subscriber codes and optional charge parameter.
async def hotmart_batch_subscriptions_reactivate( subscriber_code: list[str], charge: Optional[bool] = None, ) -> str: """Batch Reactivate Subscriptions. Use this for multiple subscriber_codes at once. For a single one, prefer `hotmart_subscription_reactivate`. Args: subscriber_code: List of subscriber codess. Pass a JSON array of strings, e.g. `['ABC123XY', 'DEF456ZW']`. charge: Cobrar imediatamente""" endpoint = "/payments/api/v1/subscriptions/reactivate" body = {} body["subscriber_code"] = subscriber_code if charge is not None: body["charge"] = charge result = await get_client().post(endpoint, json=body) return json.dumps(result, indent=2) - src/hotmart_mcp/server.py:25-37 (registration)Auto-discovery registration: iterates over all modules in hotmart_mcp.tools and registers every async function (that doesn't start with '_') as a FastMCP tool via mcp.tool()(obj). This automatically registers hotmart_batch_subscriptions_reactivate.
def _discover_and_register_tools() -> int: """Import all modules under hotmart_mcp.tools and register async functions.""" registered = 0 for module_info in pkgutil.iter_modules(tools_pkg.__path__, prefix=f"{tools_pkg.__name__}."): if module_info.name.endswith("__init__"): continue module = importlib.import_module(module_info.name) for name, obj in inspect.getmembers(module, iscoroutinefunction): if name.startswith("_"): continue mcp.tool()(obj) registered += 1 return registered - src/hotmart_mcp/generator.py:328-329 (helper)Disambiguation description for the tool: 'Use this for multiple subscriber_codes at once. For a single one, prefer hotmart_subscription_reactivate.'
"hotmart_batch_subscriptions_reactivate": "Use this for multiple subscriber_codes at once. For a single one, prefer `hotmart_subscription_reactivate`.", - Exported in __all__ of the subscriptions module, making it discoverable.
__all__ = ["hotmart_subscriptions_list", "hotmart_subscriptions_summary_list", "hotmart_subscription_transactions_list", "hotmart_subscriber_purchases_list", "hotmart_subscription_cancel", "hotmart_batch_subscriptions_cancel", "hotmart_subscription_reactivate", "hotmart_batch_subscriptions_reactivate", "hotmart_subscription_due_day_update"]