编辑来宾访问(订单)

PUT
https://www.digicert.com/services/v2/order/certificate/{{order_id}}/guest-access

使用此端点为订单启用或禁用来宾访问。如需使用此端点,必须为帐户启用来宾访问。

示例请求和响应

cURL
curl --request PUT 'https://www.digicert.com/services/v2/order/certificate/12345678/guest-access' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "enable_guest_access": 1
}'
Python
import requests

url = "https://www.digicert.com/services/v2/order/certificate/12345678/guest-access"

payload = "{\n    \"enable_guest_access\": 1\n}"
headers = {
  'X-DC-DEVKEY': '{{api_key}}',
  'Content-Type': 'application/json'
}

response = requests.request("PUT", 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/order/certificate/12345678/guest-access"
  method := "PUT"

  payload := strings.NewReader("{\n    \"enable_guest_access\": 1\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))
}
NodeJS
var request = require('request');
var options = {
  'method': 'PUT',
  'url': 'https://www.digicert.com/services/v2/order/certificate/12345678/guest-access',
  'headers': {
    'X-DC-DEVKEY': '{{api_key}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"enable_guest_access":1})

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
204 Success
// No content

路径参数

名称 请求/选项 描述
order_id 必填 需要启用或禁用来宾访问的订单 ID。

请求参数

名称 类型 请求/选项 描述
enable_guest_access int 必填 订单的来宾访问设置。
允许的值:1(启用)或0(禁用)