Public/Set-GCLocation.ps1

<#
.SYNOPSIS
    Updates an existing location.

.DESCRIPTION
    Partially updates the specified location in Genesys Cloud.
    Uses the PATCH /api/v2/locations/{locationId} endpoint.

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

.PARAMETER Body
    The updated location properties.

.EXAMPLE
    $locBody = @{ name = 'Updated Office' }
    Set-GCLocation -LocationId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' -Body $locBody

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

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

        [Parameter(Mandatory = $true)]
        [object]$Body
    )

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