Billing Plans¶
List All Billing Plans¶
GET /api/admin/billing_plans
Schema
billing_plans: Arrayid: Integername: Stringterm: String<hour,month>user_groups: Arrayid: Integername: Stringcreated_at: DateTimeupdated_at: DateTime
created_at: DateTimeupdated_at: DateTime
View Billing Plan¶
GET /api/admin/billing_plans/{id}
Schema
billing_plans: Arrayid: Integername: Stringterm: String<hour,month>user_groups: Arrayid: Integername: Stringcreated_at: DateTimeupdated_at: DateTime
created_at: DateTimeupdated_at: DateTimebilling_resources: Arrayid: Integerexternal_id: Stringproduct: Objectid: Integerlabel: Stringresource_kind: String - package, resourceunit: Integerunit_type: String - GB, MB, Core, etc...external_id: Stringpackage: Objectid: Integercpu: Numbermemory: Integerstorage: Integerbandwidth: Integerlocal_disk: Integermemory_swap: Integermemory_swappiness: Integerbackup: Integer
billing_phases: Arrayid: Integerphase_type: String - trial, discount, or finalduration_unit: for trial, discount only - hours, days, months, yearsduration_qty: for trial, discount only - how many units of duration_unit.billing_resource_prices: Arrayid: Integercurrency: String - 3-letter currency (USD, EUR)max_qty: Number - set tonullfor unlimited. Otherwise, this is the max qty for the price. (used with tiered pricing)price: Numberregions: Arrayid: Integername: String
Create Billing Plan¶
POST /api/admin/billing_plans
Schema
billing_planname: Stringuser_group_ids: Array - optionally link to user groups.clone: Integer - the ID of another billing plan to cloneterm: String<hour,month>
Update Billing Plan¶
PATCH /api/admin/billing_plans/{id}
Schema
billing_planname: String-
term: String<hour,month>Danger
DANGER: Changing the billing plan term will also adjust all child price terms.
- `user_group_ids`: Array - Omit this field if you do not want to change existing values.
Delete Billing Plan¶
DELETE /api/admin/billing_plans/{id}
This will fail if this is currently assigned to any user groups.