Edit custom field value
2 minute read
POST
https://www.digicert.com/services/v2/order/certificate/{{order_id}}/custom-field
Use this endpoint to edit the custom field value for an order. See the List custom fields endpoint for details about custom fields, including metadata IDs.
To edit the metadata for a custom field (such as the label, data type, and whether the field is required), use the Edit custom field endpoint.
Note
Aninvalid_custom_field_value is returned when the data type of the value does not match the data type allowed by the custom field.Example requests and responses
curl -X POST \
'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/custom-field' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"metadata_id": 276,
"value": "New value"
}'import requests
url = "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/custom-field"
payload = "{\n \"metadata_id\": 276,\n \"value\": \"New value\"\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/custom-field"
payload := strings.NewReader("{\n \"metadata_id\": 276,\n \"value\": \"New value\"\n}")
req, _ := http.NewRequest("POST", 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))
}var request = require("request");
var options = { method: 'POST',
url: 'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/custom-field',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body: { metadata_id: 276, value: 'New value' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});204 No Content
// empty
Request parameters
| Name | Req/Opt | Type | Description |
|---|---|---|---|
| metadata_id | required | int | Specify the metadata ID of the custom field to update. |
| value | required | string | New value for the custom field. |
Was this page helpful?
Provide feedback