Trying to perform CRUD operations on a FreshDesk Custom Object. Having a challenge with Update Freshdesk. The error message is looking for an update to version, but it’s not in the documentation. Tried sending version:2 in the payload, but it didn’t work:
VERBOSE: Performing the operation "Set-FreshdeskCustomObjectRecord" on target "https://itsfine.freshdesk.com/api/v2/custom_objects/schemas/3724685/records/_0-4".
VERBOSE: Appending Authorization header
VERBOSE: Invoke-FreshworksRestMethod - Initiating REST API call to https://itsfine.freshdesk.com/api/v2/custom_objects/schemas/3724685/records/_0-4 with API key: XXXXXXX
VERBOSE: Invoke-FreshworksRestMethod - REST call parameters:
VERBOSE: Invoke-FreshworksRestMethod - Uri: https://itsfine.freshdesk.com/api/v2/custom_objects/schemas/3724685/records/_0-4
VERBOSE: Invoke-FreshworksRestMethod - ContentType: application/json; charset=utf-8
VERBOSE: Invoke-FreshworksRestMethod - UseBasicParsing: True
VERBOSE: Invoke-FreshworksRestMethod - ErrorAction: Stop
VERBOSE: Invoke-FreshworksRestMethod - Method: PUT
VERBOSE: Invoke-FreshworksRestMethod - Headers:
VERBOSE: Invoke-FreshworksRestMethod - Accept-Charset: utf-8
VERBOSE: Invoke-FreshworksRestMethod - Authorization: Basic XXXXXXX
VERBOSE: Invoke-FreshworksRestMethod - Body: {
"data": {
"date": "2024-03-21"
},
"display_id": "_0-4"
}
VERBOSE: Invoke-FreshworksRestMethod - Invoking REST PUT Method on https://itsfine.freshdesk.com/api/v2/custom_objects/schemas/3724685/records/_0-4...
VERBOSE: Invoke-FreshworksRestMethod - Forcing TLS 1.2 protocol for invoking REST method.
VERBOSE: Requested HTTP/1.1 PUT with 73-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Catching exception Microsoft.PowerShell.Commands.HttpResponseException with status code
VERBOSE: Throwing Default exception of type Microsoft.PowerShell.Commands.HttpResponseException
Invoke-WebRequest: C:\Build\FreshdeskPS\FreshdeskPS\Private\Invoke-FreshworksRestMethod.ps1:191:28
Line |
191 | $results = Invoke-WebRequest @restParams
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| { "error_type": "INVALID_INPUT", "message": "Invalid input", "errors": [ { "type": "record", "name": "version", "message": "Version information is missing in the record" } ] }
PS C:\Build\FreshdeskPS>
PS C:\Build\FreshdeskPS> Get-FDCustomObjectRecord -custom_object_id 3724685 -record_id '_0-4'
display_id : _0-4
created_time : 1710893851213
updated_time : 1710893851213
data : @{date=2024-03-19; name=Test2}
version : 1
metadata : @{primary_field_name=name}
_links : @{self=}
There is a version property in the schema, but nothing about it in the docs. Anyone that provide guidance? The payload matches the documentation, so hoping someone has solved this.