question

ddux avatar image
ddux asked ddux commented

Is there a way to retrieve a single item category per order line with REST V3 api?

Hello,

I am new to developing apps with clover api integration. I was just wondering if there was a way to get categories an item was put into order from.

Currently I have tried both items and orders endpoints of the api and I could not get a single category per item in any of them.

Is this possible with clovers REST V3 api?

Thank you, Ddux

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.

1 Answer

Mike M avatar image
Mike M answered ddux commented

Please check out the following documentation: https://docs.clover.com/build/web-app...

Specifically, in your case, you will likely need an order expansion. expand=lineItems.item.categories

2 comments
10 |2000

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

ddux avatar image ddux commented ·

Thanks Mike, I already have all of that and I went over the docs, but I was thinking I might be able to get a single category from which the item was purchased. This way I always end up with multiple categories per item and that makes it hard to generate a report summed by categories, English is not my first language so I hope that makes sense. Have a great day!

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Ahh, sounds like you're trying to analyze the categories used most often via Register. Unfortunately, there is no Broadcast or listener for picking up the exact route, in terms of user experience, an item was added to an order. The broadcasts and listeners only deliver information about the order or item itself.

0 Likes 0 ·

Welcome to the
Clover Developer Community