Comments and History

List all com­ments of an invoice

GET /api/invoice-comments?invoice_id={invoice_id}

Com­ments can only be retur­ned for a par­ti­cu­lar invoice.
The­re­fore invoice_id is a man­datory parameter.

<?xml version="1.0" encoding="UTF-8"?>
<invoice-comments type="array">
    <invoice-comment>
        ...
    </invoice-comment>
    <invoice-comment>
        ...
    </invoice-comment>
</invoice-comments>

Get sin­gle comment

GET /api/invoice-comments/{id}
<?xml version="1.0" encoding="UTF-8"?>
<invoice-comment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <invoice_id type="integer">1</invoice_id>
    <user_id type="integer">1</user_id>
    <comment>Invoice created.</comment>
</invoice-comment>

Create com­ment

POST /api/invoice-comments
XML ele­ment Descrip­tion Type Default value Man­datory
invoice_id ID of the invoice INT yes
com­ment Com­ment text ALNUM yes
<invoice-comment>
    <invoice_id>1</invoice_id>
    <comment>Client will pay next week.</comment>
</invoice-comment>
<?xml version="1.0" encoding="UTF-8"?>
<invoice-comment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <invoice_id type="integer">1</invoice_id>
    <user_id type="integer">1</user_id>
    <comment>Client will pay next week.</comment>
</invoice-comment>

Delete com­ment

DELETE /api/invoice-comments/{id}