Loading...

Knowledge Base

Upgrade cWatch Orders via the API

Description

Upgrades an existing cWatch order to a new plan.

Parameters

NameData TypeRequired / OptionalDescription
order-idIntegerRequiredThe ID of the order to upgrade (passed in the URL path)
new-plan-idIntegerRequiredThe target cWatch plan ID (passed in the URL path)
auth-useridIntegerRequiredReseller ID (Authentication Parameter)
api-keyStringRequiredReseller API key (Authentication Parameter)
noOfMonthsIntegerRequiredSubscription duration in months (e.g. 12)
invoice-optionStringRequiredInvoice generation option (e.g. NoInvoice)
discount-amountFloatOptionalDiscount amount to apply (e.g. 0)

HTTP Method

PATCH

Example Request

PATCH https://httpapi.com/restapi/product/cwatch/order/666704/plan/300637?auth-userid=0&api-key=key&noOfMonths=12&invoice-option=NoInvoice&discount-amount=0

Content-Type: application/x-www-form-urlencoded

Response

Returns the status of the upgrade, including the new plan applied to the order. Representative example:

{ "orderid": "666704", "planid": "300637", "status": "Success" }