Skip to main content

Replace a field's choices.

POST/api/v1/custom-field-templates/{custom_field_template_id}/choices/replacecustom_fields:write

The whole ordered list is replaced. Choices are text, none blank, none repeated ignoring case, the first not starting with 'select', and for MultiValue none containing ';'. When another field reads the same list, shared_list_policy decides: refuse (the default), fork, or update_shared (only when the caller may edit every template that shares it). 409 conflict when the list changed after the request read it and no If-Match was sent to guard it.

Scopecustom_fields:write
AsynchronousNo
MCP toolreplace_custom_field_template_choices
Portal permissionsedit_custom_field_templates

Parameters​

NameInTypeRequiredDescription
custom_field_template_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-MatchheaderstringOptional

Request body​

Content typeType
application/jsonChoiceReplaceBodyInput

Responses​

StatusDescriptionBody
200Success.application/json ChoiceSet or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflictapplication/problem+json Problem
412precondition_failedapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

Choice​

FieldTypeRequiredDescription
custom_field_idstringRequired
keystringRequiredThe stored value (the choice text).
sort_orderinteger or nullRequired

ChoiceReplaceBodyInput​

FieldTypeRequiredDescription
choicesarray of stringRequiredThe complete ordered list: text, none blank, none repeated ignoring case.
custom_field_idstringRequired
shared_list_policystring or nullOptionalrefuse (default), fork (give this field its own list) or update_shared (change the list every field reads).

ChoiceSet​

FieldTypeRequiredDescription
itemsarray of ChoiceRequired