List all comments of a letter

GET /api/letter-comments?letter_id={letter_id}

Comments can only be returned for a particular letter.
Therefore letter_id is a mandatory parameter.

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

Get single comment

GET /api/letter-comments/{id}
<?xml version="1.0" encoding="UTF-8"?>
<letter-comment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <letter_id type="integer">1</letter_id>
    <user_id type="integer">1</user_id>
    <comment>Letter created.</comment>
    <actionkey>CREATED</actionkey>
    <public>0</public>
</letter-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/letter-comments?letter_id={letter_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)
ERROR_MAIL e-mail error

Create comment

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

Delete comment

DELETE /api/letter-comments/{id}