API Reference

for object "Invoices"

Find here the list of actions to apply on the objects, and the data reference for this object.




What is an invoice ?

An invoice (we call it a bill sheet) represents the document your company emits to bill a product or service sale to a customer.




Getting the invoices list

GET /bill_sheets.xml

Returns all invoices, page by page
Add a page parameter to navigate




Getting a single invoice

GET /bill_sheets/#{id}.xml

Returns a single invoice, identified by its id




Creating a new invoice

POST /bill_sheets.xml

Creates a new invoice, and returns the invoice data




Updating an existing invoice

PUT /bill_sheets/#{id}.xml

Updates some fields of an existing invoice




Deleting an existing invoice

DELETE /bill_sheets/#{id}.xml

Deletes the invoice identified by its id




Object data

<bill_sheet>
<sheet_type>invoice or credit note (see below)</sheet_type>
<sheet_subtype>0 for invoice or 1 for fees</sheet_subtype>
<progress_id>id of bill progress (see below)</progress_id>
<project_id>id of related project</project_id>
<reference>reference of invoice (automatic)</reference>
<contact_id>attached to contact id (0 if none)</contact_id>
<firm_id>attached to firm id (0 if none)</firm_id>
<title>title of invoice</title>
<subtitle>subtitle of invoice</subtitle>
<billing_date>billing date</billing_date>
<vat_value_id>vat code id (see below)</vat_value_id>
<vat_cost>vat value</vat_cost>
<shipping_cost>cost of shipping</shipping_cost>
<vat_exl_total>total of invoice without vat</vat_exl_total>
<vat_inc_total>total of invoice with vat</vat_inc_total>
<vat_exc_total_with_shipping>total of invoice without vat with shipping</vat_exc_total_with_shipping>
<bank_account_id>related bank account</bank_account_id>
<billing_add_street_address>billing street address</billing_add_street_address>
<billing_add_name>billing address complement</billing_add_name>
<billing_add_zip_code>billing address zip</billing_add_zip_code>
<billing_add_city>billing address city</billing_add_city>
<billing_add_country>billing address country</billing_add_country>
<shipping_add_street_address>shipping street address</shipping_add_street_address>
<shipping_add_name>shipping address complement</shipping_add_name>
<shipping_add_zip_code>shipping address zip</shipping_add_zip_code>
<shipping_add_city>shipping address city</shipping_add_city>
<shipping_add_country>shipping address country</shipping_add_country>
<lead_id>related to lead file</lead_id>
<projec_id>related to project</projec_id>
<reduction_percent>global percent of reduction</reduction_percent>
<partial_bill_percent>partial billing (100 for total bill)</partial_bill_percent>
<late_penalty_show>should display late penalty (0 or 1)</late_penalty_show>
<early_gain_show>should display early payment credit (0 or 1)</early_gain_show>
<bill_lines>
 <bill_line>
  <description>description of line</description>
  <description_more>more description of line</description_more>
  <unit_price>price per unit</unit_price>
  <quantity>quantity</quantity>
  <total_price>total line price</total_price>
  <vat_value_id>id of vat (see below)</vat_value_id>
  <vat_value>value of vat</vat_value>
  <ordering>ordering index</ordering>
 </bill_line>
</bill_lines>
</bill_sheet>


Possible values of vat_id

  • 222 for 2.1%

  • 223 for 5.5%

  • 224 for 19.6%

  • 225 for no VAT

  • 529 for 19%

  • 543 for 8.5%

  • 544 for 21%

  • 545 for 7.6%

  • 546 for 16%

  • 551 for 15%

  • 552 for 10%

  • 553 for 3%

  • 567 for 18%

  • 569 for 8.5% NPR

  • 607 for 20%

  • 615 for 6%



Possible values of bill progress

  • 617 for draft

  • 618 for done

  • 619 for sent to client



Possible values of bill sheet type

  • invoice if the sheet is for an invoice

  • credit if the sheet is for a credit