List the answer fields of a form
GET /workflow_answer_fields
/workflow_answer_fieldsLists the fields of a form that the «Only if» of a «Form submitted» trigger can filter the answers on, with their type, their operators and, for a choice, its options: the same fields the workflow engine validates with.
When to use: Before writing answersFilter in marketing-form-completed (create_workflow, update_workflow): {"match": "all"|"any", "conditions": [{"field", "operator", "value"}]}, one level of conditions, where field is the field of this list, operator one of its operators and value {"value": <fixed value>} (null with value_shape: none); data of the workflow ({"ref"}) is not accepted. Send the audience and the form of the trigger; with «any form» (formUuid null), send only the audience: the list is then the fields every form of the audience with fields has, with the same field and type.
When not to use: For the answers of a survey, the field is the answer_field of each question of get_survey. To read or change a form, use get_subscription_form. For filters on contacts, use list_contact_filter_fields with usable_in=automation.
Values: A text field is compared ignoring case and the spaces at the ends: a choice (options not empty) is answered with the value of the option, several choices as their values separated by , (use contains), and a yes/no as yes or no. A number field takes a number. A classic form or one not published has no fields; with «any form» they do not reduce the list, and an answersFilter never matches the submission of a classic form, which brings no answers.
Filters: audience, required: uuid of the audience of the workflow. form: uuid of one of its forms (list_audience_forms). All the fields come in one response, in the order of the design; there is no pagination.
Permissions: Requires the manager role or higher, or the marketing.forms_landings.read capability.
Value for the X-Auth-Token header parameter.
In: header
Query Parameters
uuid of the audience of the workflow (audienceUuid of the trigger).
uuiduuid of a form of the audience (formUuid of the trigger). Leave it out for «any form».
uuidResponse Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://api.easymailing.com/workflow_answer_fields?audience=9b1d4f2e-3c5a-4e6b-8d7f-0a1b2c3d4e5f&form=2f7c9a1b-5d3e-4b6a-9c8d-1e2f3a4b5c6d" \ -H "X-Auth-Token: YOUR_API_KEY"[ { "field": "string", "label": "string", "type": "text", "options": [ {} ], "operators": [ {} ] }]