updated invoices to new API