saveBuiltInFieldRules
Requires permission settings:custom-fields:manage.
Changes whether built-in fields (trading name, tax ID, registration number, delivery notes, an address's contact, a sign-up's secondary contact) are hidden, optional or required on given forms, and returns every rule. Values stay in their own columns. Requires permission to manage custom fields.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SaveBuiltInFieldRules($changes: [BuiltInFieldRuleInput!]!) {
saveBuiltInFieldRules(changes: $changes) {
defaultRule
field
rule
surface
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SaveBuiltInFieldRules($changes: [BuiltInFieldRuleInput!]!) {\n saveBuiltInFieldRules(changes: $changes) {\n defaultRule\n field\n rule\n surface\n }\n}",
"variables": {
"changes": [
{
"field": "string",
"rule": "string",
"surface": "string"
}
]
}
}
EOF
Variables:
{
"changes": [
{
"field": "string",
"rule": "string",
"surface": "string"
}
]
}
Response:
{
"data": {
"saveBuiltInFieldRules": [
{
"defaultRule": "string",
"field": "string",
"rule": "string",
"surface": "string"
}
]
}
}
saveBuiltInFieldRules(
changes: [BuiltInFieldRuleInput!]!
): [BuiltInFieldRule!]!
Arguments
saveBuiltInFieldRules.changes ● [BuiltInFieldRuleInput!]! non-null input
The rules that change; every other rule stays as it is.
Type
BuiltInFieldRule object
Whether one built-in field is hidden, optional or required on one form.