Create plan (Usage-Based only)

Create a new usage-based plan owned by the authenticated partner and links it via company_plans. The endpoint stores features + review sites from the payload; plan_type is forced usage-based, is_admin_managed=0.

Auth: Partner (usage-based only). Authentication group, no extra route-level route guard. createPartnerPlan resolves the partner via getAuthPartner (403 if none) and returns 403 (Partner plans can only be created for usage-based companies.) unless partner.billing_model === 'usage-based'. overage_rate is never accepted — it is server-derived from the partner billing config.

Validation branches on the partner contract_model: model-a, then hard_stop required per enabled feature, service_limit required only when hard_stop=true (else unlimited + overage); model-b, then hard_stop forced true at persist (ignored here), service_limit optional. per_pull_data is exempt (quota derives from review-site cadence). ≥1 feature must be enabled.

Request body

FieldTypeRequiredNotes
plan_namestringYesmax 100
pricenumberYesmin 0
original_pricenumberNonullable, min 0
statusstringNoactive|inactive (default active)
plan_end_datedateNonullable
short_infostringNonullable, max 255
descriptionstringNonullable
enforcement_modestringNoper-location|aggregate-pool (default per-location)
featuresarrayYesmin 1, ≥1 enabled
features.*.feature_namestringYesai_response, review_flag, response_to_past_reviews, response_posting, review_widgets, review_solicitation_email, review_solicitation_sms, review_qr_code, insight_report, competitive_analysis, per_pull_data
features.*.enabledbooleanNodefault true
features.*.hard_stopbooleanmodel-a: Yes (per enabled, non-per_pull_data)model-b: ignored
features.*.service_limitintegerconditionalmodel-a: required when hard_stop=true; min 1
features.*.limit_typestringconditionalmonthly|quantity; required if response_to_past_reviews
review_sitesarrayYesmin 1
review_sites.*.review_site_idintegerYesexists in review_sites
review_sites.*.pull_frequencystringYeshourly|daily|weekly|monthly
review_sites.*.pull_intervalintegerNo1–30
review_sites.*.pull_timesarrayNoeach HH:MM
review_sites.*.pull_daysarrayNonullable; each int 0–6

Rate limit: No rate limit.

Responsedata is the created Plan with features + plan_review_sites.

Errors: 422 on validation failure.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
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