This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a package of product instances.
You must pass the relevant Wix account ID in the header of the call. In the DIY flow, we recommend to pass the customer's sub-account ID instead of your main reseller account ID.
You may also pass a Wix site ID for each product in the body of the call. If you omit the site ID, a floating product instance is created.
When Wix customers purchase a specific paid service or product, Wix may offer
them time-limited free access to a different product. For example, customers
get a voucher for a free 1-year domain registration when purchasing any Wix
Premium plan. If you want to offer your customers the same benefit, create a
package containing the original product first. Then, create a second package
with the additional product. In the second Create Package call, pass the
instance ID of the original product as referenceProductInstanceId
. This way,
Wix doesn't charge you for the additional product. Make sure that the status
of the referenced product is either "PENDING"
or "ACTIVE"
. Note that you
can use each product instance only a single time as reference instance.
You need to pass a countryCode
to specify where customers can claim
vouchers that may come with a product. Contact the
Wix B2B sales team to get information about
vouchers and supported locations.
Important: This call requires an account level API key and cannot be authenticated with the standard authorization header.
Idempotency key.
External reference. For example, an external subscription ID. Note: This field is not validated by Wix.
Wix services that are resold.
Idempotency key.
Created package.
curl -X POST \
'https://www.wixapis.com/resellers/v1/packages' \
-H 'wix-account-id: <ACCOUNT_ID>' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
"products": [
{
"catalogProductId": "00ba7923-2655-402a-852d-2b2100568bcf",
"siteId": "918aa943-ab4f-40bc-88c3-8dfd02fae7cd",
"billingInfo": {
"type": "RECURRING",
"cycleDuration": {
"unit": "YEAR",
"count": 1
}
},
"countryCode": "BR"
}
],
"external_id": "some-external-id"
}'
{
"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": "00ba7923-2655-402a-852d-2b2100568bcf",
"status": "PENDING",
"billingInfo": {
"type": "RECURRING",
"cycleDuration": {
"unit": "YEAR",
"count": 1
}
},
"countryCode": "BR",
"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"
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.