Reorder conditions
curl --request PATCH \
--url https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/conditions/reorder \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"condition_ids": [
"<string>"
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({condition_ids: ['<string>']})
};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/conditions/reorder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/conditions/reorder"
payload = { "condition_ids": ["<string>"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"condition_ids": [
"<string>"
]
}{
"error": "param is missing or the value is empty: condition"
}{
"error": "Form does not exist."
}{
"error": "condition_ids must list every id of the form exactly once."
}Conditional logic
Reorder conditions
Set the order in which the conditions of a form are checked. Send every condition ID of the form, in the new order.
PATCH
/
forms
/
{form_id}
/
conditions
/
reorder
Reorder conditions
curl --request PATCH \
--url https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/conditions/reorder \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"condition_ids": [
"<string>"
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({condition_ids: ['<string>']})
};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/conditions/reorder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/conditions/reorder"
payload = { "condition_ids": ["<string>"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"condition_ids": [
"<string>"
]
}{
"error": "param is missing or the value is empty: condition"
}{
"error": "Form does not exist."
}{
"error": "condition_ids must list every id of the form exactly once."
}Replace
Learn how to find your subdomain in Workspace subdomain.
{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Unique ID of the form. Refer to Getting the Form ID for detailed instructions.
Body
application/json
Every condition ID of the form, in the new order. Each ID must appear exactly once.
Response
OK - The new order