Dear team,
I have written a apex code to add sub-item with column values. but getting some error like “Parse error on/”…
Below is my Apex code -
String bodyText =‘{“query”:“mutation{ create_subitem (parent_item_id: ‘+theOppty.Item_Id__c+’, item_name: \”’+ins.name+‘\“,column_values: \”{\“status\” : { \“index\” : 10 }}\" ){ id board { id }}}"}’;
    HttpRequest httpReq = new HttpRequest();
    httpReq.setMethod('POST');
    String end_point = 'https://api.monday.com/';
    end_point += APIVersion +'/';
    
    httpReq.setHeader('Content-Type', 'application/json');
    httpReq.setHeader('Authorization', access_token);
    httpReq.setEndpoint(end_point);
    httpReq.setBody(bodyText);
     Http con = new Http();
     HttpResponse hs = new HttpResponse();
     hs = con.send(httpReq);
But getting below error
{“errors”:[{“message”:“Parse error on " : { " (STRING) at [1, 101]”,“locations”:[{“line”:1,“column”:101}]}],“account_id”:9864834}
Here is my Mutation query:
{“query”:“mutation{ create_subitem (parent_item_id: 2718766531, item_name: "INS-981702",column_values: "{"status" : { "index" : 10 }}" ){ id board { id }}}”}
Please help me understand this issue. Thanks
