GET subscription-expiration


Short Description: Returns subscription expiration date and account id for the current authorized account. 


JSON Calls documentation:

This object is comprised of the following simple objects:

Name Object Category Object Type Nullable Description
subscription_expires CCH Structure Datetime  

The expiration date for the CCH's API subscription. After this date the API will no longer function.

account_id CCH Structure integer 0

The identifier for the Common Controls Hub account.

Use Cases

Before you do anything else, you’ll want to have a field that stores both your API key and its expiration date!

This call should be one of the first calls you use to ensure that the API key is valid, and record the API key’s subscription_expires date in the user’s account.

Once that date and time have passed, the key will be expired and no longer valid.


The ERD diagram for setting this up is below (LucidChart link. Really, all you’ll need is to tie a settings table to your account table.


The wireframe for this portion is pretty simple - you’ll want to set up an account settings page wherein you can hold your API key, account ID, and dynamically update your Valid Until date.