API call to filter the bookings for Status is not "Lost" and future bookings
M
Mark Bernstein
we want to see our line items via the API, but we need a way to filter them so only future bookings are shown, as well as bookings that aren't lost.
Created by Katie Knight
S
Scott Chester
It appears that you can filter for booking status is not lost, but future is harder..
https://developers.eventtemple.com/reference/listlineitems
Does &filter[booking_status][not_in]="lost" work?
Are you getting ALL line items or filtering to specific bookings?
I have no idea what you're doing, but assuming you'd want to get line items for upcoming events, you can do it off bookings where you can filter for dates, status, etc.
Something like this:
baseURL +
"bookings?" +
"filter[updated_at][gteq]=" +
last_30_days +
"&filter[booking_status][not_in]="lost" +
"&page[size]=100" +
"&page[number]=" +
str(page)
+ "&include=events,events.line_items"