Expiring orders and certificates

GET
https://www.digicert.com/services/v2/report/order/expiring

Use this endpoint to get the number of orders and certificates in your account that:

  • Expire within 0-30, 30-60, and 60-90 days of now.
  • Expired within the last 7 days.

By default, this endpoint only returns the expiring orders count. To include the expiring certificates count in the results, append the query parameter include_expiring_certs=true to your request URL. This option is useful when you need to retrieve the total number of expiring certificates in your account, including certificates that expire more than 90 days before the order (for example, if the order is for a Multi-year Plan).

generic
https://www.digicert.com/services/v2/report/order/expiring?include_expiring_certs=true

Expiration timeframes

This endpoint returns the number of orders or certificates expiring in a given timeframe (days_expiring) from the time you submit the request.

days_expiring Days until expiration
90 Between 60 (inclusive) and 90 (inclusive)
60 Between 30 (inclusive) and 60 (exclusive)
30 Between now (exclusive) and 30 (exclusive)
-7 Between now (inclusive) and 7 days ago (inclusive)

The "now" in all categories is the day you submit your API request. For example, if you submit a request on September 3, "now" is September 3. The API returns the number of orders and certificates that:

  • Expire 0-30, 30-60, and 60-90 days from September 3.
  • Expired in the last 7 days (August 28 – September 3).

Example requests and responses

cURL
curl -X GET \
  https://www.digicert.com/services/v2/report/order/expiring \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
cURL (include_expiring_certs)
curl -X GET \
  https://www.digicert.com/services/v2/report/order/expiring?include_expiring_certs=true \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
200 OK
{
  "expiring_orders": [
    {
      "days_expiring": 90,
      "order_count": 10
    },
    {
      "days_expiring": 60,
      "order_count": 13
    },
    {
      "days_expiring": 30,
      "order_count": 3
    },
    {
      "days_expiring": -7,
      "order_count": 1
    }
  ]
}
200 (include_expiring_certs)
{
  "expiring_orders": [
    {
      "days_expiring": 90,
      "count": 10
    },
    {
      "days_expiring": 60,
      "count": 13
    },
    {
      "days_expiring": 30,
      "count": 3
    },
    {
      "days_expiring": -7,
      "count": 1
    }
  ],
  "expiring_certs": [
    {
      "days_expiring": 90,
      "count": 5
    },
    {
      "days_expiring": 60,
      "count": 2
    },
    {
      "days_expiring": 30,
      "count": 1
    },
    {
      "days_expiring": -7,
      "count": 0
    }
  ]
}

URL query strings

Name Req/Opt Type Description
container_id optional number Limit results to a specific container.
include_expiring_certs optional boolean If true, results include the expiring certificates count in addition to the expiring orders count. Additionally, in expiring_orders objects, the name of the order_count field becomes count, instead.

If false (default), results only include the expiring orders count.

Response parameters

Name Type Description
expiring_orders array of objects List of objects with the number of orders in each days_expiring category.
.. days_expiring number Number of days until expiration.
Possible values: See Expiration timeframes
.. order_count/count

Note: If include_expiring_certs is true, returns as count instead of order_count.
number Number of orders expiring in the given timeframe. Does not include orders that have been renewed.
expiring_certs array of objects List of objects with the number of certificates in each days_expiring category. Only returned if include_expiring_certs is true.
.. days_expiring number Number of days until expiration.
Possible values: See Expiration timeframes
.. count number Number of certificates expiring in the given timeframe.