Use this endpoint to cancel a unit order.
You can cancel a unit order within thirty days of placing it. However, you cannot cancel a unit order if the subaccount on the order has spent any of the units .
To see if you can cancel a unit order, check the value of the can_cancel
parameter in the response data for the Unit order details endpoint.
curl --request PUT 'https://www.digicert.com/services/v2/units/order/1234/cancel' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json'
import requests
url = "https://www.digicert.com/services/v2/units/order/1234/cancel"
payload = {}
headers = {
'X-DC-DEVKEY': {{api_key}},
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/units/order/1234/cancel"
method := "PUT"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
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': 'PUT',
'url': 'https://www.digicert.com/services/v2/units/order/1234/cancel',
'headers': {
'X-DC-DEVKEY': {{api_key}},
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
// No Content
Name | Req/Opt | Description |
---|---|---|
order_id | required | ID of the unit order you want to cancel. |