Change the plan of many subscribers
POST
/api/v1/users/bulk-change-profile
prm_users_change_profile
The single-subscriber change-profile applied to each id: switch now (the current service ends and the subscriber re-activates on the new plan), or store the change for the subscriber's next expiry. The target plan is checked once, before any subscriber is touched.
scheduled lists the ids in updated whose change waits for expiry. A subscriber who is already expired is switched now even when on_next_expiration was asked for. Row reasons: not_authorized, not_found, same_profile, profile_not_assignable, profile_inactive, kyc_incomplete, manager_limit_profile_change_reached, error.
At a glance
- Authentication
- Staff token or session
- Requires permission
-
prm_users_change_profileChange user profile - Rate limit
t_mutate
Parameters
| Parameter | Description |
|---|---|
idsrequired
body · array
|
Subscriber ids, at most 1000. |
new_profile_idrequired
body · integer
|
A main (prepaid or postpaid), active plan the caller may assign. |
when
body · string
|
immediate (default) or on_next_expiration. Any other value is a 400. |
reset_traffic
body · boolean
|
Immediate changes only. Zeroes the remaining traffic and time. |
Errors
| Code | When it is returned |
|---|---|
ERR_VALIDATION400
|
new_profile_id missing, the plan is not assignable or retired, or when is not a known value |