Skip to content

Get task

Endpoint

GET /organizations/{org_id}/tasks/{task_id}

This endpoint retrieves the full details for a single Tallyfy task (either a one-off task or a task within a process run) identified by its unique ID.

Request

Replace {org_id} with your Organization ID and {task_id} with the specific ID of the task you want to retrieve.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Query parameters (optional)

  • with (string): Include related data. For tasks, common options might include run, step, threads, assets, form_fields, tags, summary. Example: with=run,step,form_fields.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const taskId = 'TASK_ID_TO_GET'; // ID of the task
const queryParams = '?with=run,step,form_fields,tags'; // Example: get related info
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tasks/${taskId}${queryParams}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'GET',
headers: headers
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) {
console.error(`Failed to get task ${taskId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully retrieved task ${taskId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error getting task ${taskId}:`, error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing a data field. The value of data is an object representing the requested task with its full details.

{
"data": {
"id": "TASK_ID_TO_GET",
"increment_id": 1205,
"title": "Review Proposal",
"summary": "Review the proposal document attached.",
"run_id": "run_id_xyz",
"step_id": "step_id_123",
"status": "active",
"task_type": "member", // or "guest"
"owners": { ... },
"deadline": "YYYY-MM-DDTHH:MM:SSZ",
"created_at": "YYYY-MM-DDTHH:MM:SSZ",
"last_updated": "YYYY-MM-DDTHH:MM:SSZ",
"position": 1,
// ... other task properties ...
// Included if requested with 'with=form_fields':
"form_fields": [
{
"id": "capture_id_abc",
"label": "Approval Status",
"field_type": "dropdown",
"value": { "id": 1, "text": "Approved", "value": null }, // Value depends on field type
"required": true
// ... other form field details ...
}
],
// Included if requested with 'with=run':
"run": { ... process run details ... },
// Included if requested with 'with=step':
"step": { ... template step details ... }
}
}

If the task ID is not found or you don’t have permission, you will likely receive a 404 Not Found or 403 Forbidden error.


Processes > Get process

This API endpoint retrieves complete details about a specific Tallyfy process run using its unique ID and supports optional query parameters to include related data like tasks and form field values along with a special next_task parameter that returns the first visible incomplete task in the process.

Tags > Get tag

This API endpoint retrieves detailed information about a specific tag in an organization by its unique ID and supports optional parameters to include additional data like usage statistics.

Tasks > List process tasks

This endpoint retrieves all tasks belonging to a specific process run by providing the organization ID and run ID with optional query parameters for filtering by status owners deadlines and sorting while returning paginated results containing task details like title position status and related step information.

Tasks > List organization tasks

The GET endpoint retrieves all tasks across an organization’s processes and one-off tasks with extensive filtering options including status assignees deadlines tags folders and pagination while supporting multiple programming languages through code samples that demonstrate query parameter construction and response handling.