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:
- { customer_id: '[blanked]',
- organization_id: '[blanked]',
- estimate_number: '25 by Jacob Zuma',
- template_id: '[blanked]',
- date: '2016-02-13',
- expiry_date: undefined,
- exchange_rate: 1,
- discount: 0,
- is_discount_before_tax: true,
- discount_type: 'item_level',
- is_inclusive_tax: 'false',
- custom_body: '',
- custom_subject: '',
- salesperson_name: '',
- custom_fields:
- [ { index: 1, value: 'param' },
- { index: 2, value: undefined },
- { index: 3, value: '60' },
- { index: 4, value: '50 weeks' } ],
- line_items:
- [ { rate: '100',
- unit: '',
- item_order: 0,
- quantity: '',
- discount: 0,
- description: 'Something funny yeah' } ],
- notes: undefined,
- terms: undefined,
- shipping_charge: 0,
- adjustment: 0,
- 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:
- {"message":
- "Unable to send the following Estimate(s) as no contact person was associated to it : 25 by Jacob Zuma","ids":[blanked],
- "code":4062
- }
How do I use
/estimates/email ? What do I change here?