Last Updated: 7/7/2021 1:24:24 AM
To extend the license expiration date for your customer, you can use Customers :: Subscription :: Update to set the new expiration date to your customer's subscription.
![]() |
NoteThe Customer Company ID and Subscription ID are required parameters and you should
save these
IDS because you will need them when you Create new customer company and subscribe one
of your service plans to it.
|
method = "PUT" request_uri = "/LMPI/v2/customers/%s/subscriptions/%s"\ %(company_id, subscription_id) # This is a monthly subscription, we would like to extend # one more month when is 2013-07-15. body = { "license_expiration_date" : "2013-07-15T00:00:00Z" } body = json.dumps(body) res_status, res_data = cspi_conn.send_request(method, request_uri, body) print "Response status: %s", res_status print "Response data: \n%s", res_data
If successful, the out is as below.
Response status: 200 Response data:
You can use Customers :: Subscription :: Get to confirm whether the new expiration date is updated.
method = "GET" request_uri = "/LMPI/v2/customers/%s/subscriptions/%s"\ %(company_id, subscription_id) res_status, res_data = send_request(method, request_uri) print "Response status: %s", res_status print "Response data: \n%s", res_data
If successful, the out is as below.
Response status: 200 Response data: { "id": "c6602fd7-2f15-4431-89cd-0355b80e1425", "name": "Worry Free Business full version (monthly)", "enabled": true, "is_auto_renewal" : false, "auto_renewal_month" : 0, "expiration_notification": 30, "service_url": "https://clp.trendmicro.com/?T=9ABIQ", "licenses": [ { "ac_code": "WF-WBKG-ZDLB8-TSVW5-DV6MQ-ZTGC5-VHLDP", "product_id": "WFSBWXE3X", "license_start_date": "2013-05-15T00:00:00Z", "license_expiration_date": "2013-07-15T00:00:00Z", "start_charge_date": "2013-05-15T00:00:00Z" "grace_period": 1, "units": 20, "enabled": true } ] }