Skip to main content
GET
https://api-dev.weir.ai/
/
org
/
subscriptions
curl -X GET 'https://api.weir.ai/org/subscriptions' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'x-source: console'
{
  "data": {
    "plans": [
      {
        "planId": "plan_starter",
        "name": "Starter Plan",
        "description": "Perfect for small teams",
        "price": 49.99,
        "currency": "USD",
        "billingPeriod": "monthly",
        "features": ["Feature 1", "Feature 2"]
      },
      {
        "planId": "plan_pro",
        "name": "Pro Plan",
        "description": "For growing organizations",
        "price": 99.99,
        "currency": "USD",
        "billingPeriod": "monthly",
        "features": ["All Starter features", "Feature 3", "Feature 4"]
      }
    ]
  },
  "message": "Subscription plans retrieved successfully",
  "status": "success"
}

Get Subscription Plans

Retrieve all available subscription plans for your organization.
curl -X GET 'https://api.weir.ai/org/subscriptions' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'x-source: console'
{
  "data": {
    "plans": [
      {
        "planId": "plan_starter",
        "name": "Starter Plan",
        "description": "Perfect for small teams",
        "price": 49.99,
        "currency": "USD",
        "billingPeriod": "monthly",
        "features": ["Feature 1", "Feature 2"]
      },
      {
        "planId": "plan_pro",
        "name": "Pro Plan",
        "description": "For growing organizations",
        "price": 99.99,
        "currency": "USD",
        "billingPeriod": "monthly",
        "features": ["All Starter features", "Feature 3", "Feature 4"]
      }
    ]
  },
  "message": "Subscription plans retrieved successfully",
  "status": "success"
}

Usage Examples

const getSubscriptionPlans = async (accessToken) => {
  const response = await fetch('https://api.weir.ai/org/subscriptions', {
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'x-source': 'console'
    }
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};