List all incomings

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:

Parameter Description
supplier_id ID of the Suppliers
incoming_number incoming number of the incoming
status Status (OPEN, PAID, OVERDUE). More than one statuses could be given as a comma separated list. Theses statuses will be logically OR-connected.
from Only show incomings since this date (format YYYY-MM-DD)
to Only show incomings up to this date (format YYYY-MM-DD)
note Free text search in notes
tags Comma seperated 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:

Value Description
supplier Supplier
status status of an incoming
day day
week week (starts with monday)
month month
year year

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>
    <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 element Description Type Default value Mandatory
supplier_id ID of the Suppliers INT yes
address the sender address ALNUM Supplier’s address
number invoice number ALNUM yes
date Invoice date DATE yes
due_date due date DATE
note Explanatory notes ALNUM
total_net Total net amount FLOAT
total_gross Total gross amount FLOAT
currency_code Currency ISO currency code Supplier’s currency
quote Currency quote (for conversion into standard currency) FLOAT 1.0000
base64file Base64 encoded PDF or image. BASE64FILE
expense_account_number Expense account number INT
label Label text to describe the incoming invoice ALNUM
client_number Your customer number ALNUM
category Category ALNUM

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>