Rest API - Get assigned plan from domain
Using the REST API it is not possible to view the assigned plan from a domain. You can only add a plan when creating a domain. I would like the see what plan is assigned to a domain for our billing process.
Thank you for your input! We will consider this functionality in upcoming releases if it is popular. Everyone, please continue voting for this feature if you consider it important.
At the moment you can use the following SQL query for psa database for getting what you want:
SELECT dom.id as domain_id, dom.name as domain, ps.plan_id, t.name as plan_name from domains dom LEFT JOIN Subscriptions s ON (dom.id=s.object_id AND s.object_type='domain') LEFT JOIN PlansSubscriptions ps ON ps.subscription_id=s.id LEFT JOIN Templates t ON t.id=ps.plan_id;
--
IG