{\"code\":\"MANDATORY_NOT_FOUND\",\"details\":{\"api_name\":\"data\"},\"message\":\"required field not found\",\"status\":\"error\"}\n code example
Example: {\"code\":\"MANDATORY_NOT_FOUND\",\"details\":{\"api_name\":\"data\"},\"message\":\"required field not found\",\"status\":\"error\"}\n
$moduleIns=ZCRMRestClient::getInstance()->getModuleInstance("Invoices");
$records=array();
$record=ZCRMRecord::getInstance("Invoices",null);
$record->setFieldValue("Subject","Invoice1");
$record->setFieldValue("Account_Name","554023000000366005");
$lineItem=ZCRMInventoryLineItem::getInstance(null);
$lineItem->setDescription("Product_description");
$lineItem ->setDiscount(5);
$lineItem->setListPrice(100);
$taxInstance1=ZCRMTax::getInstance("VAT");
$taxInstance1->setPercentage(2);
$taxInstance1->setValue(50);
$lineItem->addLineTax($taxInstance1);
$taxInstance1=ZCRMTax::getInstance("Sales_Tax");
$taxInstance1->setPercentage(12);
$taxInstance1->setValue(50);
$lineItem->addLineTax($taxInstance1);
$lineItem->setProduct(ZCRMRecord::getInstance("Price_Books",554023000000504001));
$lineItem->setQuantity(100);
$record->addLineItem($lineItem);
array_push($records, $record);
$responseIn=$moduleIns->createRecords($records);
foreach($responseIn->getEntityResponses() as $responseIns){
echo "HTTP Status Code:".$responseIn->getHttpStatusCode();
echo "Status:".$responseIns->getStatus();
echo "Message:".$responseIns->getMessage();
echo "Code:".$responseIns->getCode();
echo "Details:".json_encode($responseIns->getDetails());
}