how to API post a draft invoice with discount

Animal_Kingdoms
Shopify Partner
5 0 0

So a "known" issue that has no time frame for solution is draft orders greater than 100 lines can not get a discount - it errors our.

 

Supports solution is to do multiple invoices, but in our case that would mean 4 invoices.

 

Our customer requires one as it is part of a purchase order request that needs one invoice.

 

Can someone provide some guidance on using API Post to upload a draft invoice with discounts (flat 5%) 

I have an export of the saved draft order (without the required discount) and google sheets with API connector

 

Support could not even confirm if this would work if attempted!

Reply 1 (1)
SBD_
Shopify Staff
Shopify Staff
1098 146 229

Here are some examples, the fourth example shows a flat percentage discount.

 

In a recent update, the 'amount' is automatically calculated if you don't provide it.

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog