子帐户报告

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

使用此端点获取关于子帐户证书订单的总费用详细信息。

实例请求

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"
    }
}

响应参数

名称 类型 描述
subaccount_price object 此报告订单的子帐户总费用详细信息。如果子帐户未下达任何订单,则不返回此对象。
.. cost int 此报告订单中计入子帐户的费用金额。
.. currency string 计入子帐户的费用金额采用的货币代码。
可能的值:请参阅词汇表 - 子帐户显示货币
order_price object 此报告订单的“父”帐户总费用详细信息。如果子帐户未下达任何订单,则不返回此对象。
.. cost int 此报告订单中计入“父”帐户的费用金额。
.. currency string 计入“父”帐户的费用金额采用的货币代码。
可能的值:请参阅词汇表 - DigiCert 货币