Update Plan
Update an existing plan.
与创建的区别:credits 的换算带 fallback_credits=plan.credits,即当套餐不是 API 类型(不参与反推)时保留原有积分值,避免改个名字就把积分清零。
改完会调 _sync_plan_user_entitlements 给在期用户补差,让新额度立刻生效; 返回体里带 synced_users 告知运营影响了多少人。
副作用:写库 + 给用户补积分(会写 CreditLog)+ 清套餐缓存与相关用户缓存。 顺序上先 commit 套餐本身、再补用户权益,保证套餐改动不会被后面的失败带崩。
put/admin/plans/{plan_id}
Request
- Base URL: https://api.twtapi.com (the document declares no server; this is the origin it was published from)
- URL: https://api.twtapi.com/admin/plans/{plan_id}
- Auth: none declared
Path parameters
plan_idinteger required
Request body
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 2 revisions of this API.