Estimate Messages
The estimate message object
Attribute | Type | Description |
---|---|---|
id |
integer | Unique ID for the message. |
sent_by |
string | Name of the user that created the message. |
sent_by_email |
string | Email of the user that created the message. |
sent_from |
string | Name of the user that the message was sent from. |
sent_from_email |
string | Email of the user that message was sent from. |
recipients |
array | Array of estimate message recipients. |
subject |
string | The message subject. |
body |
string | The message body. |
send_me_a_copy |
boolean | Whether to email a copy of the message to the current user. |
event_type |
string | The type of estimate event that occurred with the message: send, accept, decline, re-open, view, or invoice. |
created_at |
datetime | Date and time the message was created. |
updated_at |
datetime | Date and time the message was last updated. |
The estimate message recipient object
Attribute | Type | Description |
---|---|---|
name |
string | Name of the message recipient. |
email |
string | Email of the message recipient. |
Required permissions
You must be an Administrator or Manager with permission to create and edit estimates in order to interact with the /v2/estimates/{estimate_ID}/messages
endpoint. Insufficient permissions will result in a 403 Forbidden
status code.
List all messages for an estimate
Returns a list of messages associated with a given estimate. The estimate messages are returned sorted by creation date, with the most recently created messages appearing first.
The response contains an object with an estimate_messages
property that contains an array of up to per_page
messages. Each entry in the array is a separate message object. If no more messages are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your messages.
GET /v2/estimates/{estimate_ID}/messages
Parameter | Type | Description |
---|---|---|
updated_since |
datetime | Only return estimate messages that have been updated since the given date and time. |
page |
integer | DEPRECATED The page number to use in pagination. For instance, if you make a list request and receive 2000 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1) |
per_page |
integer | The number of records to return per page. Can range between 1 and 2000. (Default: 2000) |
page
parameter.
For more information, visit the pagination guide.
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"estimate_messages":[
{
"id":2666236,
"sent_by":"Bob Powell",
"sent_by_email":"[email protected]",
"sent_from":"Bob Powell",
"sent_from_email":"[email protected]",
"send_me_a_copy":true,
"created_at":"2017-08-25T21:23:40Z",
"updated_at":"2017-08-25T21:23:40Z",
"recipients":[
{
"name":"Richard Roe",
"email":"[email protected]"
},
{
"name":"Bob Powell",
"email":"[email protected]"
}
],
"event_type":null,
"subject":"Estimate #1001 from API Examples",
"body":"---------------------------------------------\r\nEstimate Summary\r\n---------------------------------------------\r\nEstimate ID: 1001\r\nEstimate Date: 06/01/2017\r\nClient: 123 Industries\r\nP.O. Number: 5678\r\nAmount: $9,630.00\r\n\r\nYou can view the estimate here:\r\n\r\n%estimate_url%\r\n\r\nThank you!\r\n---------------------------------------------"
}
],
"per_page":2000,
"total_pages":1,
"total_entries":1,
"next_page":null,
"previous_page":null,
"page":1,
"links":{
"first":"https://api.harvestapp.com/v2/estimates/1439818/messages?page=1&per_page=2000",
"next":null,
"previous":null,
"last":"https://api.harvestapp.com/v2/estimates/1439818/messages?page=1&per_page=2000"
}
}
Create an estimate message
Creates a new estimate message object. Returns an estimate message object and a 201 Created
response code if the call succeeded.
POST /v2/estimates/{estimate_ID}/messages
Parameter | Type | Required | Description |
---|---|---|---|
recipients |
array | required | Array of recipient parameters. See below for details. |
subject |
string | optional | The message subject. |
body |
string | optional | The message body. |
send_me_a_copy |
boolean | optional | If set to true , a copy of the message email will be sent to the current user. Defaults to false . |
event_type |
string | optional | If provided, runs an event against the estimate. Options: “accept”, “decline”, “re-open”, or “send”. |
Recipient Parameter | Type | Required | Description |
---|---|---|---|
name |
string | optional | Name of the message recipient. |
email |
string | required | Email of the message recipient. |
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])" \
-X POST \
-H "Content-Type: application/json" \
-d '{"subject":"Estimate #1001","body":"Here is our estimate.","send_me_a_copy":true,"recipients":[{"name":"Richard Roe","email":"[email protected]"}]}'
Example Response:
{
"id":2666240,
"sent_by":"Bob Powell",
"sent_by_email":"[email protected]",
"sent_from":"Bob Powell",
"sent_from_email":"[email protected]",
"send_me_a_copy":true,
"created_at":"2017-08-25T21:27:52Z",
"updated_at":"2017-08-25T21:27:52Z",
"recipients":[
{
"name":"Richard Roe",
"email":"[email protected]"
},
{
"name":"Bob Powell",
"email":"[email protected]"
}
],
"event_type":null,
"subject":"Estimate #1001",
"body":"Here is our estimate."
}
Delete an estimate message
Delete an estimate message. Returns a 200 OK
response code if the call succeeded.
DELETE /v2/estimates/{estimate_ID}/messages/{message_ID}
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages/2666240" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])" \
-X DELETE
Mark a draft estimate as sent
Creates a new estimate message object and marks the estimate as sent. Returns an estimate message object and a 201 Created
response code if the call succeeded.
POST /v2/estimates/{estimate_ID}/messages
Parameter | Type | Required | Description |
---|---|---|---|
event_type |
string | required | Pass “send” to mark the estimate as sent. |
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])" \
-X POST \
-H "Content-Type: application/json" \
-d '{"event_type":"send"}'
Example Response:
{
"id":2666241,
"sent_by":"Bob Powell",
"sent_by_email":"[email protected]",
"sent_from":"Bob Powell",
"sent_from_email":"[email protected]",
"send_me_a_copy":false,
"created_at":"2017-08-23T22:25:59Z",
"updated_at":"2017-08-23T22:25:59Z",
"event_type":"send",
"recipients":[],
"subject":null,
"body":null
}
Mark an open estimate as accepted
Creates a new estimate message object and marks the estimate as accepted. Returns an estimate message object and a 201 Created
response code if the call succeeded.
POST /v2/estimates/{estimate_ID}/messages
Parameter | Type | Required | Description |
---|---|---|---|
event_type |
string | required | Pass “accept” to mark the estimate as accepted. |
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])" \
-X POST \
-H "Content-Type: application/json" \
-d '{"event_type":"accept"}'
Example Response:
{
"id":2666244,
"sent_by":"Bob Powell",
"sent_by_email":"[email protected]",
"sent_from":"Bob Powell",
"sent_from_email":"[email protected]",
"send_me_a_copy":false,
"created_at":"2017-08-25T21:31:55Z",
"updated_at":"2017-08-25T21:31:55Z",
"recipients":[],
"event_type":"accept",
"subject":null,
"body":null
}
Mark an open estimate as declined
Creates a new estimate message object and marks the estimate as declined. Returns an estimate message object and a 201 Created
response code if the call succeeded.
POST /v2/estimates/{estimate_ID}/messages
Parameter | Type | Required | Description |
---|---|---|---|
event_type |
string | required | Pass “decline” to mark the estimate as accepted. |
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])" \
-X POST \
-H "Content-Type: application/json" \
-d '{"event_type":"decline"}'
Example Response:
{
"id":2666245,
"sent_by":"Bob Powell",
"sent_by_email":"[email protected]",
"sent_from":"Bob Powell",
"sent_from_email":"[email protected]",
"send_me_a_copy":false,
"created_at":"2017-08-25T21:31:55Z",
"updated_at":"2017-08-25T21:31:55Z",
"recipients":[],
"event_type":"decline",
"subject":null,
"body":null
}
Re-open a closed estimate
Creates a new estimate message object and re-opens a closed estimate. Returns an estimate message object and a 201 Created
response code if the call succeeded.
POST /v2/estimates/{estimate_ID}/messages
Parameter | Type | Required | Description |
---|---|---|---|
event_type |
string | required | Pass “re-open” to re-open the estimate. |
Example Request:
curl "https://api.harvestapp.com/v2/estimates/1439818/messages" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])" \
-X POST \
-H "Content-Type: application/json" \
-d '{"event_type":"re-open"}'
Example Response:
{
"id":2666246,
"sent_by":"Bob Powell",
"sent_by_email":"[email protected]",
"sent_from":"Bob Powell",
"sent_from_email":"[email protected]",
"send_me_a_copy":false,
"created_at":"2017-08-25T21:31:55Z",
"updated_at":"2017-08-25T21:31:55Z",
"recipients":[],
"event_type":"re-open",
"subject":null,
"body":null
}