myMap = map();
myMap.put("organization_id", "*****");
myMap.put("customer_id", "*****");
myMap.put("reference_number", input.Reference);
myMap.put("date", input.Credit_Note_Date);
Item = List();
for each value in Item_Details
{
Item.add(value.Tax);
Item.add(value.Rate);
Item.add(value.Notes);
Item.add(value.Item_Description);
Item.add(value.Terms1);
Item.add(value.unit);
Item.add(value.Item_Details);
Item.add(value.quantity);
}
myMap.put("line_items", Item);
requestMap = { "authtoken" : "********", "JSONString" : myMap.toString(), "scope" : "ZohoInvoice/invoiceapi" };
var1 = postUrl(baseUrl, requestMap,false);
But i am getting the error ' The request had bad request or was inherently impossible to be satisfied'.
Kindly assist me.