Symptom
"Error: Parse Error: Invalid major version"
Environment
SAP Cloud for Customer
Reproducing the Issue
1. Logon to Odata console for browser;
2. Reach out to the wanted service https://my000000.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/CorporateAccountCollection('00000000000000000000000000')
3. Executed PATCH for JSON with the below payload:
'{
"Email": "test@test.com",
"WebSite": "www.test.com"
}'
4. Error is thrown: "Error: Parse Error: Invalid major version"
Cause
JSON doesn't support quotation marks ('), you should use key braces ({).
Resolution
1. Logon to Odata console for browser;
2. Reach out to the wanted service https://my000000.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/CorporateAccountCollection('00000000000000000000000000')
3. Executed PATCH for JSON with the below payload:
{
"Email": "test@test.com",
"WebSite": "www.test.com"
}
= Successfully updated scenario.
Notice that since you are applying JSON format on your request, simple quotation marks are not allowed.
Keywords
Error; JSON; Patch, Parse; Invalid; Major; Version. , KBA , LOD-CRM-INT-API , OData API (C4C Only) , How To