Auto Renewal
This endpoint updates the auto-renewal setting for a reseller subscription. You can enable or disable automatic renewal by setting autoRenewal to true or false.
PUT
/api/v1.0/resellers/subscriptions/{subscriptionId}/autorenewalImportant: Use a valid
subscriptionId from the Get Subscriptions response. Auto-renewal only works if your reseller account has enough balance when the subscription expires. Note: Auto-renewal is disabled by default. Set
autoRenewal to true to enable it or false to disable it. import requests, json
def update_auto_renewal(api_key, subscription_id, auto_renewal):
url = f"https://api.ghostealth.com/dev/v1.0/resellers/subscriptions/{subscription_id}/autorenewal"
headers = {"Content-Type": "application/json", "Authorization": f"ApiKey {api_key}"}
payload = {"autoRenewal": auto_renewal}
res = requests.put(url, headers=headers, json=payload)
print("Auto-Renewal Response:", res.status_code)
print(json.dumps(res.json(), indent=2))
api_key = "xxx"
subscription_id = "su_69afbaa5bc32119ad6daa8fe"
auto_renewal = True
update_auto_renewal(api_key, subscription_id, auto_renewal)
Example Response:
Reseller Auto-Renewal Response: 200
{}
