Rest API Endpoint to Get Customers Subscriptions
-
Hi,
I don’t know how to get a specific customers active subscriptions using the Woocommerce API. I have a mobile app which connects to a middle layer, this middle layer needs to provide the list of subscriptions the user has active. I need to know what Woocommerce API endpoint or combination of endpoints I can call to get the users active subscriptions.
Been struggling for days to to figure this out. Please helpe.g (what I assumed it would be but cannot find)
https://….com/wp-json/wc/v3/subscriptions?customer=1
returning
list of subscriptions, with product idI have tried (doesn’t work):
1.
https://….com/wp-json/wc/v3/memberships/members
Though this does return the memberships, it doesn’t provide product ids etc. Note the plan_id is incorrect.“id”: 355,
“customer_id”: 1,
“plan_id”: 430,
“status”: “active”,
“order_id”: null,
“product_id”: null,
“subscription_id”: null,2.
https://….com/wp-json/wc/v3/orders?customer=1
This seems to be missing subscriptions and other purchases
The topic ‘Rest API Endpoint to Get Customers Subscriptions’ is closed to new replies.