Create a plan

POST /api/v1/profiles prm_profiles_create

اعرض الصفحة بصيغة Markdown

name and type are always required; everything else has a schema default. A prepaid or postpaid plan that limits expiration (enforce_expiration, which defaults to true when omitted) must also carry its period: expiration_value above 0 and expiration_unit. Send enforce_expiration false for a plan with no time limit.

A quota limit does nothing until its enforce toggle is on. Setting combined_bytes_limit while enforce_combined_bytes is false leaves the plan unlimited on data, and the number sits there looking like a cap. The two always travel together.

نظرة سريعة

المصادقة
رمز موظّف أو جلسة
تتطلب صلاحية
prm_profiles_create Create profiles
حد المعدل
t_mutate

المعاملات

المعامل الوصف
nameمطلوب body · string Display name.
typeمطلوب body · enum prepaid, postpaid, fup, extension or addon.
base_fee body · number Wholesale price to the reseller, major units.
end_user_price body · number Retail price, major units.
enforce_expiration body · boolean Whether the plan has a time limit. Defaults to true. False means its subscribers never expire (their expiration is always null).
expiration_value body · integer Period length, paired with expiration_unit. Required (above 0) on a prepaid or postpaid plan whose enforce_expiration is true.
expiration_unit body · enum hours, days or months. Required on a prepaid or postpaid plan whose enforce_expiration is true.

الأخطاء

الرمز متى تُرجَع
ERR_VALIDATION400 name or type missing, an out-of-range value, or a prepaid/postpaid plan that limits expiration without a period (reason profile_expiration_period_required)

جرّبه على شبكتك.

5000 مشترك لمدة 90 أيام، دون أن تدفع شيئًا.