Good afternoon, I’m hoping someone can assist me with what I believe… is something relatively straight forward.
I’m creating an invoice through the API, and I simply want to set the status of that invoice to “Open” - which then will trigger (I believe) the automatic email of that invoice to the customer.
My invoice is being made correctly, and I’m passing into the array the values for status as mentioned here however it still always comes back as “Draft”.
Below is a preview of my code, using a simply wrapper from github.
$invoices = array(); $invoices['invoice'] = array( 'contact' => $contactId, 'dated_on' => date('Y-m-d'), 'reference' => time(), 'status' => 'Open', 'send_new_invoice_emails' => true, 'send_reminder_emails' => true, 'send_thank_you_emails' => true, 'payment_terms_in_days' => 28, 'invoice_items' => $lineItems ); $invoice = $fa->post('invoices', $invoices);
Any help would be greatly appreciated.