List subaccounts

GET
https://www.digicert.com/services/v2/account/subaccount

Use this endpoint to list all subaccounts.

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

url = "https://www.digicert.com/services/v2/account/subaccount"

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

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

print(response.text)
Go
package main

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

func main() {

	url := "https://www.digicert.com/services/v2/account/subaccount"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
NodeJS
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.digicert.com/services/v2/account/subaccount',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
  "subaccounts": [
    {
      "account_id": 112233,
      "account_type": "reseller",
      "organization_name": "Number one organization",
      "date_created": "2018-11-29 01:48:04",
      "account_manager": "Jim James"
    },
    {
      "account_id": 112234,
      "account_type": "enterprise",
      "organization_name": "Number two organization",
      "date_created": "2018-11-29 18:25:04",
      "account_manager": "Jill Valentine"
    },
    {
      "account_id": 112235,
      "account_type": "retail",
      "organization_name": "Number three organization",
      "date_created": "2018-12-04 15:24:43",
      "account_manager": "Rick Roll"
    }
  ],
  "page": {
    "total": 3,
    "limit": 1000,
    "offset": 0
  }
}

URL query strings

Name Req/Opt Type Description
offset optional int Start list at the specified number for pagination.
limit optional int Truncate list to the specified number for pagination.

Response parameters

Name Type Description
child_accounts array List of all subaccounts.
.. account_id int Account ID.
.. account_type string Defines the subaccount type.
See Glossary – Subaccount types
.. organization_name string Legal name of the subaccount's primary organization.
.. date_created string Timestamp of when the subaccount was created.
Format: yyyy-MM-dd HH:mm:ss
.. account_manager string Name of the subaccount's account representative.
page object Details about results.
Modified using URL query strings.