You are not logged in.
I tried to create invoice with api.
I send the creating xml code and get the result xml from FB. But I always get the wrong invoice id which is different from the real one in my FB.
IE: An invoice id 00000072 was created in my FB. but the result xml is 00000060, which is 12 less than the real one.
Below is the difference between 2 ids.
The real one in FB, the result xml
00000072, 00000060
00000073, 00000061
00000074, 00000062
00000075, 00000063
00000076, 00000064
00000077, 00000065
My code is as below:
<request method="invoice.create">
<invoice>
<client_id>1618</client_id>
<po_number>Test9081201</po_number>
<notes>Test1 line1</notes>
<discount></discount>
<lines>
<line>
<name>40010-ChEx WB</name>
<description>Test90812011 Lb shipment to China via Chex</description> <unit_cost>12.58</unit_cost>
<quantity>1</quantity>
<tax1_percent></tax1_percent>
<tax2_percent></tax2_percent>
</line>
<line>
<name>40035-ChExFS</name>
<description>ChEx Express Fuel Surcharge, 4.98%</description> <unit_cost>12.58</unit_cost>
<quantity>0.0498</quantity>
<tax1_percent></tax1_percent>
<tax2_percent></tax2_percent>
</line>
</lines>
</invoice>
</request>
Who can help me?
Offline
I think what you're running into is the difference between invoice IDs (which are just a number, and only used internally and in the API) and invoice numbers, which are shown in FreshBooks and printed at the top of invoices. The invoice number is the <number> element in the invoice create and get XML.
If that's not it, point me in the direction of your FreshBooks system and I'll go have a look.
Cheers,
Offline
I am new to this section, i am not able to send xml data to freshbooks.com how i can do that . Please help me .
Offline
Hi Congruent,
Welcome to the forums. If you could further clarify on your situation I might be better able to help you. If you have some source code that you are having trouble with feel free to post them into the forum.
Otherwise, we have a collection of source code samples in many languages located on our Sample Code page.
You can also find an overview of the API on our Developers Website.
Cheers,
Offline