question

tombialy avatar image
tombialy asked ·

Increasing quantity in Order's lineitem

I am trying to update line's item quantity with API and can not find qty attribute on "LineItem" API.

In my example, I am trying to increase number of sold pancakes from 1 to 3. I am starting with:

Super Pancakes

1 @ $13.23/


and executed:


```

POST https://sandbox.dev.clover.com/v3/merchants/<<merchant>>/orders/<<order>>/line_items/<<itemID>>HTTP/1.1]

Header key=[Authorization] val=[Bearer aa-*************************-4d]

Payload=[{"name":"Super Pancakes","price":1323,"unitQty":3000}]

```

My objective is to have


Super Pancakes

3 @ $13.23/


I am realizing that `unitQty`relates to price; however, I could not find any attribute that would relate to just quantity.


Orders
10 |2000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered ·

I don't think it works that way, I think you need to add a line item for each pancake:

https://docs.clover.com/clover-platform/docs/working-with-orders

Each lineItem represents a single inventory item, a single portion of a variable-price item, or an individual custom item/manual transaction amount.


1 comment Share
10 |2000 characters needed characters left characters exceeded

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

Sounds good, thanks.

0 Likes 0 · ·

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