Top

Estimates

List estimates
GET /estimates
List all estimates with pagination.
Get an estimate
GET /estimates/:estimate_id
Get the details of an estimate.
Create an estimate
POST /estimates
Create an estimate for your customer.
Update an estimate
PUT /estimates/:estimate_id
Update an existing estimate. To delete a line item just remove it from the line_items list.
Delete an estimate
DELETE /estimates/:estimate_id
Delete an existing estimate
Mark an estimate as sent
POST /estimates/:estimate_id/status/sent
Mark a draft estimate as sent.
Mark an estimate as accepted
POST /estimates/:estimate_id/status/accepted
Mark a sent estimate as accepted if the customer has accepted it.
Mark an estimate as declined
POST /estimates/:estimate_id/status/declined
Mark a sent estimate as declined if the customer has rejected it.
Email an estimate
POST /estimates/:estimate_id/email
Email an estimate to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.
Email an estimate
POST /estimates/email
Send estimates to your customers by email. Maximum of 10 estimates can be sent at once.
Get estimate email content
GET /estimates/:estimate_id/email
Get the email content of an estimate.
Bulk export estimates
GET /estimates/pdf
Maximum of 25 estimates can be exported in a single pdf.
Bulk print estimates
GET /estimates/print
Export estimates as pdf and print them. Maximum of 25 estimates can be printed.
Update billing address
PUT /estimates/:estimate_id/address/billing
Updates the billing address for this estimate alone. You can set this address as default billing address for your customer by specifying 'is_update_customer' param as true.
Update shipping address
PUT /estimates/:estimate_id/address/shipping
Updates the shipping address for an existing estimate alone. You can set this address as default shipping address for your customer by specifying 'is_update_customer' param as true.
List estimate template
GET /estimates/templates
Get all estimate pdf templates.
Update estimate template
PUT /estimates/:estimate_id/templates/:template_id
Update the pdf template associated with the estimate.

List estimates

GET  /estimates

List all estimates with pagination.

Parameters

estimate_number string
[100]
Search estimates by estimate number.
Variants: estimate_number_startswith and estimate_number_contains
reference_number string
[100]
Search estimates by reference number.
Variants: reference_number_startswith and reference_number_contains
customer_name string
[100]
Search estimates by customer name.
Variants: customer_name_startswith and customer_name_contains
total double Search estimates by estimate total.
Variants: total_less_than, total_less_equals, total_greater_than and total_greater_equals
customer_id string Search estimates by customer id.
item_id string Search estimates by item id.
item_name string Search estimates by item name.
Variants: item_name_startswith and item_name_contains
item_description string Search estimates by item description.
Variants: item_description_startswith and item_description_contains
custom_field string Search estimates by custom field.
Variants: custom_field_startswith and custom_field_contains
expiry_date string
[yyyy-mm-dd]
Search estimates by expiry date.
Variants: expiry_date_start, expiry_date_end, expiry_date_before and expiry_date_after
date string
[yyyy-mm-dd]
Search estimates by estimate date.
Variants: date_start, date_end, date_before and date_after
status string Search estimates by status.
Allowed Values: draft, sent, invoiced, accepted, declined and expired
filter_by string Filter estimates by status.
Allowed Values: Status.All, Status.Sent, Status.Draft, Status.Invoiced, Status.Accepted, Status.Declined and Status.Expired
search_text string
[100]
Search estimates by estimate number or reference or customer name.
sort_column string Sort estimates.
Allowed Values: customer_name, estimate_number, date, total and created_time

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "estimates": [
    {
      "estimate_id": "982000000567048",
      "customer_name": "Bowman & Co",
      "customer_id": "982000000567001",
      "status": "draft",
      "estimate_number": "EST-00002",
      "reference_number": "QRT-12346",
      "date": "2013-11-18",
      "currency_id": "982000000000190",
      "currency_code": "USD",
      "total": 40.60,
      "created_time": "2013-11-18T02:17:40-0800",
      "accepted_date": "",
      "declined_date": "",
      "expiry_date": "2013-11-30"
    },
    {
      "estimate_id": "982000000567011",
      "customer_name": "Bowman & Co",
      "customer_id": "982000000567001",
      "status": "draft",
      "estimate_number": "EST-00001",
      "reference_number": "QRT-12345",
      "date": "2013-11-18",
      "currency_id": "982000000000190",
      "currency_code": "USD",
      "total": 175.60,
      "created_time": "2013-11-18T02:02:51-0800",
      "accepted_date": "",
      "declined_date": "",
      "expiry_date": "2013-11-30"
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Estimates",
    "applied_filter": "Status.All",
    "sort_column": "created_time",
    "sort_order": "D"
  }
}

Get an estimate

GET  /estimates/:estimate_id

Get the details of an estimate.

Parameters

print boolean Print the exported pdf.
accept string Get the details of a particular estimate in formats such as json/ pdf/ html. Default format is json.
Allowed Values: json, pdf and html

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "estimate": {
    "estimate_id": "982000000567011",
    "estimate_number": "EST-00001",
    "date": "2013-11-18",
    "reference_number": "QRT-12345",
    "status": "draft",
    "customer_id": "982000000567001",
    "customer_name": "Bowman & Co",
    "contact_persons": [
      "982000000567003"
    ],
    "currency_id": "982000000000190",
    "currency_code": "USD",
    "exchange_rate": 1.00,
    "expiry_date": "2013-11-30",
    "discount": 0.00,
    "is_discount_before_tax": true,
    "discount_type": "item_level",
    "line_items": [
      {
        "item_id": "982000000030049",
        "line_item_id": "982000000567021",
        "name": "Hard Drive",
        "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
        "item_order": 1,
        "bcy_rate": 120.00,
        "rate": 120.00,
        "quantity": 1.00,
        "unit": "",
        "discount_amount": 0.00,
        "discount": 0.00,
        "tax_id": "982000000557028",
        "tax_name": "VAT",
        "tax_type": "tax",
        "tax_percentage": 12.5,
        "item_total": 120.00
      },
      {
        "item_id": "982000000030051",
        "line_item_id": "982000000567023",
        "name": "Premium Plan - Web hosting",
        "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
        "item_order": 2,
        "bcy_rate": 33.00,
        "rate": 33.00,
        "quantity": 1.00,
        "unit": "",
        "discount_amount": 0.00,
        "discount": 0.00,
        "tax_id": "982000000566009",
        "tax_name": "Sales Group",
        "tax_type": "tax_group",
        "tax_percentage": 23,
        "item_total": 33.00
      }
    ],
    "shipping_charge": 0.00,
    "adjustment": 0.00,
    "adjustment_description": "",
    "sub_total": 153.00,
    "total": 175.60,
    "tax_total": 22.60,
    "price_precision": 2,
    "taxes": [
      {
        "tax_name": "VAT (12.5%)",
        "tax_amount": 19.13
      },
      {
        "tax_name": "Sales Tax (10.5%)",
        "tax_amount": 3.47
      }
    ],
    "billing_address": {
      "address": "4900 Hopyard Rd, Suite 310",
      "city": "Pleasanton",
      "state": "CA",
      "zip": "94588",
      "country": "USA",
      "fax": "+1-925-924-9600"
    },
    "shipping_address": {
      "address": "Suite 125, McMillan Avenue",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94134",
      "country": "USA",
      "fax": "+1-925-924-9600"
    },
    "notes": "Looking forward for your business.",
    "terms": "Terms & Conditions apply",
    "custom_fields": [
     {
       "index": 1,
       "show_on_pdf": false,
       "value": "15 Dec 2013",
       "label": "Delivery Date"
     },
     {
       "index": 2,
       "show_on_pdf": false,
       "value": "0.99$/Day",
       "label": "Late Charge"
     },
     {
       "index": 3,
       "show_on_pdf": false,
       "value": "John David",
       "label": "Reporter"
     }
    ],
    "template_id": "982000000000143",
    "template_name": "Service - Classic",
    "created_time": "2013-11-18T02:02:51-0800",
    "last_modified_time": "2013-11-18T02:02:51-0800",
    "salesperson_id": "",
    "salesperson_name": ""
  }
}

Create an estimate

POST  /estimates

Create an estimate for your customer.

Parameters

send boolean Send the estimate to the contact person(s) associated with the estimate.
Allowed Values: true and false
ignore_auto_number_generation boolean Ignore auto estimate number generation for this estimate. This mandates the estimate number.
Allowed Values: true and false

Request attributes

customer_id* string ID of the customer the estimate has to be created.
contact_persons array Array of contact person(s) for whom estimate has to be sent.
template_id string ID of the pdf template associated with the estimate.
estimate_number string
[50]
Mandatory if auto number generation is disabled.
date string
[yyyy-mm-dd]
The date the estimate is created.
expiry_date string
[yyyy-mm-dd]
Date the estimate is valid upto.
exchange_rate double Exchange rate of the currency.
discount string
[100]
Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190.
is_discount_before_tax boolean Used to specify how the discount has to applied. Either before or after the calculation of tax.
discount_type string How the discount is specified. Allowed values are entity_level or item_level.
Allowed Values: entity_level and item_level
salesperson_name string
[200]
Name of the sales person.
custom_fields array Custom fields for an estimate.
line_items array Line items of an estimate.
item_id string ID of the item.
name string
[100]
Name of the line item.
description string
[2000]
Description of the line item.
rate double Rate of the line item.
unit string
[100]
Unit of the line item e.g. kgs, Nos.
quantity double Quantity of the line item.
discount string
[100]
Discount applied to the line item. It can be either in % or in amount. e.g. 12.5% or 190.
tax_id string ID of the tax or tax group applied to the line item.
shipping_charge string
[100]
Shipping charges applied to the invoice.
adjustment double Adjustments made to the invoice.
adjustment_description string
[200]
Customize the adjustment description. E.g. Rounding off.

Sample Request

{
      "customer_id": "982000000567001",
      "contact_persons": [
        "982000000567003"
      ],
      "template_id": "982000000000143",
      "estimate_number": "EST-00001",
      "reference_number": "QRT-12345",
      "date": "2013-11-18",
      "expiry_date": "2013-11-30",
      "exchange_rate": 1.00,
      "discount": 0.00,
      "is_discount_before_tax": true,
      "discount_type": "item_level",
      "custom_body": "",
      "custom_subject": "",
      "salesperson_name": "",
      "custom_fields": [
        {
          "index": 1,
          "value": "15 Dec 2013"
        },
        {
          "index": 2,
          "value": "0.99$/Day"
        },
        {
          "index": 3,
          "value": "John David"
        }
      ],
      "line_items": [
        {
          "item_id": "982000000030049",
          "name": "Hard Drive",
          "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
          "rate": 120.00,
          "unit": "",
          "item_order": 1,
          "quantity": 1.00,
          "discount": 0.00,
          "tax_id": "982000000557028"
        },
        {
          "item_id": "982000000030051",
          "name": "Premium Plan - Web hosting",
          "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
          "rate": 33.00,
          "unit": "",
          "item_order": 2,
          "quantity": 1.00,
          "discount": 0.00,
          "tax_id": "982000000566009"
        }
      ],
      "notes": "Looking forward for your business.",
      "terms": "Terms & Conditions apply",
      "shipping_charge": 0.00,
      "adjustment": 0.00,
      "adjustment_description": ""
    }

Sample Response


Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The estimate has been created.",
  "estimate": {
    "estimate_id": "982000000567011",
    "estimate_number": "EST-00001",
    "date": "2013-11-18",
    "reference_number": "QRT-12345",
    "status": "draft",
    "customer_id": "982000000567001",
    "customer_name": "Bowman & Co",
    "contact_persons": [
      "982000000567003"
    ],
    "currency_id": "982000000000190",
    "currency_code": "USD",
    "exchange_rate": 1.00,
    "expiry_date": "2013-11-30",
    "discount": 0.00,
    "is_discount_before_tax": true,
    "discount_type": "item_level",
    "line_items": [
      {
        "item_id": "982000000030049",
        "line_item_id": "982000000567021",
        "name": "Hard Drive",
        "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
        "item_order": 1,
        "bcy_rate": 120.00,
        "rate": 120.00,
        "quantity": 1.00,
        "unit": "",
        "discount_amount": 0.00,
        "discount": 0.00,
        "tax_id": "982000000557028",
        "tax_name": "VAT",
        "tax_type": "tax",
        "tax_percentage": 12.5,
        "item_total": 120.00
      },
      {
        "item_id": "982000000030051",
        "line_item_id": "982000000567023",
        "name": "Premium Plan - Web hosting",
        "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
        "item_order": 2,
        "bcy_rate": 33.00,
        "rate": 33.00,
        "quantity": 1.00,
        "unit": "",
        "discount_amount": 0.00,
        "discount": 0.00,
        "tax_id": "982000000566009",
        "tax_name": "Sales Group",
        "tax_type": "tax_group",
        "tax_percentage": 23,
        "item_total": 33.00
      }
    ],
    "shipping_charge": 0.00,
    "adjustment": 0.00,
    "adjustment_description": "",
    "sub_total": 153.00,
    "total": 175.60,
    "tax_total": 22.60,
    "price_precision": 2,
    "taxes": [
      {
        "tax_name": "VAT (12.5%)",
        "tax_amount": 19.13
      },
      {
        "tax_name": "Sales Tax (10.5%)",
        "tax_amount": 3.47
      }
    ],
    "billing_address": {
      "address": "4900 Hopyard Rd, Suite 310",
      "city": "Pleasanton",
      "state": "CA",
      "zip": "94588",
      "country": "USA",
      "fax": "+1-925-924-9600"
    },
    "shipping_address": {
      "address": "Suite 125, McMillan Avenue",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94134",
      "country": "USA",
      "fax": "+1-925-924-9600"
    },
    "notes": "Looking forward for your business.",
    "terms": "Terms & Conditions apply",
    "custom_fields": [
     {
       "index": 1,
       "show_on_pdf": false,
       "value": "15 Dec 2013",
       "label": "Delivery Date"
     },
     {
       "index": 2,
       "show_on_pdf": false,
       "value": "0.99$/Day",
       "label": "Late Charge"
      },
      {
        "index": 3,
        "show_on_pdf": false,
        "value": "John David",
        "label": "Reporter"
       }
    ],
    "template_id": "982000000000143",
    "template_name": "Service - Classic",
    "created_time": "2013-11-18T02:02:51-0800",
    "last_modified_time": "2013-11-18T02:02:51-0800",
    "salesperson_id": "",
    "salesperson_name": ""
  }
}

Update an estimate

PUT  /estimates/:estimate_id

Update an existing estimate. To delete a line item just remove it from the line_items list.

Parameters

ignore_auto_number_generation boolean Ignore auto estimate number generation for this estimate. This mandates the estimate number.

Request attributes

customer_id* string ID of the customer the estimate has to be created.
contact_persons array Array of contact person(s) for whom estimate has to be sent.
template_id string ID of the pdf template associated with the estimate.
estimate_number string
[50]
Mandatory if auto number generation is disabled.
date string
[yyyy-mm-dd]
The date the estimate is created.
expiry_date string
[yyyy-mm-dd]
Date the estimate is valid upto.
exchange_rate double Exchange rate of the currency.
discount string
[100]
Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190.
is_discount_before_tax boolean Used to specify how the discount has to applied. Either before or after the calculation of tax.
discount_type string How the discount is specified. Allowed values are entity_level or item_level.
Allowed Values: entity_level and item_level
salesperson_name string
[200]
Name of the sales person.
custom_fields array Custom fields for an estimate.
line_items array Line items of an estimate.
item_id string ID of the item.
line_item_id string ID of the line item. Mandatory if the existing line item has to be updated. If empty, a new line item will be created.
name string
[100]
Name of the line item.
description string
[2000]
Description of the line item.
rate double Rate of the line item.
unit string
[100]
Unit of the line item e.g. kgs, Nos.
quantity double Quantity of the line item.
discount string
[100]
Discount applied to the line item. It can be either in % or in amount. e.g. 12.5% or 190.
tax_id string ID of the tax or tax group applied to the line item.
shipping_charge string
[100]
Shipping charges applied to the invoice.
adjustment double Adjustments made to the invoice.
adjustment_description string
[200]
Customize the adjustment description. E.g. Rounding off.

Sample Request

{
      "customer_id": "982000000567001",
      "contact_persons": [
        "982000000567003"
      ],
      "template_id": "982000000000143",
      "estimate_number": "EST-00001",
      "reference_number": "QRT-12345",
      "date": "2013-11-18",
      "expiry_date": "2013-11-30",
      "exchange_rate": 1.00,
      "discount": 0.00,
      "is_discount_before_tax": true,
      "discount_type": "item_level",
      "custom_body": "",
      "custom_subject": "",
      "salesperson_name": "",
      "custom_fields": [
        {
          "index": 1,
          "value": "15 Dec 2013"
        },
        {
          "index": 2,
          "value": "0.99$/Day"
        },
        {
          "index": 3,
          "value": "John David"
        }
      ],
      "line_items": [
        {
          "item_id": "982000000030049",
          "line_item_id": "982000000567021",
          "name": "Hard Drive",
          "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
          "rate": 120.00,
          "unit": "",
          "item_order": 1,
          "quantity": 1.00,
          "discount": 0.00,
          "tax_id": "982000000557028"
        },
        {
          "item_id": "982000000030051",
          "line_item_id": "982000000567023",
          "name": "Premium Plan - Web hosting",
          "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
          "rate": 33.00,
          "unit": "",
          "item_order": 2,
          "quantity": 1.00,
          "discount": 0.00,
          "tax_id": "982000000566009"
        }
      ],
      "notes": "Looking forward for your business.",
      "terms": "Terms & Conditions apply",
      "shipping_charge": 0.00,
      "adjustment": 0.00,
      "adjustment_description": ""
    }

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Estimate information has been updated.",
      "estimate": {
        "estimate_id": "982000000567011",
        "estimate_number": "EST-00001",
        "date": "2013-11-18",
        "reference_number": "QRT-12345",
        "status": "draft",
        "customer_id": "982000000567001",
        "customer_name": "Bowman & Co",
        "contact_persons": [
          "982000000567003"
        ],
        "currency_id": "982000000000190",
        "currency_code": "USD",
        "exchange_rate": 1.00,
        "expiry_date": "2013-11-30",
        "discount": 0.00,
        "is_discount_before_tax": true,
        "discount_type": "item_level",
        "line_items": [
          {
            "item_id": "982000000030049",
            "line_item_id": "982000000567021",
            "name": "Hard Drive",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "item_order": 1,
            "bcy_rate": 120.00,
            "rate": 120.00,
            "quantity": 1.00,
            "unit": "",
            "discount_amount": 0.00,
            "discount": 0.00,
            "tax_id": "982000000557028",
            "tax_name": "VAT",
            "tax_type": "tax",
            "tax_percentage": 12.5,
            "item_total": 120.00
          },
          {
            "item_id": "982000000030051",
            "line_item_id": "982000000567023",
            "name": "Premium Plan - Web hosting",
            "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
            "item_order": 2,
            "bcy_rate": 33.00,
            "rate": 33.00,
            "quantity": 1.00,
            "unit": "",
            "discount_amount": 0.00,
            "discount": 0.00,
            "tax_id": "982000000566009",
            "tax_name": "Sales Group",
            "tax_type": "tax_group",
            "tax_percentage": 23,
            "item_total": 33.00
          }
        ],
        "shipping_charge": 0.00,
        "adjustment": 0.00,
        "adjustment_description": "",
        "sub_total": 153.00,
        "total": 175.60,
        "tax_total": 22.60,
        "price_precision": 2,
        "taxes": [
          {
            "tax_name": "VAT (12.5%)",
            "tax_amount": 19.13
          },
          {
            "tax_name": "Sales Tax (10.5%)",
            "tax_amount": 3.47
          }
        ],
        "billing_address": {
          "address": "4900 Hopyard Rd, Suite 310",
          "city": "Pleasanton",
          "state": "CA",
          "zip": "94588",
          "country": "USA",
          "fax": "+1-925-924-9600"
        },
        "shipping_address": {
          "address": "Suite 125, McMillan Avenue",
          "city": "San Francisco",
          "state": "CA",
          "zip": "94134",
          "country": "USA",
          "fax": "+1-925-924-9600"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
          {
            "index": 1,
            "show_on_pdf": false,
            "value": "15 Dec 2013",
            "label": "Delivery Date"
          },
          {
            "index": 2,
            "show_on_pdf": false,
            "value": "0.99$/Day",
            "label": "Late Charge"
          },
          {
            "index": 3,
            "show_on_pdf": false,
            "value": "John David",
            "label": "Reporter"
          }
        ],
        "template_id": "982000000000143",
        "template_name": "Service - Classic",
        "created_time": "2013-11-18T02:02:51-0800",
        "last_modified_time": "2013-11-18T02:02:51-0800",
        "salesperson_id": "",
        "salesperson_name": ""
      }
    }

Delete an estimate

DELETE  /estimates/:estimate_id

Delete an existing estimate

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The estimate has been deleted."
}

Mark an estimate as sent

POST  /estimates/:estimate_id/status/sent

Mark a draft estimate as sent.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Estimate status has been changed to Sent."
}

Mark an estimate as accepted

POST  /estimates/:estimate_id/status/accepted

Mark a sent estimate as accepted if the customer has accepted it.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Estimate status has been changed to Accepted."
}

Mark an estimate as declined

POST  /estimates/:estimate_id/status/declined

Mark a sent estimate as declined if the customer has rejected it.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Estimate status has been changed to Declined."
}

Email an estimate

POST  /estimates/:estimate_id/email

Email an estimate to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.

multipart/form-data

attachments file The files to be attached with the email.

Request attributes

send_from_org_email_id boolean Boolean to trigger the email from the organization's email address.
to_mail_ids* array Array of email address of the recipients.
cc_mail_ids array Array of email address of the recipients to be cced.

Sample Request

{
          "send_from_org_email_id": false,
          "to_mail_ids": [
            "willsmith@bowmanfurniture.com"
          ],
          "cc_mail_ids": [
            "peterparker@bowmanfurniture.com"
          ],
          "subject": "Estimate from Zillium Inc (Estimate #: EST-00002)",
          "body": "Dear Customer,         <br><br><br><br>Thanks for your business enquiry.         <br><br><br><br>The estimate EST-000002 is attached with this email.         <br><br><br><br>We can get started if you send us your consent. For any assistance you can reach us via email or phone.         <br><br><br><br>Looking forward to hearing back from you. Here's an overview of the estimate for your reference.         <br><br><br><br>Estimate Overview:         <br><br>Estimate # : EST-000002         <br><br>Date : 03 Oct 2013         <br><br>Amount : $36.47 <br><br><br>\nRegards<br>\nZillium Inc<br>\n""
}

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Your estimate has been sent."
}

Email an estimate

POST  /estimates/email

Send estimates to your customers by email. Maximum of 10 estimates can be sent at once.

Parameters

estimate_ids* string
[100]
Comma separated estimate ids which are to be emailed.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Mission accomplished! We've sent all the estimates."
}

Get estimate email content

GET  /estimates/:estimate_id/email

Get the email content of an estimate.

Parameters

email_template_id string Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "data": {
    "body": "Dear Customer,         <br><br>Thanks for your business enquiry.         <br><br>The estimate EST-00001 is attached with this email.         <br><br>We can get started if you send us your consent. For any assistance you can reach us via email or phone.         <br><br>Looking forward to hearing back from you. Here's an overview of the estimate for your reference.         <br><br>Estimate Overview:         <br>Estimate # : EST-00001         <br>Date : 18 Nov 2013         <br>Amount : $175.60 <br><br><br>Regards<br>Zillium Inc<br>",
    "error_list": [],
    "subject": "Estimate from Zillium Inc (Estimate #: EST-00001)",
    "emailtemplates": [
      {
        "selected": true,
        "name": "Default",
        "email_template_id": "982000000000079"
      }
    ],
    "to_contacts": [
      {
        "first_name": "Will",
        "selected": true,
        "phone": "+1-925-921-9201",
        "email": "willsmith@bowmanfurniture.com",
        "last_name": "Smith",
        "salutation": "Mr.",
        "contact_person_id": "982000000567003",
        "mobile": "+1-4054439562"
      },
      {
        "first_name": "Peter",
        "selected": false,
        "phone": "+1-925-929-7211",
        "email": "peterparker@bowmanfurniture.com",
        "last_name": "Parker",
        "salutation": "Mr.",
        "contact_person_id": "982000000567005",
        "mobile": "+1-4054439760"
      }
    ],
    "file_name": "EST-00001.pdf",
    "from_emails": [
      {
        "user_name": "John Smith",
        "selected": true,
        "email": "johnsmith@zilliuminc.com"
      },
      {
        "user_name": "John David",
        "selected": false,
        "email": "johndavid@zilliuminc.com"
      }
    ],
    "customer_id": "982000000567001"
  }
}

Bulk export estimates

GET  /estimates/pdf

Maximum of 25 estimates can be exported in a single pdf.

Parameters

estimate_ids* string
[100]
Comma separated estimate ids which are to be export as pdf.

Sample Response


Status: 400 Bad Request
Content Type: application/json;charset=UTF-8
{
  "code": 4,
  "message": "Invalid value passed for estimate_ids"
}

Bulk print estimates

GET  /estimates/print

Export estimates as pdf and print them. Maximum of 25 estimates can be printed.

Parameters

estimate_ids* string
[100]
Comma separated estimate ids which are to be printed.

Update billing address

PUT  /estimates/:estimate_id/address/billing

Updates the billing address for this estimate alone. You can set this address as default billing address for your customer by specifying 'is_update_customer' param as true.

Request attributes

is_update_customer boolean Boolean to update the address for all draft and future estimates.

Sample Request

{
          "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District,",
          "city": "Beijing",
          "state": "Beijing",
          "zip": "1000881",
          "country": "China",
          "fax": "+86-10-82637827",
          "is_update_customer": false
}

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Billing address updated"
    }

Update shipping address

PUT  /estimates/:estimate_id/address/shipping

Updates the shipping address for an existing estimate alone. You can set this address as default shipping address for your customer by specifying 'is_update_customer' param as true.

Request attributes

is_update_customer boolean Boolean to update the address for all draft and future estimates.

Sample Request

{
          "address": "4900 Hopyard Rd, Suit 310",
          "city": "Pleasanton",
          "state": "CA",
          "zip": "94588",
          "country": "USA",
          "fax": "+1-925-924-9600",
          "is_update_customer": false
}

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Shipping address updated"
}

List estimate template

GET  /estimates/templates

Get all estimate pdf templates.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "templates": [
    {
      "template_name": "Service - Classic",
      "template_id": "982000000000143",
      "template_type": "classic"
    }
  ]
}

Update estimate template

PUT  /estimates/:estimate_id/templates/:template_id

Update the pdf template associated with the estimate.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Estimate information has been updated."
}