question

bloyal avatar image
bloyal asked

Editing line item unit quantities for per unit items using Clover Order Service

Hello,

My app will often change line items within the Clover register, I am able to properly add discounts and add line items but I'm having a problem trying to update the unit quantities for per unit items on my orders. Specifically, I am creating an order containing one line item. That line item is a per unit priced item with a unit quantity of 1.5, my integration needs to split the lines to apply a discount so I get two lines back from my api. The first of my lines is the original line item with a quantity of 0.5 instead of 1.5 and my second line item is a new line item with the same product but a quantity of 1 and a discount on it. When updating the order, the second of my lines shows up properly in the register but I am unable to change the unit quantity of the first line so I end up with a line item with unit quantity 1.5 (the quantity on this one should be 0.5) and another line item with quantity 1 and a discount on it (matching the second line item I get from my api, this is correct).


When trying to use the Order Service's addPerUnitLineItem function, I get an Exception with a null status message and status code UNKNOWN.


I know my orderId, lineItemId and unitQty are all set to valid values. Is there anything else that could be causing the exception or not allowing my line item's quantity to update?

OrdersLineItems
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community