> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # BulkGenerateMockups # Package: suppliersHub # Namespace: MarketplaceProvider # Method link: https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/marketplace-provider-service-plugin/bulk-generate-mockups.md ## Introduction Generates product mockup images showing the site owner's logo or custom image on the provider's products. Wix calls this method when a site owner requests mockup previews for products from the marketplace provider. The generated mockup images are delivered asynchronously. Once generation is complete, the provider notifies Wix by calling [Submit Generated Mockups](https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/marketplace-provider-submissions/submit-generated-mockups.md). --- ## REST API ### Schema ``` Method: bulkGenerateMockups Description: Generates product mockup images showing the site owner's logo or custom image on the provider's products. Wix calls this method when a site owner requests mockup previews for products from the marketplace provider. The generated mockup images are delivered asynchronously. Once generation is complete, the provider notifies Wix by calling [Submit Generated Mockups](https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/marketplace-provider-submissions/submit-generated-mockups.md). URL: null Method: POST Method parameters: param name: mockups | type: array | description: Mockups to generate. | validation: minItems 1, maxItems 100 - name: providerProductId | type: string | description: Unique product identifier on the provider's platform. | validation: minLength 1, maxLength 36 - name: image | type: Image | description: Image to overlay on the product mockup. - name: url | type: string | description: Image URL. | validation: format WEB_URL - name: imageType | type: ImageType | description: Type of image used for mockup generation. - enum: - UNKNOWN_IMAGE_TYPE: Unknown image type. - SITE_LOGO: The site's logo. - CUSTOM: A custom image provided by the site owner. - FALLBACK: Default product mockup image used when a site logo or custom image mockup is not available. Return type: BulkGenerateMockupsResponse - name: results | type: array | description: Results of the mockup generation for each product. | validation: minItems 1, maxItems 100 - name: itemMetadata | type: ItemMetadata | description: Item metadata. - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). | validation: minLength 1, maxLength 36 - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. Possible Errors: HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: IMAGE_NOT_SUPPORTED | Description: Provided image format or type isn't supported for mockup generation. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MOCKUP_GENERATION_NOT_SUPPORTED | Description: Product doesn't support mockup generation. ``` ### Examples ### Bulk Generate Mockups Generates mockup images by compositing provided images onto product photos ```curl curl -X POST \ 'https://www.wixapis.com/v2/bulk/mockups/generate' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "mockups": [ { "providerProductId": "73cfa507-221b-417a-bd62-c7b62065068e", "image": { "url": "https://static.wixstatic.com/media/2bb3219153c347daf475067d763be40d.png", "imageType": "SITE_LOGO" } }, { "providerProductId": "ced405ed-fc48-4ace-987c-3677656e2fa7", "image": { "url": "https://static.wixstatic.com/media/152e4032e12c41c2b20f49ffee41a67f.png", "imageType": "CUSTOM" } } ] }' ``` ---