列出購買歷史記錄

GET
https://www.digicert.com/services/v2/finance/purchase-history

使用此端點列出您帳戶的訂單採購歷史記錄。

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

url = "https://www.digicert.com/services/v2/finance/purchase-history"

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/finance/purchase-history"

	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/finance/purchase-history',
  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
{
  "order_transactions": [
    {
      "id": "100003",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "order_id": "11223",
      "receipt_id": "11118",
      "acct_adjust_id": "0",
      "amount": "379.00",
      "payment_type": "card",
      "transaction_date": "2018-07-18 11:34:18",
      "transaction_type": "purchase",
      "product_name": "Secure Site SSL"
    },
    {
      "id": "100002",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "order_id": "11222",
      "receipt_id": "11117",
      "acct_adjust_id": "0",
      "amount": "198.00",
      "payment_type": "card",
      "transaction_date": "2018-10-11 10:03:45",
      "transaction_type": "purchase",
      "product_name": "Standard SSL"
    },
    {
      "id": "100001",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "order_id": "11221",
      "receipt_id": "11116",
      "acct_adjust_id": "0",
      "amount": "499.00",
      "payment_type": "card",
      "transaction_date": "2018-01-26 12:43:49",
      "transaction_type": "purchase",
      "product_name": "EV Multi-Domain"
    },
    ...
  ],
  "page": {
    "total": 1854,
    "limit": 1000,
    "offset": 0
  }
}

URL 查詢字串

名稱 必填/選填 類型 說明
container_id 選填 int 篩選結果至指定容器。
limit 選填 int 將清單裁剪為指定頁數。
最大:1000 (預設)
offset 選填 int 在指定頁數開始清單。
預設:0

回應參數

名稱 類型 說明
order_transactions array 傳回的訂單交易的清單。
.. id string 訂單交易 ID。
.. container object 與啟動調整的容器有關的詳細資料。
.. .. id int 容器 ID。
.. .. name string 容器的名稱。
.. .. is_active bool 容器的啟用狀態。
.. order_id
.. receipt_id
.. acct_adjust_id
.. amount 交易金額。
.. payment_type 用於交易的付款類型。
.. transaction_date 交易的時間戳記。
格式:yyyy-MM-dd HH:mm:ss
.. transaction_type 交易類型。
可能的值:purchase
.. product_name 購買的產品的名稱。
請參閱詞彙 — 產品識別碼
頁面 object 與結果有關的詳細資料。
使用 URL 查詢字串修改。