Items

List all items of recurring invoices

GET /api/recurring-items?recurring_id={recurring_id}

Recurring items can only be returned for a particular recurring.
Therefore recurring_id is a mandatory parameter.

<?xml version="1.0" encoding="UTF-8"?>
<recurring-items type="array" page="1" per_page="100" total="2">
    <recurring-item>
        ...
    <recurring-item>
    <recurring-item>
        ...
    <recurring-item>
</recurring-items>

Get a single item

GET /api/recurring-items/{id}
<?xml version="1.0" encoding="UTF-8"?>
<recurring-item>
    <id type="integer">1</id>
    <article_id type="integer">123</article_id>
    <recurring_id type="integer">1</recurring_id>
    <position type="integer">1</position>
    <unit>Stück</unit>
    <quantity type="float">5.2</quantity>
    <unit_price type="float">10.0</unit_price>
    <tax_name>MwSt</tax_name>
    <tax_rate type="float">19.0</tax_rate>
    <title>Business cards</title>
    <description>Wonderful 4c business cards</description>
    <total_gross type="float">61.88</total_gross>
    <total_net type="float">52.0</total_net>
    <reduction>10</reduction>
    <total_gross_unreduced type="float">61.88</total_gross>
    <total_net_unreduced type="float">52.0</total_net>
</recurring-item>

Create item

POST /api/recurring-items
XML elementDescriptionTypeDefault valueMandatory
recurring_idID of the recurringINTyes (except for creation of an recurring)
article_idID of the article, sets additionally the values from the article on creationINT
unitUnitALNUM
quantityQuantityFLOAT0.0
unit_pricePrice per unitFLOAT0.0
tax_nameName of the taxALNUMDefault tax rate
tax_raterate of taxationFLOATDefault tax rate
titleTitleALNUM
descriptionDescriptionALNUM
reductionReduction (absolute or percent: 10/10%)ALNUM

The line item is added to evenutell already existing positions.

<recurring-item>
    <recurring_id>1</recurring_id>
    <unit>piece</unit>
    <quantity>5.2</quantity>
    <unit_price>10.0</unit_price>
    <tax_name>MwSt</tax_name>
    <tax_rate>19.0</tax_rate>
    <title>Business cards</title>
    <description>Wonderful 4c business cards</description>
    <total_gross type="float">49.98</total_gross>
    <total_net type="float">42.0</total_net>
</recurring-item>
<?xml version="1.0" encoding="UTF-8"?>
<recurring-item>
    <id type="integer">1</id>
    <article_id />
    <recurring_id type="integer">1</recurring_id>
    <created>2007-12-13T12:12:00+01:00</created>
    <position type="integer">1</position>
    <unit>Piece</unit>
    <quantity type="float">5.2</quantity>
    <unit_price type="float">10.0</unit_price>
    <tax_name>MwSt</tax_name>
    <tax_rate type="float">19.0</tax_rate>
    <title>Business cards</title>
    <description>Wonderful 4c Business cards</description>
    <total_gross type="float">61.88</total_gross>
    <total_net type="float">52.0</total_net>
</recurring-item>

Edit item

PUT /api/recurring-items/{id}

Here the same parameters apply as for creating, however, the associated recurring (recurring_id) can not be changed.

<recurring-item>
    <unit>hour</unit>
    <quantity>8.5</quantity>
</recurring-item>

Delete item

DELETE /api/recurring-items/{id}

When deleting an recurring item, position of the remaining positions is reassigned (without changing the sorting) to fill the resulting gap.