Milo Subscriptions ships with a REST API for managing subscriptions, running analytics queries, importing from other subscription plugins, and managing add-ons and settings. The API is admin-only and gated by the manage_woocommerce capability.
This page is a high-level overview. For the exact endpoint list and parameters, see the developer reference on the site or read the includes/api/ folder in the plugin.
Base URL
https://your-site.com/wp-json/milosubscriptions/v1/
Authentication
Any standard WordPress REST authentication mechanism works, as long as the authenticated user has the manage_woocommerce capability. Common choices:
- Application passwords (WordPress 5.6+). Generate under Users → Profile → Application Passwords and use HTTP Basic auth.
- Cookie auth + nonce for logged-in admin users in the browser.
- WooCommerce REST API keys created from WooCommerce → Settings → Advanced → REST API. These authenticate as a WP user and inherit that user’s capabilities.
The plugin does not define custom capabilities (for example, there is no read_milosubscriptions_subscription cap). All endpoints use the standard manage_woocommerce check, so only store managers and administrators have access by default.
Main resources
Actual endpoint roots exposed by the core plugin:
| Resource | Path |
|---|---|
| Subscriptions | /subscriptions |
| Single order | /orders/{id} |
| Related orders for a subscription | /subscriptions/{id}/related-orders |
| Create a renewal for a subscription | /subscriptions/{id}/create-renewal |
| Subscription notes | /subscriptions/{id}/notes |
| Bulk status update | /subscriptions/bulk |
| Customer search | /search/customers |
| Analytics overview | /analytics/overview |
| Analytics revenue | /analytics/revenue |
| Analytics events | /analytics/events |
| Analytics upcoming revenue | /analytics/upcoming-revenue |
| Analytics per product | /analytics/products |
| Cohort retention | /analytics/cohorts |
| LTV | /analytics/ltv |
| Settings | /settings |
| Add-ons | /addons |
| Migrator | /migrator/* |
Other endpoints not shipped by the core plugin:
- There is no
/plansendpoint. (Plans in Standalone mode are managed internally; no public list/create endpoint is registered.) - There is no
/renewal-orderslist endpoint. Use/subscriptions/{id}/related-ordersand/subscriptions/{id}/create-renewal. - There is no
/customerslist endpoint. Use/search/customersto look up customers by query. - There is no
/reportsendpoint. Use the/analytics/*endpoints instead.
Response format
Responses are JSON. Errors follow the standard WP REST error shape:
{
"code": "...",
"message": "...",
"data": { "status": 404 }
}
Webhooks
There is no dedicated “Webhooks” add-on in the core plugin lineup. To react to subscription events, hook into the action hooks the plugin fires (see Hooks and filters) and POST them to your own endpoints from PHP, or use WooCommerce’s built-in webhooks feature.
Standalone mode includes an inbound webhook listener for Stripe events at includes/standalone/class-webhook-listener.php, but this is for receiving Stripe-originated events, not for sending outbound events to third parties.
Common use cases
- Pulling subscription data into an external dashboard.
- Scripting migrations, imports, and bulk updates.
- Building custom admin tools that extend the built-in React UI.
- Syncing subscription state into a CRM.
Testing the API
A quick read-only check:
curl https://your-site.com/wp-json/milosubscriptions/v1/subscriptions \
-u your-username:your-application-password
A successful response returns an array of subscription objects. A 401/403 means the authenticating user is missing manage_woocommerce.
Next steps
- Hooks and filters: event-driven integration.
- Admin subscriptions: manage subscriptions from the admin UI.