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 /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>
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
actionkey | Description |
---|---|
COMMENT | a comment that was entered by the user |
CREATE | created |
COPY | copied |
CREATE_FROM_OFFER | created from an estimate |
CREATE_FROM_INVOICE | created as a correction of an invoice |
CREATE_FROM_RECURRING | created from a recurring |
STATUS | status changed |
PAYMENT | payment received |
PAYMENT_ERROR | payment error |
DELETE_PAYMENT | payment deleted |
sent (e-mail) | |
LETTER | sent (letter) |
FAX | sent (fax) |
SIGN | signed |
SIGN_MAIL | send signed |
CANCEL | canceled |
ERROR_MAIL | e-mail error |
CREATE_CREDIT_NOTE | credit note created |
REMINDER_CREATE | reminder created |
REMINDER_STATUS | status of reminder changed |
REMINDER_MAIL | reminder sent (e-mail) |
REMINDER_ERROR_MAIL | reminder e-mail error |
REMINDER_LETTER | reminder sent (letter) |
REMINDER_FAX | reminder sent (fax) |
REMINDER_SIGN | reminder signed |
REMINDER_SIGN_MAIL | reminder sent signed |
REMINDER_CANCEL | reminder canceled |
REMINDER_DELETE | reminder deleted |
POST /api/invoice-comments
XML element | Description | Type | Default value | Mandatory |
---|---|---|---|---|
invoice_id | ID of the invoice | INT | yes | |
comment | Comment text | ALNUM | yes | |
public | Should the comment be displayed in the customer portal (0 = no, 1 = yes)? | BOOL | 0 | no |
<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 /api/invoice-comments/{id}