POST
/
v1
/
c
/
contract
/
{contract_id}
/
upgrade_estimate

Authorizations

wb-key
string
headerrequired

Path Parameters

contract_id
string
required

Id of the Contract

Body

application/json
downgrade_allowed
boolean

By default downgrading to a cheaper plan can only be done at the end of the billing cycle This is done to avoid the need to refund unused part of the current billing cycle from the old contract However, WbCustomer may override this behaviour, and force immediate downgrade by setting this argument to true. Default is false

upgrade_configuration
object
required

Type of plan upgrade:

  • NewPlan - upgrade to a different plan
  • ChangeUnitCount - only increase or decrease the number of purchased units for the current plan

The main difference between ChangeUnitCount and using NewPlan with the ID of the same plan is that if the prices of features changed between contract creation and current time, ChangeUnitCount will preserve the prices of features recorded in the contract, while using NewPlan will also mean that new prices will take effect.

Response

200 - application/json
is_downgrade
boolean
required

If contract change is downgrade (a move to a cheaper contract), then this will be set to True. Downgrade can not be performed mid-cycle, only at the end of the billing cycle

new_contract_period
object

Billing period of the contract. For example, for contracts that are paid monthly, a new billing period would be created each month. For Constant or Once contracts, a single period would be created with empty "end" value

price_on_new_contract
object[]
required

Estimated invoices of the first billing period for the new Contract

pro_rate_new_contract
string
required

Pro rated amount on the new contract. Deprecated, please use UpgradeCostBreakdown.

pro_rate_old_contract
string
required

Pro rated amount for the current contract. Deprecated, please use UpgradeCostBreakdown.

remains_to_pay_current_contract
object[]
required

Invoices for the current Contract

upgrade_cost_breakdown
object
required

Additional information about upgrade costs

usage_old_contract
string
required

If old contract has usage-priced features, this indicates how much will be paid for usage on upgrade. Deprecated, please use UpgradeCostBreakdown.