PATCH

Adjust Product Instance Specifications


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Upgrades or downgrades a product instance. For example, you can upgrade a customer's Business Unlimited Premium plan to Business VIP using this endpoint.

You must pass the ID of the Wix account that the product instance belongs to in the header of the call. The call fails, if the product instance and Wix account don't match.

The customer has immediate access to new features, while losing access to features not included in the new service. It's up to the reseller to decide whether the adjustment affects the customer’s payment.

You can only exchange a product instance with a service of the same type. Contact the Wix B2B sales team for details about which services belong to the same type.

You must provide either a new catalogProductId or a new billingInfo object. The new billing cycle must be supported for the product. Contact the Wix B2B sales team for information about which billing cycles are supported for each product. If you adjust the billing cycle for a product instance with RECURRING payments, you must also provide billingInfo.cycleDuration.unit.

If a removed feature is a requirement for another service, that service may not be available to the customer any longer. For example, if you downgrade a Business Unlimited plan to Business Basic, the site owners won’t be able to use Pro eCommerce Features any longer.

Important: This call requires an account level API key and cannot be authenticated with the standard authorization header.

Endpoint
PATCH
https://www.wixapis.com/resellers/v1/packages/product-instances/{instanceId}

Path Params
instanceIdstringRequired

ID of the product instance to adjust.

Body Params
idempotencyKeystringmaxLength 100

Idempotency key.


catalogProductIdstringformat GUID

ID of the product to replace the original instance. Required in case you don't provide a new billingInfo object.


billingInfoBillingInfo

Information about the billing cycle. Required in case you don't provide a new catalogProductId. The new billing cycle must be supported for the service. Contact the Wix B2B sales team for information about a service's supported billing cycles. If you adjust the billing cycle for a product instance with RECURRING payments, you must also provide billingInfo.cycleDuration.unit.


discountCodestringmaxLength 25

Discount code indicating that the reseller provisioned the product instance during a sale. In case you pass a code that isn't valid, the call succeeds and no discount is applied to the product instance. Wix doesn't guarantee that a discount code reduces the price between Wix and the reseller, even when it's valid. You can't add a discount code after you've created the product instance. Contact the Wix B2B sales team for more information about supported codes.

Max: 25 characters

Response Object
idempotencyKeystringmaxLength 100

Idempotency key.


packagePackage

Updated package that includes the adjusted product instance.

Adjust Product Instance Specification
Request
cURL
curl -X PATCH \ 'https://www.wixapis.com/resellers/v1/packages/product-instances/d3b88a39-f62e-4164-8b29-08369b9ea71c' \ -H 'wix-account-id: <ACCOUNT_ID>' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "catalogProductId": "2c6db353-458a-41dd-b4f5-cb8a05be6bff" }'
Response
JSON
{ "package": { "id": "828b98fb-7114-4b3c-90fd-8d0db76aa72b", "accountId": "<ACCOUNT_ID>", "externalId": "some-external-id", "productInstances": [ { "instanceId": "d3b88a39-f62e-4164-8b29-08369b9ea71c", "siteId": "918aa943-ab4f-40bc-88c3-8dfd02fae7cd", "catalogProductId": "2c6db353-458a-41dd-b4f5-cb8a05be6bff", "status": "PENDING", "billingInfo": { "type": "RECURRING", "cycleDuration": { "unit": "YEAR", "count": 1 } }, "createdDate": "2021-12-02T15:45:30.941Z", "updatedDate": "2021-12-02T15:45:30.941Z" } ], "createdDate": "2021-12-02T15:45:31.815Z", "updatedDate": "2021-12-02T15:45:31.815Z" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?