question

getswift avatar image
getswift asked zgreathouse Deactivated edited

Get Orders item quantity

I am calling the GetOrderList api to fetch all orders

https://apisandbox.dev.clover.com/v3/merchants/<MID>/orders?expand=lineItems,customers.addresses,customers.emailAddresses,customers.phoneNumbers&limit=100

when i add items from the clover app on my tablet i don't receive the unitQty field in the lineItems. however, when i add the items from the api directly i can get the unitQty field.

Add item call: https://apisandbox.dev.clover.com/v3/merchants/<MID>/orders/{0}/line_items

Orders
10 |2000

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

Dan avatar image
Dan answered
unit_qty is used when an item has the price_type of per_unit. If you create an item in the inventory app on the device with the per unit price type, then go into register and add it to the order you should see the field populated when you query for that line item.
When a fixed price item is added by the device, the field is not set and defaults to null.
10 |2000

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

getswift avatar image
getswift answered
@Dan
Understood, that works as you mentioned. Thank you.
10 |2000

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