Hi,
I am following your API documentation to record a payment against an invoice and mark invoice as paid but the API is not working.
I have the below json parameter
{"JSONString":{"customer_id":"2058964000000074031","payment_mode":"cash","amount":105,"account_id":"450000000000353","date":"2019-10-31","invoices":[{"invoice_id":"2058964000000093105","amount_applied":105}]}}
code:
parameters = Map();
invoicedetails = Map();
invoicedetails.put("invoice_id","2058964000000093105");
invoicedetails.put("amount_applied",105);
inv = list();
inv.add(invoicedetails);
parameters.put("customer_id","2058964000000074031");
parameters.put("payment_mode","cash");
parameters.put("amount",105);
parameters.put("date","2019-10-31");
parameters.put("invoices",inv);
data = Map();
data.put("JSONString",parameters);
info data;
resp = invokeurl
[
url :"
https://inventory.zoho.com/api/v1/customerpayments?organization_id=" + organizationID
type :POST
parameters:data
headers:header
];
info resp;
//header info is using correct auth token and content type format so I did not provided here.
The API is failing with error as below
{"code":1000,"message":"Internal Error"}
please let me know as what is incorrect here?