Comments and History

List all com­ments of an estimate

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

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

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

Get sin­gle 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>
</offer-comment>

Create com­ment

POST /api/offer-comments
XML ele­ment Descrip­tion Type Default value Man­datory
offer_id ID of the esti­mate INT yes
com­ment Com­ment ALNUM yes
<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>
</offer-comment>

Delete com­ment

DELETE /api/offer-comments/{id}