How to complete form fields in a task using the API
Important - if you make API calls directly to the Tallyfy API endpoint, you must supply an additional header in your requests X-Tallyfy-Client: APIClient
otherwise your requests will be dropped.
To complete form fields in a process task, follow these steps:
-
Gather your information: Make a GET request to
go.tallyfy.com/api/organizations/{org}/me/tasks
to obtain the necessary information for updating the task. -
Decide how to proceed: To fill out the form fields and mark the task as complete, send a POST request to
https://go.tallyfy.com/api/organizations/{org}/runs/{run_id}/completed-tasks
. If you only want to update the task without marking it as complete, send a PUT request tohttps://go.tallyfy.com/api/organizations/{org}/runs/{run_id}/tasks/{task_id}
. -
Submit your payload: Whether you’re marking the task as complete or just updating it, use the following payload structure - this example is for a short text field:
{
"taskdata": {
"${id_of_field_to_be_completed}": "${desired_value}"
}
}
Other field types
This example shows you a POST request to this endpoint for other field types:
https://go.tallyfy.com/api/organizations/{org}/runs/{runID}/tasks/{taskID}
Examples for multiple field types below.
{
"taskdata": {
"e4238158ad0949d4ad78c55125b28a99": "normal text field", // Text
"ad789434de1c4d5fade2193d237c5716": "Text Area content", // Textarea
"7a54e215a9904096851360917080599f": "yes", // Radio box
"8c0161f92eba4d3da7182fed348f3421": "2024-12-20T14:23:18.128Z", // Date
"0e4b280880cc4407a06478a2faa8052b": { // select dropdown
"id": 2,
"text": "Offiice 365",
"value": null
},
"fe316c2ac44a421cafbf128c9462b8e9": [ // Multiselect Checkboxes
{
"id": 1,
"text": "Slack",
"value": null,
"required": true,
"selected": true
},
{
"id": 4,
"text": "forms",
"value": null,
"selected": true
}]
}
}
Remember - if you’re not sure how API calls work - just sniff the existing calls on the client UI to see what calls the client UI is making. Search for “sniff” on our product documentation to find the article that shows you how to do this.
If you need assistance with integrations and advanced features, contact Tallyfy Support for additional services.