If you want to keep track of your usage automatically, then you can use our usage API for that purpose. This works via a separate HTTP request.

Just send a request similar to:

https://api.htm2pdf.co.uk/usage?apikey=yourapikey

The request should at least have the following components:

  1. endpoint: for example http://api.htm2pdf.co.uk/usage or https://api.htm2pdf.co.uk/usage for secure access
  2. apikey: this is mandatory and you will get yours when you sign up
  3. output: json or text output. This parameter is optional and by default we assume you want a JSON response

Note: make sure to call the usage API at the same server as the one you’re using for regular API calls, so if use the API at https://asia.htm2pdf.co.uk or https://usa.htm2pdf.co.uk then also call the usage API there.

By default we will give you a JSON response indicating plan details and usage. The output that you will receive will look like the example below.

array (
  'plan' => 
  array (
    'start' => '2017-02-02',
    'end' => '2099-12-31',
    'description' => 'HTM2PDF - Starter',
    'limit' => 1000,
    'limit period' => 'month',
  ),
  'usage' => 
  array (
    'current period start' => '2017-04-02',
    'current period' => 182,
  ),
)