Public/New-GCLocation.ps1

<#
.SYNOPSIS
    Creates a new location.

.DESCRIPTION
    Creates a new location in Genesys Cloud.
    Uses the POST /api/v2/locations endpoint.

.PARAMETER Body
    The location definition object containing name, address, and other properties.

.EXAMPLE
    $locBody = @{ name = 'Main Office'; address = @{ city = 'Indianapolis'; state = 'IN' } }
    New-GCLocation -Body $locBody

.NOTES
    Genesys Cloud API: POST /api/v2/locations
#>

function New-GCLocation {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [object]$Body
    )

    $endpoint = "locations"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method POST -Body $Body
}