Public/Get-GCTaskManagementWorktype.ps1

<#
.SYNOPSIS
    Retrieves a single task management work type by ID.

.DESCRIPTION
    Returns the details of a specific work type from Genesys Cloud task management.
    Uses the GET /api/v2/taskmanagement/worktypes/{worktypeId} endpoint.

.PARAMETER WorktypeId
    The unique identifier of the work type to retrieve.

.EXAMPLE
    Get-GCTaskManagementWorktype -WorktypeId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

.NOTES
    Genesys Cloud API: GET /api/v2/taskmanagement/worktypes/{worktypeId}
#>

function Get-GCTaskManagementWorktype {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$WorktypeId
    )

    $endpoint = "taskmanagement/worktypes/$WorktypeId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}