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"
}
Retrieve available subscription plans
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"
}
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"
}
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();
};
Was this page helpful?