Orders

Upgrade a service

Moves an active service to another plan, paid from account credit balance. The new plan must be one of the upgrades its current plan offers, sold on the billing cycle asked for; any other is refused with 409 UNSUPPORTED_UPGRADE and the list of those (details.upgrades). The pro-rated amount is priced by the billing system before anything is created, and checked against the balance and the optional max_amount. A plan change into or out of the configurable VPS is refused with 409 UNSUPPORTED_UPGRADE: that VPS is sized by its CPU, memory and disk, which a plan change does not carry. Resize it with POST /services/{id}/resize instead.

post/orders/{id}/upgrade

Request

  • Base URL: https://api.imprezahost.com/v1
  • URL: https://api.imprezahost.com/v1/orders/{id}/upgrade
  • Auth: API key in header X-API-Key and API key in header X-API-Secret

Path parameters

idinteger required

Request body

service_idinteger required
new_product_idinteger required
billing_cyclestring required
max_amountstring

Optional. The plan change is refused with PRICE_ABOVE_LIMIT if it would cost more.

Example request

{
  "service_id": 567,
  "new_product_id": 25,
  "billing_cycle": "monthly",
  "max_amount": "10.00"
}

Response

Upgrade created and paid; applied says whether the service is on the new plan

Changes

No recorded changes to this operation across all 1 revision of this API.