Public/Remove-GCLocation.ps1

<#
.SYNOPSIS
    Deletes a location.

.DESCRIPTION
    Removes the specified location from Genesys Cloud.
    Uses the DELETE /api/v2/locations/{locationId} endpoint.

.PARAMETER LocationId
    The unique identifier of the location to delete.

.EXAMPLE
    Remove-GCLocation -LocationId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

.NOTES
    Genesys Cloud API: DELETE /api/v2/locations/{locationId}
#>

function Remove-GCLocation {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$LocationId
    )

    $endpoint = "locations/$LocationId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method DELETE
}