Subaccount report

GET
https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/report

Use this endpoint to get total cost details for a subaccount’s certificate orders.

Sample request

cURL
curl -X GET \
  'https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/report' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/report"

payload  = {}
headers = {
  'Content-Type': 'application/json',
  'X-DC-DEVKEY': '{{api_key}}',
}

response = requests.request("GET", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
Go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/report"
  method := "GET"

  payload := strings.NewReader("")

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("X-DC-DEVKEY", "{{api_key}}")

  res, err := client.Do(req)
  defer res.Body.Close()
  body, err := ioutil.ReadAll(res.Body)

  fmt.Println(string(body))
}
NodeJS
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/report',
  'headers': {
    'Content-Type': 'application/json',
    'X-DC-DEVKEY': '{{api_key}}',
  }
};
request(options, function (error, response) { 
  if (error) throw new Error(error);
  console.log(response.body);
});
200 OK
{
    "subaccount_price": {
        "cost": 3224,
        "currency": "AUD"
    },
    "order_price": {
        "cost": 2180,
        "currency": "USD"
    }
}

Response parameters

Name Type Description
subaccount_price object Details about the total cost to the subaccount for the orders in this report. If the subaccount has not placed any orders, this object is not returned.
.. cost int Amount billed to the subaccount for the orders in this report.
.. currency string Currency code for the amount billed to the subaccount.
Possible values: See Glossary - Subaccount display currencies.
order_price object Details about the total cost to the 'parent' account for the orders in this report. If the subaccount has not placed any orders, this object is not returned.
.. cost int Amount billed to the 'parent' account for the orders in this report.
.. currency string Currency code for the amount billed to the 'parent' account.
Possible values: See Glossary - DigiCert currencies.