Get your own customer support community
 

Creating an invoice with CURL - Example XML for an invoice including Amount and VAT rate

Hi,

I have recently joined the trial program and am trying to create a very simple invoice using CURL.The only requirement is for the invoice XML to contain invoice date, invoice amount, vat rate, client, and project.

However, the server is not accepting the simple XML I am sending. The XML I am sending on the CURL command is:
-- pretty printed here for easy of viewing

<invoice>
<company-id type="integer">3049</company-id>
<project-id type="integer">14651</project-id>
<contact-id type="integer">20769</contact-id>
<dated-on type="datetime">2009-06-28T00:00:00Z</dated-on>
<due-on type="datetime">2009-07-28T00:00:00Z</due-on>
<reference>8949</reference>
<net-value type="decimal">100.0</net-value>
<sales-tax-value type="decimal">15.0</sales-tax-value>
<status>Draft</status>
<comments>kjk</comments>
<payment-terms-in-days type="integer">30</payment-terms-in-days>
</invoice>

and the error I get from the server is:

<html><body><h1>500 Internal Server Error</h1>If you are the administrator of th
is website, then please read this web application's log file to find out what went wrong.</body></html>

Any ideas on what could be the problem ?
Could you please send us an example XML that we could pass into CURL to create a really simple invoice that includes Amount and VAT rate ?

Thank you !
Jos
 
happy I’m happy
Inappropriate?
1 person has this question
See the changes made to this question
User_default_medium