API Documentation

Overview
Time Tracking

Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories


Questions? Contact support

Invoice Messages

Important: this assumes invoice feature is enabled for your account.

Invoice messages are notes displayed in the activity log section of an invoice.


Show all messages sent for an invoice

GET /invoices/#{invoice_id}/messages

HTTP Response: 200 Success
<invoice-messages type="array">
  <invoice-message>
    <body>The message body goes here</body>
    <created-at type="datetime">2008-04-09T20:44:54Z</created-at>
    <id type="integer">409</id>
    <invoice-id type="integer">1420</invoice-id>
    <send-me-a-copy type="boolean">true</send-me-a-copy>
    <sent-by>My Name</sent-by>
    <sent-by-email>my@email.com</sent-by-email>
    <!-- comma separated list of recipient email addresses using the
         "Name <emai@domain.com>" format -->
    <full-recipient-list>Jane Doe &lt;jane@doe.org&gt;,
     My Name &lt;my@email.com&gt;</full-recipient-list>
  </invoice-message>
  <!-- ... -->
</invoice-messages>

Show a particular message

GET /invoices/#{invoice_id}/messages/#{message_id}

HTTP Response: 200 Success
<invoice-message>
  <body>Anther message body goes here</body>
  <created-at type="datetime">2008-04-09T20:46:34Z</created-at>
  <id type="integer">403</id>
  <invoice-id type="integer">1420</invoice-id>
  <send-me-a-copy type="boolean">true</send-me-a-copy>
  <sent-by>My Name</sent-by>
  <sent-by-email>my@email.com</sent-by-email>
  <full-recipient-list>Jane Doe &lt;jane@doe.org&gt;,
   My Name &lt;my@email.com&gt;</full-recipient-list>
</invoice-message>



Send an invoice

POST /invoices/#{invoice_id}/messages

HTTP Response: 201 Created
Location: /invoices/#{invoice_id}/messages/#{new_id}
<invoice-message>
  <body>Message body</body>
  <recipients>support@getharvest.com, help@getharvest.com</recipients>
  <attach-pdf type="boolean">true</attach-pdf>
  <send-me-a-copy type="boolean">true</send-me-a-copy>
</invoice-message>

Delete existing message

DELETE /invoices/#{invoice_id}/messages/#{message_id}

HTTP Response: 200 OK.
Create a message for marking an invoice as sent

POST /invoices/#{invoice_id}/messages/mark_as_sent

HTTP Response: 200 OK.
<invoice-message>
  <body>Optional message body goes here</body>
</invoice-message>

Create a message for marking an open invoice as closed (writing an invoice off)

POST /invoices/#{invoice_id}/messages/mark_as_closed

HTTP Response: 200 OK.
<invoice-message>
  <body>Optional message body goes here</body>
</invoice-message>

Create a message for re-opening a closed (written-off) invoice

POST /invoices/#{invoice_id}/messages/re_open

HTTP Response: 200 OK.
<invoice-message>
  <body>Optional message body goes here</body>
</invoice-message>

Create a message for marking an open invoice as draft

POST /invoices/#{invoice_id}/messages/mark_as_draft

HTTP Response: 200 OK.