列出余额历史纪录

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

使用此端点列出您的帐户的余额调整记录。

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

url = "https://www.digicert.com/services/v2/finance/balance-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/balance-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/balance-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
{
  "adjustments": [
    {
      "id": "5",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "credit": "195.00",
      "transaction_type": "Credit",
      "receipt_id": "0",
      "transaction_date": "2018-10-18 08:47:53",
      "balance_after": "441.00",
      "note": "Payment for invoice #100001"
    },
    {
      "id": "4",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "credit": "98.00",
      "transaction_type": "Credit",
      "receipt_id": "0",
      "transaction_date": "2018-10-18 08:47:53",
      "balance_after": "246.00",
      "note": "Payment for invoice #100006"
    },
    {
      "id": "3",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "debit": "295.00",
      "transaction_type": "Sale from Account Balance",
      "receipt_id": "121214",
      "transaction_date": "2018-09-04 12:02:39",
      "balance_after": "148.00",
      "order_id": "12346",
      "note": "Auto-debit: enterprise order from account balance"
    },
    {
      "id": "2",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "debit": "157.00",
      "transaction_type": "Sale from Account Balance",
      "receipt_id": "121213",
      "transaction_date": "2018-09-04 12:02:06",
      "balance_after": "443.00",
      "order_id": "12345",
      "note": "Auto-debit: enterprise order from account balance"
    },
    {
      "id": "1",
      "container": {
        "id": 11223,
        "name": "Example Division",
        "is_active": true
      },
      "credit": "600.00",
      "transaction_type": "Credit",
      "receipt_id": "0",
      "transaction_date": "2018-08-15 09:21:53",
      "balance_after": "600.00",
      "note": "Initial deposit for account."
    },
  ],
  "page": {
    "total": 4,
    "limit": 1000,
    "offset": 0
  }
}

URL 查询字符串

名称 请求/选项 类型 描述
offset 可选 int 在特定分页页码开始列表。
limit 可选 int 将列表截断到指定的分页页码。

当您的帐户包含多个分区时,container_id URL 查询字符串必填。

响应参数

名称 类型 描述
adjustments array 调整的列表。
.. id string 调整 ID。
.. container object 发起调整的容器的相关详细信息。
.. .. id int 容器 ID。
.. .. name string 容器的名称。
.. .. is_active bool 容器的活跃状态。
.. credit
.. debit
string 如果是贷项,则为存入该帐户的金额。
如果是借项,则为从该帐户提取的金额。
.. transaction_type string 发生的调整类型。
可能的值:Credit,Sale from Account Balance
.. receipt_id string 接收人编号。
对所有贷项交易返回值 0
.. transaction_date string 调整的时间戳。
格式:yyyy-MM-dd HH:mm:ss
.. balance_after string 发生调整后的帐户余额。
.. note string 关于调整的备注。
页码 object 关于结果的详细信息。
使用 URL 查询字符串进行修改。