Get Preview Image

Get


/api/3/Preview/GetPreviewImage?websiteId={websiteId}&webApiClientKey={webApiClientKey}&designId={designId}&viewCode={viewCode}&isThumbnail={isThumbnail}


This API is used to show the preview image of the customized products on the webstore.

It returns the preview of the product one view at a time, which is based on the view code that is being passed in the key of the ‘viewcode’ parameter.

It returns the response object, which contains the status of the operation along with the message if any error occurs during this process.

Request Information

Parameters

Parameter Name

Description

WebsiteId (Int)

This param refers to the website associated with customized products.

The admin user of Artifi can create one or more websites and assign products to each of them. The ID of the website with which specified customized products are associated should be specified in this parameter.

WebApiClientKey (String)

When any company registers with Artifi, Artifi will generate a special and unique key for that company, which will be called the client key.

This client key can be found in the registered company's profile tab in the Artifi Account.

This client key will be used for client (company) authentication and will be referred to as WebApiClientKey.

designId (Int)

This is the ID of the designed product that gets added to cart.

Design ID is created when the user adds the customized product to the cart.

Viewcode (String)

This is the ID of the view that is associated with the product.

View Code is created when the user creates a view for a product in the Artifi admin.

If the viewcode is not defined then the default view is fetched by the API.

isThumbnail (Boolean)


Response Information

Response body formats


On Success

On success, this method will revert with an image of a specific view of the product with the respective customization of the view for which the API is being called.


On Error

On error, this method will call back the JavaScript method in the website which is specified in the "errorCallback" parameter with errorMessage.

Error can occur if any of the parameters is passed with the wrong key value of data type.

Error Response:

{

  "Response": "Error",

  "Message": "Invalid webapiclientkey.",

  "Data": null,

  "ErrorCode": "226"

}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.