Public/Get-GCExternalOrganization.ps1

<#
.SYNOPSIS
    Retrieves a single external organization by ID.

.DESCRIPTION
    Returns the details of a specific external organization from Genesys Cloud.
    Uses the GET /api/v2/externalcontacts/organizations/{externalOrganizationId} endpoint.

.PARAMETER ExternalOrganizationId
    The unique identifier of the external organization to retrieve.

.EXAMPLE
    Get-GCExternalOrganization -ExternalOrganizationId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

.NOTES
    Genesys Cloud API: GET /api/v2/externalcontacts/organizations/{externalOrganizationId}
#>

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

    $endpoint = "externalcontacts/organizations/$ExternalOrganizationId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}