Replace the matrix rules of a Matrix Calculation field.
POST/api/v1/custom-field-templates/{custom_field_template_id}/matrix-rules/replacecustom_fields:write
The whole table is replaced, in array order; an empty list clears it. The two axis fields must be other fields of the template and be the same for every rule.
| Scope | custom_fields:write |
| Asynchronous | No |
| MCP tool | replace_custom_field_template_matrix_rules |
| Portal permissions | edit_custom_field_matrix_calculations |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
custom_field_template_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
If-Match | header | string | Optional |
Request body
| Content type | Type |
|---|---|
application/json | MatrixRuleSetBodyInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json MatrixRuleSet or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
412 | precondition_failed | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
MatrixAxis
| Field | Type | Required | Description |
|---|---|---|---|
custom_field_id | string | Required |
MatrixAxisInput
| Field | Type | Required | Description |
|---|---|---|---|
custom_field_id | string | Optional |
MatrixRule
| Field | Type | Required | Description |
|---|---|---|---|
a_condition | string | Required | |
a_operator | string | Required | = (the whole value) or in (a range or a list). |
axis_a | MatrixAxis | Required | |
axis_b | MatrixAxis | Required | |
b_condition | string | Required | |
b_operator | string | Required | |
colour | string or null | Required | |
custom_field_id | string | Required | The Matrix Calculation field the rule belongs to. |
matrix_rule_id | string | Required | |
sort_order | integer | Required | The rule's position in the field's table (its stored order). ≥ -2147483648; ≤ 2147483647 |
value | string | Required |
MatrixRuleSet
| Field | Type | Required | Description |
|---|---|---|---|
items | array of MatrixRule | Required |
MatrixRuleSetBodyInput
| Field | Type | Required | Description |
|---|---|---|---|
custom_field_id | string | Required | |
rules | array of MatrixRuleWriteInput | Optional | The whole table in order; an empty list clears it. |
MatrixRuleWriteInput
| Field | Type | Required | Description |
|---|---|---|---|
a_condition | string | Required | |
a_operator | string | Required | |
axis_a | MatrixAxisInput | Required | |
axis_b | MatrixAxisInput | Required | |
b_condition | string | Required | |
b_operator | string | Required | |
colour | string or null | Optional | |
value | string | Required |