Update plan (Usage-Based only)

Update an existing partner-managed usage-based plan. Features + review sites are fully replaced each call (old PlanFeature/PlanReviewSite rows deleted and re-inserted).

Auth: Partner (usage-based only). Authentication group, no extra route-level route guard. updatePartnerPlan resolves the partner via getAuthPartner (403 if none); 403 unless billing_model === 'usage-based'; 404 if the plan id doesn't exist; 403 unless plan_type=usage-based AND is_admin_managed=0; 403 unless linked to the partner (planBelongsToCompany). overage_rate read-only (same as create).

Validation — identical rules as Create (same contract-model branching).

Rate limit: No rate limit.

Request

ParamInTypeRequiredNotes
idpathintegerYesPlan ID (route [0-9]+); a usage-based plan owned by the partner.

Body params are the same as Create plan (Usage-Based only) Create**. On update, omitted status/enforcement_mode fall back to the plan's existing values.

Responsedata is the updated Plan with features + plan_review_sites.

Path params

ParameterTypeRequiredNotes
planIdintegerRequiredDigits only.

Errors: 422 on validation failure.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params
string
number
number
string
string
string
string
string
features
array of objects
features
review_sites
array of objects
review_sites
Response

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json