Skip to main content

Check that a field's stored values convert to another type.

POST/api/v1/custom-fields/{custom_field_id}/check-typecustom_fields:read

Asks, as the template editor does before a type change, whether every value stored in the field converts to the type; update_custom_field_template refuses the change when one does not. Nothing is changed and no value is shown. Types that store text convert nothing, so the answer is can_change true with converts_values false. Needs Edit Custom Field Templates, as the template editor does.

Scopecustom_fields:read
AsynchronousNo
MCP toolcheck_custom_field_type
Portal permissionsedit_custom_field_templates

Parameters​

NameInTypeRequiredDescription
custom_field_idpathstringRequired
Docwize-Versionheaderstring (date)Optional

Request body​

Content typeType
application/jsonFieldTypeCheckRequestInput

Responses​

StatusDescriptionBody
200Success.application/json FieldTypeCheck
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
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​

FieldTypeCheck​

FieldTypeRequiredDescription
can_changebooleanRequiredWhether the change can be made: every stored value converts, or none needs to.
converts_valuesbooleanRequiredWhether the change converts the values stored in the field (a change to a number, currency, date or register reference does; to a text type it does not).
custom_field_idstringRequired
reasonstring or nullRequiredWhy it cannot: values_do_not_convert (a stored value does not convert; change or clear those values first) or column_missing (the field's column is missing from its register's table). Null when it can.
typestringRequired

FieldTypeCheckRequestInput​

FieldTypeRequiredDescription
typestringRequiredThe type to change the field to, as a field definition names it (numeric, currency, whole_number, date, date_time ...).