List all incoming invoices

GET /api/incomings
<!--?xml version="1.0" encoding="UTF-8"?-->
<incomings type="array" page="1" per_page="100" total="2">

You can filter the result by parameters:

GET /api/incomings?number=RE123

Lists all incomings with “RE123” in the incoming number. Upper and lower case are ignored.

The following filter parameters are available:

supplier_idID of the Suppliers
incoming_numberincoming number of the incoming
statusStatus (OPEN, PAID, OVERDUE). More than one statuses could be given as a comma separated list. Theses statuses will be logically OR-connected.
fromOnly show incomings since this date (format YYYY-MM-DD)
toOnly show incomings up to this date (format YYYY-MM-DD)
noteFree text search in notes
tagsComma separated list of tags

Aggregated list of incomings

GET /api/incomings?group_by=supplier

Incomings can also be found grouped together. The above example all incomings grouped by supplier.

The following values ​​are for parameter group_by are available:

statusstatus of an incoming
weekweek (starts with monday)

It can also be grouped according to several criteria. The desired values ​​are simply concatenated by commas (?group_by=supplier,year). The order of values ​​determines the order of aggregation.

The grouping parameters can also be combined with the other filters.

<!--?xml version="1.0" encoding="UTF-8"?-->
<incoming-groups type="array" currency_code="USD">
        <total_gross type="float">347.28</total_gross>
        <total_net type="float">291.83</total_net>
        <supplier_id type="integer">476</supplier_id>
            <supplier_id type="integer">476</supplier_id>
        <total_gross type="float">1127.53</total_gross>
        <total_net type="float">947.50</total_net>
        <supplier_id type="integer">477</supplier_id>
            <supplier_id type="integer">477</supplier_id>

Get a single incoming

GET /api/incomings/{id}
<!--?xml version="1.0" encoding="UTF-8"?-->
    <id type="integer">1</id>
    <supplier_id type="integer">123</supplier_id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <date type="date">2009-10-14</date>
    <due_date type="date">2009-10-24</due_date></incoming>
<address>Billomat GmbH & Co. KG
Hollertszug 26
57562 Herdorf

    <total_gross type="float">107.1</total_gross>
    <total_net type="float">90.0</total_net>
    <paid_amount type="float">20.0</paid_amount>
    <open_amount type="float">99.0</open_amount>
    <quote type="float">1.0000</quote>
    <expense_account_number type="float">12345</expense_account_number>

status can have the following values:

  • OPEN
  • PAID

Comments and payments can be accessed separately.

Create an incoming

POST /api/incomings

Creates a new incoming.

XML elementDescriptionTypeDefault valueMandatory
supplier_idID of the SuppliersINTyes
addressthe sender addressALNUMSupplier’s address
numberinvoice numberALNUMyes
dateInvoice dateDATEyes
due_datedue dateDATE
noteExplanatory notesALNUM
total_netTotal net amountFLOAT
total_grossTotal gross amountFLOAT
currency_codeCurrencyISO currency codeSupplier’s currency
quoteCurrency quote (for conversion into standard currency)FLOAT1.0000
base64fileBase64 encoded PDF or image.BASE64FILE
expense_account_numberExpense account numberINT
labelLabel text to describe the incoming invoiceALNUM
client_numberYour customer numberALNUM

The remaining properties of the account are automatically calculated.

    <note>Phone bill</note>
<!--?xml version="1.0" encoding="UTF-8"?-->
    <id type="integer">1234</id>
    <supplier_id type="integer">1</supplier_id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <date type="date">2009-11-18</date>
    <note>Phone bill</note>

Edit incoming

PUT /api/incomings/{id}

Comments could not be edited at the invoice. Please use the appropriate resource instead.


Delete incoming

DELETE /api/incomings/{id}

Deletes an incoming with all documents (PDFs) and comments.

Open pdf of an incoming

GET /api/incomings/{id}/pdf

At this point, the parameter format=pdf can also be used to open the PDF directly with MIME type “application/pdf”.

    <id type="integer">4882</id>
    <created type="datetime">2009-09-02T12:04:15+02:00</created>
    <incoming_id type="integer">240</incoming_id>
    <base64file>{base64 encoded PDF}</base64file>