Plans
Set plan active state
POST
/api/v1/plans/:id/activeEnables or disables a plan for new subscriptions. Existing subscribers on a disabled plan aren't affected. Admin-only.
Requires Authorization
ADMIN only
Authenticated action
Path parameters
idstringrequired | Plan ID. |
Body parameters
isActivebooleanrequired |
Request
curl --request POST \
--url https://api.swiftgoma.com/api/v1/plans/:id/active \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"isActive": "<isActive>"
}'200Example response
{
"success": true,
"data": {
"id": "plan_starter",
"slug": "starter",
"name": "Starter",
"maxProducts": 20,
"maxPhotosPerProduct": 5,
"maxShops": 1,
"prioritySupport": false,
"isActive": true,
"sortOrder": 0,
"prices": [
{
"billingCycle": "MONTHLY",
"currency": "USD",
"amount": "10.00"
},
{
"billingCycle": "YEARLY",
"currency": "USD",
"amount": "100.00"
}
]
}
}