Comments

List all comments of an invoice

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

Comments can only be returned for a particular invoice.
Therefore invoice_id is a mandatory parameter.

<?xml version="1.0" encoding="UTF-8"?>
<invoice-comments type="array" page="1" per_page="100" total="2">
    <invoice-comment>
        ...
    </invoice-comment>
    <invoice-comment>
        ...
    </invoice-comment>
</invoice-comments>

Get single 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>
    <actionkey>CREATED</actionkey>
    <public>0</public>
</invoice-comment>

actionkey

The value for actionkey indicates by what kind of comment it is. It is set for all actions that were triggered by the system.
With the actionkey a filtering is possible. In this case, multiple values ​​can be specified. They are separated by a comma.

GET /api/invoice-comments?invoice_id={invoice_id}&actionkey=CREATE,COPY
actionkeyDescription
COMMENTa comment that was entered by the user
CREATEcreated
COPYcopied
CREATE_FROM_OFFERcreated from an estimate
CREATE_FROM_INVOICEcreated as a correction of an invoice
CREATE_FROM_RECURRINGcreated from a recurring
STATUSstatus changed
PAYMENTpayment received
PAYMENT_ERRORpayment error
DELETE_PAYMENTpayment deleted
MAILsent (e-mail)
LETTERsent (letter)
FAXsent (fax)
SIGNsigned
SIGN_MAILsend signed
CANCELcanceled
ERROR_MAILe-mail error
CREATE_CREDIT_NOTEcredit note created
REMINDER_CREATEreminder created
REMINDER_STATUSstatus of reminder changed
REMINDER_MAILreminder sent (e-mail)
REMINDER_ERROR_MAILreminder e-mail error
REMINDER_LETTERreminder sent (letter)
REMINDER_FAXreminder sent (fax)
REMINDER_SIGNreminder signed
REMINDER_SIGN_MAILreminder sent signed
REMINDER_CANCELreminder canceled
REMINDER_DELETEreminder deleted

Create comment

POST /api/invoice-comments
XML elementDescriptionTypeDefault valueMandatory
invoice_idID of the invoiceINTyes
commentComment textALNUMyes
publicShould the comment be displayed in the customer portal (0 = no, 1 = yes)?BOOL0no
<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>
    <actionkey>COMMENT</actionkey>
    <public>0</public>
</invoice-comment>

Delete comment

DELETE /api/invoice-comments/{id}