/api/v1/object/field/trigger-fields/{objectSlug}List the fields that can make another field required.
List the fields that can make another field required.
A field can be required only when another field has a given value. This
route returns the active fields that can play that trigger role, and the
operators a rule can use. Choice fields (select, status, priority,
multi_select, tag) come with their choices in values; text,
number, boolean, date, email and phone fields come with an
empty values.
Query parameters:
exclude— the slug of a field to leave out, usually the field being edited, since a field cannot trigger itself.
Scope: read.<object slug>, for example read.contacts.
Errors:
400— no object has that slug, or the object is inactive.
Response 200:
{
"status": 200,
"message": "Trigger fields retrieved successfully",
"data": {
"trigger_fields": [
{
"slug": "stage-k2j9h4g7",
"name": "stage",
"label": "Stage",
"type": "select",
"values": [
{
"id": "6a1f3c9e-2b7d-4e8a-9f0c-1d2e3f4a5b6c",
"value": "lead",
"label": "Lead",
"color": "#3B82F6"
}
]
}
],
"operators": [
{ "value": "equals", "label": "Equals" },
{ "value": "not_equals", "label": "Does not equal" },
{ "value": "in", "label": "Is one of" },
{ "value": "not_in", "label": "Is not one of" },
{ "value": "is_empty", "label": "Is empty" },
{ "value": "is_not_empty", "label": "Is not empty" }
]
}
}
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Responses
Successful response
{
"slug": "string",
"name": "string",
"label": "string",
"type": "string",
"values": [
"string"
]
}Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs