Plans
Update plan
PUT
/api/v1/plans/:idUpdates a plan's limits or active state. Admin-only.
Requires Authorization
ADMIN only
Authenticated action
Path parameters
idstringrequired | Plan ID. |
Body parameters
namestring | |
maxProductsnumber | |
maxPhotosPerProductnumber | |
maxShopsnumber | |
prioritySupportboolean | |
isActiveboolean | |
sortOrdernumber |
Request
curl --request PUT \
--url https://api.swiftgoma.com/api/v1/plans/:id \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Aline Mapendo",
"maxProducts": "<maxProducts>",
"maxPhotosPerProduct": "<maxPhotosPerProduct>",
"maxShops": "<maxShops>",
"prioritySupport": "<prioritySupport>",
"isActive": "<isActive>",
"sortOrder": "<sortOrder>"
}'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"
}
]
}
}