When configuring the HTTP Callout Action in a record triggered flow, I am using Connect for Schema - Connect with Sample Response, sending the sample Request Body:
{
"attributes": {
"FID": "1",
"CPE_Location_Status__c": "X"
}
}
and it is responding with:
[Error Message]: The HTTP callout for the PATCH method failed. Expected declared response media type application/json, but got text/html; charset=utf-8 for operation DefaultOperationName and service DefaultServiceName
I have tried including a custom header in Named Credentials with Name: Accept Value: application/json and also with Value: text/html; charset=utf-8, but no luck.
Is that message coming from the API service regarding the request body, or from Salesforce regarding the response body? What am I doing wrong? Thanks
Thanks for your help Keiji. That prompted me to look deeper into the API service's documentation, then I found that the ArcGIS REST API supports responses in several formats. &f=json for response in a JSON object in Esri JSON format.
•ESRI Developer ArcGIS REST APIs Output formats
Problem solved! This was not a Salesforce problem at all.