Reorder the questions
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/forms/{id}/fields/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"0b6f2e1c-3d4a-4c5b-8e7f-1a2b3c4d5e6f",
"7e8d9c0b-1a2f-4e3d-9c8b-6a5f4e3d2c1b",
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'0b6f2e1c-3d4a-4c5b-8e7f-1a2b3c4d5e6f',
'7e8d9c0b-1a2f-4e3d-9c8b-6a5f4e3d2c1b',
'c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f'
]
})
};
fetch('https://{organization}.rescueconsole.com/api/forms/{id}/fields/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/forms/{id}/fields/order"
payload = { "ids": ["0b6f2e1c-3d4a-4c5b-8e7f-1a2b3c4d5e6f", "7e8d9c0b-1a2f-4e3d-9c8b-6a5f4e3d2c1b", "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"form": {
"id": "<string>",
"slug": "<string>",
"title": "<string>",
"form_kind": "adoption_application",
"is_published": true,
"description": "<string>",
"success_message": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"fields": [
{
"id": "<string>",
"field_key": "<string>",
"label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"help_text": "<string>",
"sort_order": 123
}
]
}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Forms
Reorder the questions
Sets the order the questions are asked in. Send every question on the form, once each, in the new order; anything else is refused. Needs write on the area of the form’s kind.
PUT
/
api
/
forms
/
{id}
/
fields
/
order
Reorder the questions
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/forms/{id}/fields/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"0b6f2e1c-3d4a-4c5b-8e7f-1a2b3c4d5e6f",
"7e8d9c0b-1a2f-4e3d-9c8b-6a5f4e3d2c1b",
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'0b6f2e1c-3d4a-4c5b-8e7f-1a2b3c4d5e6f',
'7e8d9c0b-1a2f-4e3d-9c8b-6a5f4e3d2c1b',
'c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f'
]
})
};
fetch('https://{organization}.rescueconsole.com/api/forms/{id}/fields/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/forms/{id}/fields/order"
payload = { "ids": ["0b6f2e1c-3d4a-4c5b-8e7f-1a2b3c4d5e6f", "7e8d9c0b-1a2f-4e3d-9c8b-6a5f4e3d2c1b", "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"form": {
"id": "<string>",
"slug": "<string>",
"title": "<string>",
"form_kind": "adoption_application",
"is_published": true,
"description": "<string>",
"success_message": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"fields": [
{
"id": "<string>",
"field_key": "<string>",
"label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"help_text": "<string>",
"sort_order": 123
}
]
}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The form's record ID.
Body
application/json
The record ID of every question on the form, in the order to ask them.
Response
The form, with its questions in the new order.
Show child attributes
Show child attributes