I have a Laravel application which is consuming WooCommerce Subscriptions REST API. I need to find all active subscriptions for a specific user, which I have only the email (not the ID).
Filtering the subscriptions by the status "active" works fine. However, I can't get the filter by user email to work. When I say user, I mean the user who bought the subscription product. This user is a customer and I could try to use the [Customers] endpoint(https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-customers), I know, but since the product is a "subscription product", WordPress assigns the "Subscriber" role instead of the "Customer" role to that user. That prevents the user to be listed in the Customers endpoint.
I attempted to use the "filter" parameter when listing the subscriptions, but I could not get it to work. Also, I don't mind making two different calls to achieve what I want, but I would rather make one to speed up my application.
So, here are my questions:
Is it possible to use the filter parameter to filter the subscribers by email? If yes, how?
How do I get to retrieve an subscriber information using WooCommerce API? Are there any options?
Is it reliable to use the billing address in the subscriptions (after I retrieve all active ones)? I mean, the user might change his email later, which would not change the billing address (right?), and this would give the wrong result in my application.
Do you see or suggest any other solution to my problem?
Thanks for your help and time.