List all confirmation items

GET /api/confirmation-items?confirmation_id={confirmation_id}

Invoice items can only be returned for a particular invoice.
Therefore confirmation_id is a mandatory parameter.

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

Get a single item

GET /api/confirmation-items/{id}
<?xml version="1.0" encoding="UTF-8"?>
<confirmation-item>
    <id type="integer">1</id>
    <article_id type="integer">123</article_id>
    <confirmation_id type="integer">1</confirmation_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">49.98</total_gross>
    <total_net type="float">42.0</total_net>
    <reduction>10</reduction>
    <total_gross_unreduced type="float">61.88</total_gross_unreduced>
    <total_net_unreduced type="float">52.0</total_net_unreduced>
</confirmation-item>

Create item

POST /api/confirmation-items

Credit note items can only be created for invoices with draft status (DRAFT).

XML element Description Type Default value Mandatory
confirmation_id ID of the confirmation INT yes (except for creation of a confirmation)
article_id ID of the article, sets additionally the values from the article on creation INT
unit Unit ALNUM
quantity Quantity FLOAT 0.0
unit_price Price per unit FLOAT 0.0
tax_name Name of the tax ALNUM Default tax rate
tax_rate Rate of taxation FLOAT Default tax rate
title Title ALNUM
description Description ALNUM
reduction Reduction (absolute or percent: 10/10%) ALNUM

The confirmation item is added to evenutell already existing positions.

<confirmation-item>
    <confirmation_id>1</confirmation_id>
    <unit>Piece</unit>
    <quantity>5.2</quantity>
    <unit_price>10.0</unit_price>
    <tax_name>VAT</tax_name>
    <tax_rate>19.0</tax_rate>
    <title>Business cards</title>
    <description>Wonderful 4c business cards</description>
</confirmation-item>
<?xml version="1.0" encoding="UTF-8"?>
<confirmation-item>
    <id type="integer">1</id>
    <article_id />
    <confirmation_id type="integer">1</confirmation_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>VAT</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>
</confirmation-item>

Edit item

PUT /api/confirmation-items/{id}

Here the same parameters apply as for creating, however, the associated confirmation (confirmation_id) can not be changed.
Confirmation items can be edited only for confirmations with draft status (DRAFT).

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

Delete item

DELETE /api/confirmation-items/{id}

When deleting an confirmation item, position of the remaining items is reassigned (without changing the sorting) to fill the resulting gap.
Confirmation items can be deleted only for confirmations with draft status (DRAFT).