> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hostrox.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade Service

> Upgrade an existing service to a higher product package

This API action upgrades a service to a higher product package.

## Method / Endpoint

```text theme={null}
POST {{API_URL}}/order/upgrade
```

For Hostrox, the full URL is:

```text theme={null}
POST https://client.hostrox.net/api/reseller/order/upgrade
```

## Request parameters

| Name                              | Required | Description                                                                    |
| --------------------------------- | -------- | ------------------------------------------------------------------------------ |
| `key`                             | Yes      | API Key                                                                        |
| `id`                              | Yes      | Order ID number                                                                |
| `upgrade_product_type`            | Yes      | Type of the product to upgrade to                                              |
| `upgrade_product_id`              | Yes      | ID number of the product to upgrade to                                         |
| `upgrade_product_period_type`     | Yes      | Target billing period. Possible values: `year`, `month`, `week`, `day`, `hour` |
| `upgrade_product_period_duration` | Yes      | Length of the target billing period                                            |

## Example cURL request

```bash theme={null}
curl --location 'https://client.hostrox.net/api/reseller/order/upgrade' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "UzZBSlBWeWk0UEcrVWxlU0RjS1B1dz09",
    "id": 3,
    "upgrade_product_type": "hosting",
    "upgrade_product_id": 34,
    "upgrade_product_period_type": "month",
    "upgrade_product_period_duration": 1
  }'
```

## Example JSON response

```json theme={null}
{
  "status": "successful",
  "invoice_id": 4,
  "fee": "10.0000",
  "fee_formatted": "$10"
}
```
