question

tg avatar image
tg asked James Tickett answered

Filtering out unpaid Line Items

Is there a way to filter the line items web endpoint on whether or not the accompanying order was paid?

/v3/merchants/{mId}/line_items

Refunded and exchanged are easily filterable, so it seems like there is likely an easy way to simply see the paid vs unpaid line items that I am unable to find

Thanks!

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

James Tickett avatar image
James Tickett answered

I don't want to say for sure that it's impossible, and I would wait for a Clover response to rule it out, but I tried doing this query:

/v3/merchants/{mId}/line_items?expand=order.payment&filter=payType=FULL

and the response I got was:

"message": "Cannot filter on field payType.  Supported fields: binName,createdTime,deletedTime,discount.id,employee.id,exchanged,id,isRevenue,item.id,itemCode,modification.id,name,order.clientCreatedTime,order.id,order.modifiedTime,orderClientCreatedTime,price,printed,refunded,tag.id,taxRate.id"

So it looks as if that sort of filtering isn't possible through the API, although if you are able to filter them yourself then at least using "order.payment" as the expand will return the relevant field.

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