Revoke order certificates

PUT
https://www.digicert.com/services/v2/order/certificate/{{order_id}}/revoke

Use this endpoint only if you want to revoke all certificates associated with an order. To revoke a single certificate, use the Revoke certificate endpoint.

Use this endpoint to submit a request to revoke all certificates on an order.

After submitting the request, an administrator will need to approve the request before DigiCert can revoke the certificate.

cURL
curl -X PUT \
  'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/revoke' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
  "comments": "I no longer need this cert."
}'
Python
import requests

url = "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/revoke"

payload = "{\n  \"comments\": \"I no longer need this cert.\"\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/order/certificate/{{order_id}}/revoke"

	payload := strings.NewReader("{\n  \"comments\": \"I no longer need this cert.\"\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/order/certificate/{{order_id}}/revoke',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: { comments: 'I no longer need this cert.' },
  json: true };

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

  console.log(body);
});
201 Created
{
  "id": 1,
  "date": "2016-02-10T17:06:15+00:00",
  "type": "revoke",
  "status": "pending",
  "requester": {
    "id": 242140,
    "first_name": "Jack",
    "last_name": "White",
    "email": "j.white@fakeaddy.com"
  },
  "comments": "Revoked via API!"
}

Request parameters

Name Req/Opt Type Description
comment required string Message describing the reason for the revoke request.

Response parameters

Name Type Description
id int Request ID.
date string Timestamp of when the revoke request was submitted.
Format: UTC timezone and ISO 8601 date
type string Request type.
Possible values: revoke
status string Status of the revoke request.
Possible values: submitted, pending, approved, rejected
.. requester object Details about the user that placed the request.
See Structures – User details object.
comments string Message about the revoke request.