Skip to main content
PUT
Save plan version draft by external ID

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Path Parameters

external_plan_id
string | null
required

Body

application/json

Creates or fully replaces the plan's draft version.

add_prices
AddPlanPriceParams · object[] | null

Additional prices to be added to the plan.

remove_prices
RemovePlanPriceParams · object[] | null

Prices to be removed from the plan.

replace_prices
ReplacePlanPriceParams · object[] | null

Prices to be replaced with additional prices on the plan.

add_adjustments
AddPlanAdjustmentParams · object[] | null

Additional adjustments to be added to the plan.

remove_adjustments
RemovePlanAdjustmentParams · object[] | null

Adjustments to be removed from the plan.

replace_adjustments
ReplacePlanAdjustmentParams · object[] | null

Adjustments to be replaced with additional adjustments on the plan.

description
string | null

Optional description of what changes in this draft

Maximum string length: 500

Response

OK

The PlanVersionDraft resource represents a plan's unpublished next version: the prices and adjustments it will have once published, built on top of base_version.

plan_id
string
required
description
string | null
required

Optional description of what changes in this draft

base_version
integer
required

The published version the draft is built on, the latest at read time.

created_at
string<date-time>
required
plan_phases
PlanVersionPhase · object[] | null
required
prices
(UnitPrice · object | TieredPrice · object | BulkPrice · object | BulkWithFiltersPrice · object | PackagePrice · object | MatrixPrice · object | ThresholdTotalAmountPrice · object | TieredPackagePrice · object | TieredWithMinimumPrice · object | GroupedTieredPrice · object | GroupedTieredMatrixPrice · object | TieredPackageWithMinimumPrice · object | PackageWithAllocationPrice · object | UnitWithPercentPrice · object | MatrixWithAllocationPrice · object | TieredMatrixWithAllocationPrice · object | MatrixWithThresholdDiscountsPrice · object | TieredWithProrationPrice · object | UnitWithProrationPrice · object | GroupedAllocationPrice · object | BulkWithProrationPrice · object | GroupedWithProratedMinimumPrice · object | GroupedWithMeteredMinimumPrice · object | GroupedWithMinMaxThresholdsPrice · object | MatrixWithDisplayNamePrice · object | GroupedTieredPackagePrice · object | MaxGroupTieredPackagePrice · object | ScalableMatrixWithUnitPricingPrice · object | ScalableMatrixWithTieredPricingPrice · object | CumulativeGroupedBulkPrice · object | CumulativeGroupedAllocationPrice · object | DailyCreditAllowancePrice · object | MeteredAllowancePrice · object | MinimumCompositePrice · object | PercentCompositePrice · object | EventOutputPrice · object | UnitWithMultiplierPrice · object)[]
required

Prices on the draft. If the plan has phases, this includes prices across all phases of the plan.

The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.

For more on the types of prices, see the core concepts documentation

adjustments
(PlanPhaseUsageDiscountAdjustment · object | PlanPhaseAmountDiscountAdjustment · object | PlanPhasePercentageDiscountAdjustment · object | PlanPhaseTieredPercentageDiscountAdjustment · object | PlanPhaseMinimumAdjustment · object | PlanPhaseMaximumAdjustment · object)[]
required

Adjustments on the draft. If the plan has phases, this includes adjustments across all phases of the plan.