Hello Salesforce community,
I'm currently working on integrating with a REST API and facing an issue with passing JSON data in the URL. Whenever I try to include JSON data, specifically the provided JSON data below, the double quotes within the JSON get misinterpreted, leading to errors in the API request.
JSON Data:
{
"flowName": "TestFlow",
"Id": "0Q04x000005cNCdCAM",
"Name": "TestName",
"inputForInsert": [
{
"testLineItem": {
"testId": "0Q04x000005cNCdCAM",
"testId": "01t4x000006WORWAA4",
"Quantity" : 100
},
"customObject__c": {
"Quantity__c": 100
}
}
],
"inputForupdate": {
"testLineItem": {
"0QL4x0000010h1QGAQ": {
"testId": "0QL4x0000010h1QGAQ",
"Quantity" : 555
}
},
"customObject__c": {
"0QL4x0000010h1QGAQ": {
"Quantity__c": 555
}
}
}
}
I'm using the following URL: https://sampledomain/services/apexrest/restApiAuthorization/?inputParams=
Could someone please guide me on the best practices for passing this JSON data in the given URL without misinterpreting the double quotes? Are there any specific encoding methods or techniques that I should be using to preserve the integrity of the JSON structure?
Your assistance and insights would be highly appreciated!
Thank you in advance.
methodType=POST
param won't make it a POST call.