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

Authorizations

wb-key
string
header
required

Path Parameters

contract_id
string
required

Id of the Contract

Body

application/json

Upgrade configuration used when WbCustomer is performing a Contract Upgrade for a Customer

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.

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

Response

200 - application/json

Estimate of the price of the Contract Upgrade When contract upgrade is performed mid-cycle, but the billing period is kept the same, the unused part of the current contract billing period, as well as the unused part of the new contract's billing period will be accordingly pro-rated For example, if the contract is paid on the 1st of every month and the upgrade is performed on 16th, we pro-rate as follows:

  • days 1~15 of the old contract are considered "used", remainder is "unused" thus, days 16~end-of-month will be pro-rated
  • for the new contract, days 1~15 will be unused and pro-rated
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

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.

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