Estimates
An estimate provides a quote to a Customer. Like invoices, each estimate has a collection of line items that detail the products or services. Estimates, unlike invoices, do not have a balance owed until converted to an invoice.
Estimate Object
Attributes
{
"approved": null,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"deposit": 0,
"deposit_paid": false,
"discounts": [],
"draft": false,
"expiration_date": null,
"id": 2048,
"invoice": null,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": null,
"notes": null,
"number": "EST-0016",
"object": "estimate",
"payment_terms": "NET 14",
"pdf_url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "not_sent",
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Parameter | Type | Description |
---|---|---|
id | integer | The estimate's unique ID |
object | string | Object type, estimate |
customer | integer | Customer ID |
invoice | integer | Invoice ID |
name | string | Estimate name for internal use, defaults to "Estimate" |
number | string | The reference number assigned to the estimate for use in the dashboard |
currency | string | 3-letter ISO code |
draft | boolean | When false, the estimate is considered outstanding, or when true, the estimate is a draft |
closed | boolean | When true, an estimate is closed and considered bad debt. No further payments are allowed. |
approved | boolean | Estimate approved? |
status | string | Estimate state, one of draft , not_sent , sent , approved , invoiced , declined , voided |
date | timestamp | Estimate date |
expiration_date | timestamp | Estimate expiration date |
payment_terms | string | Payment terms for the estimate, i.e. "NET 30" |
purchase_order | string | The customer's purchase order number |
items | array | Collection of Line Items |
notes | string | Additional notes displayed on estimate |
subtotal | number | Subtotal |
discounts | array | Collection of Discounts |
taxes | array | Collection of Taxes |
ship_to | object | Shipping Detail object |
total | number | Total |
deposit | number | Up-front deposit required |
deposit_paid | bool | Indicates whether the deposit has been paid in full |
url | string | URL to view the estimate in the billing portal |
pdf_url | string | URL to download the estimate as a PDF |
created_at | timestamp | Timestamp when created |
updated_at | timestamp | Timestamp when updated |
metadata | object | A hash of key/value pairs that can store additional information about this object. |
Create an estimate
curl "https://api.invoiced.com/estimates" \
-u {API_KEY}: \
-d customer=15444 \
-d payment_terms="NET 14" \
-d items[0][name]="Copy paper, Case" \
-d items[0][quantity]=1 \
-d items[0][unit_cost]=45 \
-d items[1][catalog_item]="delivery" \
-d items[1][quantity]=1 \
-d taxes[0][amount]=3.85
The above command returns JSON structured like this:
{
"approved": null,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"deposit": 0,
"deposit_paid": false,
"discounts": [],
"draft": false,
"expiration_date": null,
"id": 2048,
"invoice": null,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": null,
"notes": null,
"number": "EST-0016",
"object": "estimate",
"payment_terms": "NET 14",
"pdf_url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "not_sent",
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Create a new estimate with this endpoint.
HTTP Request
POST /estimates
Attributes
Parameter | Type | Description |
---|---|---|
customer | integer | Customer ID - required |
invoice | integer | Invoice ID |
name | string | Estimate name for internal use, defaults to "Estimate" |
number | string | The reference number assigned to the estimate, defaults to next # in auto-numbering sequence |
currency | string | 3-letter ISO code - defaults to account currency |
date | timestamp | Estimate date - defaults to current timestamp |
expiration_date | timestamp | Estimate expiration date |
payment_terms | string | Payment terms for the estimate, i.e. "NET 30" |
purchase_order | string | The customer's purchase order number |
draft | boolean | When false, the estimate is considered outstanding, or when true, the estimate is a draft |
closed | boolean | Marks an estimate as closed |
items | array | Collection of Line Items |
notes | string | Additional notes displayed on estimate |
discounts | array | Collection of Discounts |
taxes | array | Collection of Taxes |
ship_to | object | Shipping Detail object |
deposit | number | Up-front deposit required |
deposit_paid | bool | Indicates whether the deposit has been paid in full |
metadata | object | A hash of key/value pairs that can store additional information about this object. |
attachments | array | A list of File IDs to attach to the estimate |
disabled_payment_methods | array | List of payment methods to disable for this estimate, i.e. ["credit_card", "wire_transfer"] . |
calculate_taxes | bool | Disables tax calculation, default is true |
Retrieve an estimate
curl "https://api.invoiced.com/estimates/:id" \
-u {API_KEY}:
The above command returns JSON structured like this:
{
"approved": null,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"deposit": 0,
"deposit_paid": false,
"discounts": [],
"draft": false,
"expiration_date": null,
"id": 2048,
"invoice": null,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": null,
"notes": null,
"number": "EST-0016",
"object": "estimate",
"payment_terms": "NET 14",
"pdf_url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "not_sent",
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY"
}
This endpoint retrieves a specific estimate.
HTTP Request
GET /estimates/:id
If you set the Accept
header to application/pdf
then the estimate PDF will be returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
expand | string | Properties to expand |
Update an estimate
curl "https://api.invoiced.com/estimates/:id" \
-u {API_KEY}: \
-X PATCH \
-d sent=1
The above command returns JSON structured like this:
{
"approved": false,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"deposit": 0,
"deposit_paid": false,
"discounts": [],
"draft": false,
"expiration_date": null,
"id": 2048,
"invoice": null,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": "July Paper Delivery",
"notes": "The order was delivered on Jul 20, 2015",
"number": "EST-0016",
"object": "estimate",
"payment_terms": "NET 14",
"pdf_url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "sent",
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Use this endpoint to update an estimate.
HTTP Request
PATCH /estimates/:id
Attributes
Parameter | Type | Description |
---|---|---|
name | string | Estimate name for internal use, defaults to "Estimate" |
number | string | The reference number assigned to the estimate, defaults to next # in auto-numbering sequence |
currency | string | 3-letter ISO code - defaults to account currency |
date | timestamp | Estimate date - defaults to current timestamp |
expiration_date | timestamp | Estimate expiration date |
payment_terms | string | Payment terms for the estimate, i.e. "NET 30" |
purchase_order | string | The customer's purchase order number |
draft | boolean | When false, the estimate is considered outstanding, or when true, the invoice is a draft |
closed | boolean | Marks an estimate as closed |
items | array | Collection of Line Items |
notes | string | Additional notes displayed on estimate |
discounts | array | Collection of Discounts |
taxes | array | Collection of Taxes |
ship_to | object | Shipping Detail object |
deposit | number | Up-front deposit required |
deposit_paid | bool | Indicates whether the deposit has been paid in full |
metadata | object | A hash of key/value pairs that can store additional information about this object. |
attachments | array | A list of File IDs to attach to the estimate. Replaces existing attachments. Not providing this keeps existing attachments. |
disabled_payment_methods | array | List of payment methods to disable for this estimate, i.e. ["credit_card", "wire_transfer"] . |
calculate_taxes | bool | Recalculate taxes, default is false |
Send an estimate
curl "https://api.invoiced.com/estimates/:id/emails" \
-u {API_KEY}: \
-X POST
The above command returns JSON structured like this:
[
{
"created_at": 1436890047,
"email": "client@example.com",
"id": "f45382c6fbc44d44aa7f9a55eb2ce731",
"message": "Dear Client, a new estimate for $51.15 has been created on your account. Thank you!",
"object": "email",
"opens": 0,
"opens_detail": [],
"reject_reason": null,
"state": "sent",
"subject": "New Estimate from Dunder Mifflin, Inc.: EST-0016",
"template": "estimate_email",
"updated_at": 1436890047
}
]
This endpoint sends an estimate to your customer.
HTTP Request
POST /estimates/:id/emails
Request Parameters
Parameter | Type | Description |
---|---|---|
to | array | Optional array of recipients like:[{"name": "Client", "email": "client@example.com"}] |
bcc | string | Optional comma-separated list of email addresses to be blind carbon copied |
template | string | Optional email template ID, otherwise a standard email template is selected |
subject | string | Optional subject to override the template |
message | string | Optional message body to override the template |
Generate an invoice
curl "https://api.invoiced.com/estimates/:estimate_id/invoice" \
-u {API_KEY}: \
-X POST
The above command returns JSON structured like this:
{
"attempt_count": 0,
"autopay": false,
"balance": 51.15,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"discounts": [],
"draft": false,
"due_date": 1417500000,
"id": 46225,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": null,
"next_payment_attempt": null,
"notes": null,
"number": "INV-0016",
"object": "invoice",
"paid": false,
"payment_plan": null,
"payment_terms": "NET 14",
"payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
"pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "not_sent",
"subscription": null,
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
This endpoint generates an invoice from an estimate.
HTTP Request
POST /estimates/:estimate_id/invoice
List estimate attachments
curl "https://api.invoiced.com/estimates/:id/attachments" \
-u {API_KEY}:
The above command returns JSON structured like this:
[
{
"created_at": 1464625855,
"file": {
"created_at": 1464625854,
"id": 13,
"name": "logo-invoice.png",
"object": "file",
"size": 6936,
"type": "image/png",
"updated_at": 1464625854,
"url": "https://invoiced.com/img/logo-invoice.png"
},
"id": 13,
"object": "attachment",
"updated_at": 1464625855
}
]
This endpoint retrieves a list of files attached to a specific estimate.
HTTP Request
GET /estimates/:id/attachments
Void an estimate
curl "https://api.invoiced.com/estimates/:id/void" \
-u {API_KEY}: \
The above command returns JSON structured like this:
{
"approved": false,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"deposit": 0,
"deposit_paid": false,
"discounts": [],
"draft": false,
"expiration_date": null,
"id": 2048,
"invoice": null,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": "July Paper Delivery",
"notes": "The order was delivered on Jul 20, 2015",
"number": "EST-0016",
"object": "estimate",
"payment_terms": "NET 14",
"pdf_url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "voided",
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Use this endpoint to void an estimate.
HTTP Request
POST /estimates/:id/void
Delete an estimate
curl "https://api.invoiced.com/estimates/:id" \
-u {API_KEY}: \
-X DELETE
The above command returns
204 No Content
This endpoint deletes a specific estimate.
HTTP Request
DELETE /estimates/:id
List all estimates
curl "https://api.invoiced.com/estimates" \
-u {API_KEY}:
The above command returns JSON structured like this:
[
{
"approved": null,
"closed": false,
"created_at": 1415229884,
"currency": "usd",
"customer": 15444,
"date": 1416290400,
"deposit": 0,
"deposit_paid": false,
"discounts": [],
"draft": false,
"expiration_date": null,
"id": 2048,
"invoice": null,
"items": [
{
"amount": 45,
"catalog_item": null,
"description": null,
"discountable": true,
"discounts": [],
"id": 7,
"metadata": [],
"name": "Copy Paper, Case",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "product",
"unit_cost": 45
},
{
"amount": 10,
"catalog_item": "delivery",
"description": null,
"discountable": true,
"discounts": [],
"id": 8,
"metadata": [],
"name": "Delivery",
"object": "line_item",
"quantity": 1,
"taxable": true,
"taxes": [],
"type": "service",
"unit_cost": 10
}
],
"metadata": [],
"name": null,
"notes": null,
"number": "EST-0016",
"object": "estimate",
"payment_terms": "NET 14",
"pdf_url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
"purchase_order": null,
"ship_to": null,
"status": "not_sent",
"subtotal": 55,
"taxes": [
{
"amount": 3.85,
"id": 20554,
"object": "tax",
"tax_rate": null
}
],
"total": 51.15,
"updated_at": 1415229884,
"url": "https://dundermifflin.invoiced.com/estimates/IZmXbVOPyvfD3GPBmyd6FwXY"
}
]
This endpoint retrieves all estimates.
HTTP Request
GET /estimates
Query Parameters
Parameter | Description |
---|---|
sort string | Column to sort by, i.e. name asc |
filter object | Filter object |
metadata object | Metadata filter object |
start_date timestamp | Restricts the results to estimates on or after the given timestamp |
end_date timestamp | Restricts the results to estimates on or before the given timestamp |
updated_after timestamp | Only gets records updated after the given timestamp |