Skip to content

Get tag

Endpoint

GET /organizations/{org_id}/tags/{tag_id}

This endpoint retrieves the details for a single tag identified by its unique ID.

Request

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

Headers

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

Query parameters (optional)

  • with (string): Include additional related data, e.g., statistics.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const tagId = 'TAG_ID_TO_GET';
const queryParams = '?with=usage_count'; // Example: Include usage stats
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tags/${tagId}${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 tag ${tagId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data; // Pass successful data along
});
})
.then(data => {
console.log(`Successfully retrieved tag ${tagId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error getting tag ${tagId}:`, error.message);
});

Response

A successful request returns a 200 OK status code and a JSON object containing a data field with the tag’s details.

{
"data": {
"id": "TAG_ID_TO_GET",
"title": "Urgent",
"color": "#e74c3c",
"template": 5,
"active_process": 12,
"auto_generated": false,
"created_at": "2024-01-15T10:00:00Z",
"deleted_at": null,
// Included if requested with 'with=statistics'
"statistics": {
// ... detailed usage counts ...
}
}
}

If the tag ID is not found or you lack permission, a 404 Not Found or 403 Forbidden error will be returned.


Tags > List tags

This endpoint retrieves all tags within an organization by making a GET request with optional query parameters for searching filtering and pagination while returning tag details like ID title color usage counts and creation timestamps in a JSON response.

Groups > Get group

The GET endpoint allows retrieving detailed information about a specific group within an organization using its unique ID through authenticated API requests with code examples in multiple programming languages.

Tasks > Get task

This API endpoint retrieves complete details for a specific Tallyfy task by its unique ID and supports optional query parameters to include related data like process run information and form fields while returning a JSON response containing task properties such as title status owners and deadline.

Members > Get member

This API endpoint retrieves detailed profile information for a specific organization member by their user ID and supports optional query parameters to include related data like statistics and group memberships with code examples provided in JavaScript Python Java Go C++ and C#.