---
title: "Upgrade a service"
method: POST
path: "/orders/{id}/upgrade"
tags: ["Orders"]
---

# Upgrade a service

`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`

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.

## Path parameters

- `id` integer, required

## Request body

- object
  - `service_id` integer, required
  - `new_product_id` integer, required
  - `billing_cycle` string, required
  - `max_amount` string: Optional. The plan change is refused with `PRICE_ABOVE_LIMIT` if it would cost more.

## Response `201`

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

## Other responses

- `400`: A billing cycle the new plan is not sold on
- `409`: `UNSUPPORTED_UPGRADE` (a plan not on offer, or the configurable VPS), `SERVICE_NOT_ACTIVE`, `UPGRADE_IN_PROGRESS`, `INSUFFICIENT_BALANCE`, `PRICE_ABOVE_LIMIT` or `ORDER_IN_PROGRESS`

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
