Activate Variants

Put

/api/3/ProductVariant/ActivateVariants?websiteId={websiteId}&webApiClientKey={webApiClientKey}&skus={skus}&userEmailId={userEmailId}

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

If any deactivated variant is to be made active this api will get triggered and the variant 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.

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

skus (String)

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.

userEmailId (String)

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 "successCallback" parameter with success Message.

   {

  "Response": "Success",

  "Message": "Sku ts1 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 "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.