List all comments of an estimate

GET /api/offer-comments?offer_id={offer_id}

Comments can only be returned for a particular estimate.
Therefore offer_id is a mandatory parameter.

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

Get single comment

GET /api/offer-comments/{id}
<?xml version="1.0" encoding="UTF-8"?>
<offer-comment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <offer_id type="integer">1</offer_id>
    <user_id type="integer">1</user_id>
    <comment>Estimate created</comment>
    <actionkey>CREATED</actionkey>
    <public>0</public>
</offer-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/offer-comments?offer_id={offer_id}&actionkey=CREATE,COPY
actionkey Description
COMMENT a comment that was entered by the user
CREATE created
COPY copied
STATUS status changed
MAIL sent (e-mail)
LETTER sent (letter)
FAX sent (fax)
CANCEL canceled
ERROR_MAIL e-mail error
VALIDITY validity date reached

Create comment

POST /api/offer-comments
XML element Description Type Default value Mandatory
offer_id ID of the estimate INT yes
comment Comment ALNUM yes
public Should the comment be displayed in the customer portal (0 = no, 1 = yes)? BOOL 0 no
<offer-comment>
    <offer_id>1</offer_id>
    <comment>Let's go</comment>
</offer-comment>
<?xml version="1.0" encoding="UTF-8"?>
<offer-comment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <offer_id type="integer">1</offer_id>
    <user_id type="integer">1</user_id>
    <comment>Let's go</comment>
    <actionkey>COMMENT</actionkey>
    <public>0</public>
</offer-comment>

Delete comment

DELETE /api/offer-comments/{id}