--- title: "Subaccount report" source_url: https://dev.digicert.com/certcentral-apis/services-api/subaccount/subaccount-report.html api_method: GET api_endpoint: "/services/v2/account/subaccount/{{subaccount_id}}/report" api_url: "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/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. ## Example requests and responses **cURL** ```bash 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** ```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** ```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** ```javascript 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 ```json { "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 number 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 number 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.
order_prices array of objects If you change the currency for the parent account, this endpoint returns an order_prices array. Each item in the order_prices array represents the total amount billed to the parent account in the corresponding currency.
Note: The total amount billed to the parent account in the parent account's current currency is returned in the order_price array.
.. cost number Amount billed to the parent account in the corresponding currency.
.. currency string Currency unit for the corresponding cost value.
Possible values: See Glossary - DigiCert currencies.