Error creating an invoice via JSON
Hi all!
I'm sending this request to create an invoice with JSON:
$url = "https://invoice.zoho.com/api/v3/".$this->service."?authtoken=".$this->authtoken."&organization_id=".$this->organization_id."&JSONString=".$this->json_data; $curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);//Set to return data to string ($response)
curl_setopt($curl, CURLOPT_POST, TRUE);//Regular post
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: multipart/form-data") );
//curl_setopt($curl, CURLOPT_POSTFIELDS, "JSONString=".$this->json_data);
For the last line I tried also: curl_setopt($curl, CURLOPT_POSTFIELDS, $this->json_data);
But I always get this message: {"code":2,"message":"The request passed is not valid."}
Have any idea?
Thank you