invoice.create Create a new invoice complete with line items. If successful, returns the invoice_id of the newly created invoice.
<?xml version="1.0" encoding="UTF-8"?> <request method="invoice.create"> <invoice> <invoice_number>1001</invoice_number> //If not present, the next invoice number is used <invoice_date>2007-09-28</invoice_date> //mandatory <po_number>12345</po_number> <client_id>1</client_id> //mandatory <currency>USD</currency> //mandatory <tax>8.75%</tax> //percent <freight>3.45</freight> <terms>NET 60</terms> //mandatory possible values: NET 15, NET 30, NET 45, NET 60, or date: e.g. 2007-09-28 <late_fee>1.5%</late_fee> //mandatory possible values: 1%, 1.5%, 2% or amount: e.g. 1.45 <tags>tag1 tag2 tag3</tags> <lines> <line> //invoice must have at least 1 line <quantity>2</quantity> <kind>Hours</kind> //mandatory possible values: Hours, Days, Product, Expense <description>description1</description> <tax>1</tax> //possible values: 1 (have tax) or 0 <price>1.00</price> //must be numeric value </line> <line> <quantity>2</quantity> <kind>Days</kind> <description>description2</description> <tax>0</tax> <price>2.00</price> </line> <line> <quantity>2</quantity> <kind>Product</kind> <description>descr3</description> <tax>1</tax> <price>3.00</price> </line> </lines> <notes>test notes</notes> </invoice> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <invoice_id>1</invoice_id> </response>
invoice.update Update an existing invoice with the given invoice_id. Any invoice fields left out of the request will remain unchanged. If you do not specify a <lines> element, the existing lines will remain unchanged.
<?xml version="1.0" encoding="UTF-8"?> <request method="invoice.update"> <invoice> <invoice_id>1</invoice_id> # Invoice to update # Remaining arguments same as invoice.create </invoice> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>
invoice.get Return the complete invoice details associated with the given invoice_id.
<?xml version="1.0" encoding="UTF-8"?> <request method="invoice.get"> <invoice_id>1</invoice_id> </request>
<?xml version="1.0"?> <response status="ok"> <invoice> <invoice_id>1</invoice_id> <status>open</status> <invoice_number>1001</invoice_number> <invoice_date>2007-09-28</invoice_date> <date_created>2007-09-28</date_created> <date_updated>2007-10-28</date_updated> <po_number>12345</po_number> <client_id>1</client_id> <currency>USD</currency> <tax>8.75%</tax> <freight>3.45</freight> <terms>NET 60</terms> <late_fee>1.5%</late_fee> <tags>tag1 tag2 tag3</tags> <lines> <line> <quantity>2</quantity> <kind>Hours</kind> <description>description1</description> <tax>1</tax> <price>1.00</price> </line> <line> <quantity>2</quantity> <kind>Days</kind> <description>description2</description> <tax>0</tax> <price>2.00</price> </line> <line> <quantity>2</quantity> <kind>Product</kind> <description>descr3</description> <tax>1</tax> <price>3.00</price> </line> </lines> <notes>test notes</notes> </invoice> </response>
invoice.delete Delete an existing invoice.
<?xml version="1.0" encoding="UTF-8"?> <request method="invoice.delete"> <invoice_id>1</invoice_id> </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>
invoice.list Returns a list of invoice summaries.
<?xml version="1.0" encoding="UTF-8"?> <request method="invoice.list"> <client_id>1</client_id> # Filter by client (Optional) <date_from>2007-01-01</date_from> # Return invoices dated after this arg (Optional) <date_to>2007-09-28</date_to> # Return invoices dated before this arg (Optional) <date_updated_from>2007-01-01</date_updated_from> # Return invoices updated after this arg (Optional) <date_updated_to>2008-01-01</date_updated_to> # Return invoices updated before this arg (Optional) <date_created_from>2007-01-01</date_created_from> # Return invoices created after this arg (Optional) <date_created_to>2008-01-01</date_created_to> # Return invoices created before this arg (Optional) <status>draft</status> # Filter by status - draft, open, closed, pastdue (Optional) <orderby>id</orderby> # Order by id, invoice_number, invoice_date. Default is id. (Optional) <sort>DESC</sort> # Sort - ASC, DESC. Default is DESC. (Optional) <page>1</page> # Page number to return, default is 1 (Optional) <per_page>10</per_page> # Number of results per page, default is 25 (Optional) </request>
<?xml version="1.0"?> <response status="ok"> <invoice> <invoice_id>1</invoice_id> <status>open</status> <invoice_number>1001</invoice_number> <invoice_date>2007-09-28</invoice_date> <date_created>2007-09-28</date_created> <date_updated>2007-10-28</date_updated> <po_number>12345</po_number> <client_id>1</client_id> <currency>USD</currency> <tax>8.75%</tax> <freight>3.45</freight> <terms>NET 60</terms> <late_fee>1.5%</late_fee> <tags>tag1 tag2 tag3</tags> <lines> <line> <quantity>2</quantity> <kind>Hours</kind> <description>description1</description> <tax>1</tax> <price>1.00</price> </line> <line> <quantity>2</quantity> <kind>Days</kind> <description>description2</description> <tax>0</tax> <price>2.00</price> </line> <line> <quantity>2</quantity> <kind>Product</kind> <description>descr3</description> <tax>1</tax> <price>3.00</price> </line> </lines> <notes>test notes</notes> </invoice> </response>
invoice.send Send an existing invoice.
<?xml version="1.0" encoding="UTF-8"?> <request method="invoice.send"> <invoice_id>1</invoice_id> # mandatory <contacts> <contact> <contact_id>2</contact_id> </contact> </contacts> <payment_gateways> <payment_gateway> <code >paypal</code > </payment_gateway> <payment_gateway> <code >google</code > </payment_gateway> </payment_gateways> <message>This is your invoice.</message> <send_me_a_copy>1</send_me_a_copy> # 1 - send me a copy, 0 - do not send me a copy </request>
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"/>