Establecer productos de subcuenta

PUT
https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/products

Use esta terminal para establecer límites de productos para una subcuenta.

Esta terminal es destructiva de la matriz product_limits. La matriz existente será anulada por la nueva matriz que se envía.

cURL
curl -X PUT \
  'https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/product-limits' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
  "product_limits": [
    {
      "product_name_id": "ssl_dv_geotrust"
    },
    {
      "product_name_id": "ssl_multi_domain"
    },
    {
      "product_name_id": "ssl_plus"
    },
    {
      "product_name_id": "ssl_wildcard"
    },
    {
      "product_name_id": "wildcard_dv_geotrust"
    }
  ]
}'
Python
import requests

url = "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/product-limits"

payload = "{\n  \"product_limits\": [\n    {\n      \"product_name_id\": \"ssl_dv_geotrust\"\n    },\n    {\n      \"product_name_id\": \"ssl_multi_domain\"\n    },\n    {\n      \"product_name_id\": \"ssl_plus\"\n    },\n    {\n      \"product_name_id\": \"ssl_wildcard\"\n    },\n    {\n      \"product_name_id\": \"wildcard_dv_geotrust\"\n    }\n  ]\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/product-limits"

	payload := strings.NewReader("{\n  \"product_limits\": [\n    {\n      \"product_name_id\": \"ssl_dv_geotrust\"\n    },\n    {\n      \"product_name_id\": \"ssl_multi_domain\"\n    },\n    {\n      \"product_name_id\": \"ssl_plus\"\n    },\n    {\n      \"product_name_id\": \"ssl_wildcard\"\n    },\n    {\n      \"product_name_id\": \"wildcard_dv_geotrust\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	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: 'PUT',
  url: 'https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/product-limits',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { product_limits: 
      [ { product_name_id: 'ssl_dv_geotrust' },
        { product_name_id: 'ssl_multi_domain' },
        { product_name_id: 'ssl_plus' },
        { product_name_id: 'ssl_wildcard' },
        { product_name_id: 'wildcard_dv_geotrust' } ] },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
204 No Content
// empty

Enviar una matriz product_limits vacía deshabilita todos los productos para la subcuenta.

Parámetros de la solicitud

Nombre Solicitud/opción Tipo Descripción
product_limits obligatorio array Lista de productos que se deben habilitar para la subcuenta.
.. product_name_id opcional string Id. de nombre del producto que se debe habilitar.