# OR31 - Update the custom fields of an order and its order lines Only specified custom field values will be updated.In order to delete an custom field's value, set it to null or an empty string. Note that you may not delete the value of a required custom field value.Output will return information on the status of the update attempt by giving: either all of the order and its order lines custom field values after the update or in case of errors, the list of errors and the body of the initial callCall FrequencyRecommended usage: Each time a custom field is updated on an order or on an order lineMaximum usage: Each time a custom field is updated on an order or on an order line Endpoint: PUT /api/orders/{order_id}/additional_fields ## Path parameters: - `order_id` (string, required) Order identifier ## Query parameters: - `shop_id` (integer) Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used. ## Request fields (application/json): - `order_additional_fields` (array) Order custom fields - `order_additional_fields.code` (string, required) Custom field's code - `order_additional_fields.type` (string) Custom field's type Enum: "STRING", "DATE", "NUMERIC", "BOOLEAN", "LINK", "REGEX", "TEXTAREA", "LIST", "MULTIPLE_VALUES_LIST" - `order_lines` (array) Order lines custom fields - `order_lines.order_line_additional_fields` (array) Order line custom fields - `order_lines.order_line_id` (string, required) Order line identifier ## Response 200 fields (application/json): - `order_update_errors` (object) Error report of an invalid request, with the body of the initial call - `order_update_errors.errors` (array, required) Errors about the input object - `order_update_errors.errors.code` (string, required) Error code - `order_update_errors.errors.field` (string, required) Name of the field on the input object. Can be composed, e.g.: address.zip_code - `order_update_errors.errors.message` (string, required) Error message - `order_update_errors.input` (object) Invalid order custom fields values received - `order_update_errors.input.order_additional_fields` (array) Order custom fields - `order_update_errors.input.order_additional_fields.code` (string, required) Custom field's code - `order_update_errors.input.order_additional_fields.type` (string) Custom field's type Enum: "STRING", "DATE", "NUMERIC", "BOOLEAN", "LINK", "REGEX", "TEXTAREA", "LIST", "MULTIPLE_VALUES_LIST" - `order_update_errors.input.order_lines` (array) Order lines custom fields - `order_update_errors.input.order_lines.order_line_additional_fields` (array) Order line custom fields - `order_update_errors.input.order_lines.order_line_id` (string, required) Order line identifier - `order_update_result` (object) Order and order line custom fields values after the update has been processed - `order_update_result.order_additional_fields` (array) Custom fields of the order