このエンドポイントを使用して、ユニットオーダーを作成します。ユニットオーダーで、管理するサブアカウントの単位を購入できます。
サブアカウントの単位を購入するには、サブアカウントの価格設定方法を units
に設定してください。サブアカウントの価格設定方法を取得するには、[サブアカウント製品を一覧表示する] エンドポイントを使用します。
ユニットオーダーを作成するには、お使いのアカウントについて、単位転送を許可するオプションを有効にする必要があります。お使いのアカウントについてこのオプションが有効になっているかどうかを確認するには、アカウントマネージャにお問い合わせください。
curl --request POST 'https://www.digicert.com/services/v2/units/order' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"unit_account_id": {{unit_account_id}},
"notes": "Notes about the order",
"bundle": [
{
"product_name_id": "ssl_securesite_flex",
"units": "5"
},
{
"product_name_id": "ssl_ev_securesite_flex",
"units": "20"
}
]
}'
import requests
url = "https://www.digicert.com/services/v2/units/order"
payload = "{\n \"unit_account_id\": {{unit_account_id}},\n \"notes\": \"For Testing Purpose\",\n \"bundle\": [\n {\n \"product_name_id\": \"ssl_securesite_flex\",\n \"units\": \"5\"\n },\n\t\t{\n \"product_name_id\": \"ssl_ev_securesite_flex\",\n \"units\": \"20\"\n }\n ]\n}"
headers = {
'X-DC-DEVKEY': {{api_key}},
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/units/order"
method := "POST"
payload := strings.NewReader("{\n \"unit_account_id\": {{unit_account_id}},\n \"notes\": \"For Testing Purpose\",\n \"bundle\": [\n {\n \"product_name_id\": \"ssl_securesite_flex\",\n \"units\": \"5\"\n },\n {\n \"product_name_id\": \"ssl_ev_securesite_flex\",\n \"units\": \"20\"\n }\n ]\n}")
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
}
req.Header.Add("X-DC-DEVKEY", {{api_key}})
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://www.digicert.com/services/v2/units/order',
'headers': {
'X-DC-DEVKEY': {{api_key}},
'Content-Type': 'application/json'
},
body: "{\n \"unit_account_id\": {{unit_account_id}},\n \"notes\": \"For Testing Purpose\",\n \"bundle\": [\n {\n \"product_name_id\": \"ssl_securesite_flex\",\n \"units\": \"5\"\n },\n\t\t{\n \"product_name_id\": \"ssl_ev_securesite_flex\",\n \"units\": \"20\"\n }\n ]\n}"
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"id": 1371
}
名前 | 要求/オプション | タイプ | 説明 |
---|---|---|---|
unit_account_id | 必須 | integer |
単位を購入するサブアカウントの ID。 To get管理するサブアカウントの ID を取得するには、[サブアカウントを一覧表示する] エンドポイントを使用します。 |
notes | 任意 | string |
オーダーに貼付するカスタムメモ。. 文字制限:512 |
bundle | 必須 | array | 製品の各タイプについてオーダーする単位の額についての情報が記載された1つ以上のオブジェクトのリスト。 |
.. product_name_id | 必須 | string |
単位をオーダーする製品の一意の識別子。 許可額:「用語集 - 製品識別子」 を参照してください。 |
.. units | 必須 | integer | 指定製品についてオーダーする単位の額。 |
名前 | タイプ | 説明 |
---|---|---|
id | integer | オーダーの ID。 |