--- title: "Edit custom field value" source_url: https://dev.digicert.com/certcentral-apis/services-api/orders/edit-custom-field-value.html api_method: POST api_endpoint: "/services/v2/order/certificate/{{order_id}}/custom-field" api_url: "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/custom-field" --- **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](https://dev.digicert.com/md/certcentral-apis/services-api/account/list-custom-fields.md) 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](https://dev.digicert.com/md/certcentral-apis/services-api/account/edit-custom-field.md) endpoint. > **Info** > > An `invalid_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** ```bash 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" }' ``` **Python** ```python 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) ``` **Go** ```go 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)) } ``` **NodeJS** ```javascript 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 ```json // 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.