Price an activation or extension
POST
/api/v1/users/{id}/activation-quote
Read-only preview of what an activation would cost and grant: unit price, VAT, the computed new expiration, the plan's quota, both wallets, reward points and whether the chosen method can cover it. Writes nothing, so it is safe to call on every keystroke of a form.
A quota figure of -1 means unlimited, and 0 means none. They are not interchangeable and the difference is load-bearing on the RADIUS gate. Read uptime_seconds -1 above as "no time cap on this plan", not "no time left".
نظرة سريعة
- المصادقة
- رمز موظّف أو جلسة
- تتطلب أيًّا من
-
prm_users_activateprm_users_extend - حد المعدل
t_mutate
المعاملات
| المعامل | الوصف |
|---|---|
idمطلوب
path · integer
|
Subscriber id. |
profile_id
body · integer
|
Plan to price. Defaults to the subscriber's current plan. |
operation
body · enum
|
activate or extend. Defaults to activate. |
method
body · enum
|
manager_balance, user_balance, reward_points or card. |
units
body · integer
|
How many periods to buy. |
user_price
body · number
|
Retail price override. Silently ignored for a caller without the price-override permission, which then falls back to the plan or pricing-tree price. |
الأخطاء
| الرمز | متى تُرجَع |
|---|---|
ERR_FORBIDDEN403
|
the body's operation needs the extend permission and the caller only holds activate, or the reverse |