How to insert an order with custom articles prices

(Andrea Tasca) #1

I need to insert an order using API with a different products prices than what setted on my Infusionsoft “Products List”.
To insert the order I use OrderService.placeOrder API but here is not possible to specify the articles prices so I need a different

I’ve tried the following steps:

  1. Insert the order with the default articles prices using OrderService.placeOrder
  2. Update the articles prices using DataService.update with table OrderItem
  3. Recalculate taxes/commissions using InvoiceService.recalculateTax

In this way the order is placed, the articles are updated with the right prices, the taxes and commissions are recalculated
but in the order detail ( the ORDER TOTAL is not recalculated
so it is wrong.

Is there a way to do that?

Best regards,


(Mike Christianson) #2

A colleague of mine suggests the following:

… use the following flow: InvoiceService.createBlankOrder -> InvoiceService.addOrderItem -> InvoiceService.recalculateTax -> InvoiceService.chargeInvoice

(Andrea Tasca) #4

Thank you Mike, it works!