Via API: Create & Send an Estimate

Via API: Create & Send an Estimate

Hi,

I've got an already created contact, which has an email address associated with it. If I use the web interface, I am able to create an estimate and send it through seamlessly.

However, when I create the estimate, I am able to create it fine, using these options:

  1. { customer_id: '[blanked]',
  2.   organization_id: '[blanked]',
  3.   estimate_number: '25 by Jacob Zuma',
  4.   template_id: '[blanked]',
  5.   date: '2016-02-13',
  6.   expiry_date: undefined,
  7.   exchange_rate: 1,
  8.   discount: 0,
  9.   is_discount_before_tax: true,
  10.   discount_type: 'item_level',
  11.   is_inclusive_tax: 'false',
  12.   custom_body: '',
  13.   custom_subject: '',
  14.   salesperson_name: '',
  15.   custom_fields:
  16.    [ { index: 1, value: 'param' },
  17.      { index: 2, value: undefined },
  18.      { index: 3, value: '60' },
  19.      { index: 4, value: '50 weeks' } ],
  20.   line_items:
  21.    [ { rate: '100',
  22.        unit: '',
  23.        item_order: 0,
  24.        quantity: '',
  25.        discount: 0,
  26.        description: 'Something funny yeah' } ],
  27.   notes: undefined,
  28.   terms: undefined,
  29.   shipping_charge: 0,
  30.   adjustment: 0,
  31.   adjustment_description: '' }
I then post to /estimates, and I've also tried supplying send=true. This seems to work fine. However, unlike normal estimates, when I edit it via the web interface, this box is not ticked:



When I try to send by posting to /estimates/email?estimate_ids=blanked, I get:
  1. {"message":
  2.       "Unable to send the following Estimate(s) as no contact person was associated to it : 25 by Jacob       Zuma","ids":[blanked],
  3.       "code":4062
  4. }
How do I use  /estimates/email ? What do I change here?