Activate Views

Put

/api/3/ProductView/ActivateViews?websiteId={websiteId}&webApiClientKey={webApiClientKey}&sku={sku}&viewCodes={viewCodes}&userEmailId={userEmailId}


This API is used to  Activate Views based on the trigger event that the client specifies in their workflow.

If any deactivated view is to be made active this api will get triggered and the view status will change to active in the Arifi admin. 

This API requires the SKU to be passed in the ‘skus’ parameter , whose order status is to be changed and the ID of the associated website.

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.

skus

This is a unique field to identify any product. In this field, users can send either

Product base SKU/ProductCode or Variant SKU. This field should be matched with the product available in Admin.

If Artifi receives the base product code/SKU and the product has variants, then we are sending back the

default SKU details of that product.

viewCodes

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.

userEmailId

This parameter value contains the artifi admin login users email address, who is making the request.


Response Information

Response body formats

On Success

On success, this method will call back the JavaScript method in the website which is specified in the "successCallback" parameter with success Message.

{

  "Response": "Success",

  "Message": "View Code Front is activated successfully;",

  "Data": null,

  "ErrorCode": ""

}


On Error

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

{

  "Response": "Error",

  "Message": "Invalid website id. Invalid user email.",

  "Data": null,

  "ErrorCode": "221,234,273"

}

Did you find it helpful? Yes No

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