Public/PropertyCustomFields/Update-AspirePropertyCustomField.ps1
|
<#
.SYNOPSIS Updates an existing property custom field in the Aspire API. .DESCRIPTION Uses Invoke-AspireRequest to perform a PUT request to the /PropertyCustomFields endpoint. .PARAMETER PropertyCustomFieldValueID The ID of the property custom field value to update (required). .PARAMETER ColumnValue Optional value for the custom field (max 2000 characters). .OUTPUTS The response from the API containing the result. .EXAMPLE Update-AspirePropertyCustomField -PropertyCustomFieldValueID 456 -ColumnValue "Updated Value" #> function Update-AspirePropertyCustomField { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [int]$PropertyCustomFieldValueID, [string]$ColumnValue = $null ) $body = @{ PropertyCustomFieldValueID = $PropertyCustomFieldValueID } if ($ColumnValue) { $body.ColumnValue = $ColumnValue } return Invoke-AspireRequest -Method PUT -Path "/PropertyCustomFields" -Body $body -ApiVersion $null } |