Introduction
The Activate Views API is used to activate one or more product views in the Artifi platform based on a specific workflow trigger defined by the client application.
A view in Artifi represents a product-side or customization perspective associated with a product (for example: Front View, Back View, Left Sleeve, etc.). If any product view has been previously deactivated, this API can be invoked to change the status of that view back to Active in the Artifi Admin.
The API requires the website information, product SKU, and the associated view code(s) to identify the exact product view that needs to be activated.
This operation is commonly used in automated workflows where product customization views need to be enabled dynamically based on business logic, order status, product configuration changes, or admin actions.
Use Cases
- Re-enabling Views After Product Update
When a product undergoes updates (such as new design elements or corrected artwork), previously disabled views (e.g., Back View or Sleeve View) can be reactivated to make them available again for customization.
- Workflow-Based View Activation
In automated workflows, specific triggers (such as product approval, publishing, or campaign launch) can activate required product views dynamically without manual intervention.
- Inventory or Configuration Changes
If a product variant becomes available again (e.g., restocked or reconfigured), associated views that were disabled due to unavailability can be reactivated.
- Seasonal or Campaign-Based Activation
Certain product views may only be relevant during specific campaigns or seasons (e.g., festive designs). These views can be activated when the campaign starts and managed programmatically.
- Error Recovery or Rollback Scenarios
If views were mistakenly deactivated due to an error in the system or workflow, this API can quickly restore them to an active state.
API Details
Endpoint
PUT /api/4/ProductView/ActivateViews
curl --location --request PUT 'https://api.artifi.net/api/4/ProductView/ActivateViews?sku=Artifi_2.16.8&viewCodes=736956&userEmailId=demo%40artifilabs.com' \
--header 'webApiClientKey: c961461a-b287-448c-b9ea-e1162bd80b8e' \
--header 'websiteId: 241'
Parameters
Header Validation
Header Name | Type | Required | Description |
websiteId | int | Yes | Unique identifier of the website. |
webApiClientKey | string | Yes | API client key used for authentication. |
Query Parameters
Name | Type | Required | Description |
skus | string | Yes | 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 the default SKU details of that product are returned. |
userEmailId | string | Yes | This parameter value contains the Artifi Admin login user's email address who is making the request. |
viewCodes | string | Yes | This is the ID of the view associated with the product. View Code is created when the user creates a view for a product in the Artifi Admin. If the view code is not defined, then the default view is fetched by the API. |
Success Responses
{
"Response": "Success",
"Message": "Sku 5454546565 is activated successfully;",
"Data": null,
"ErrorCode": ""
}
Error Code List (Click Here)
Q&A
Q1. What is the purpose of the Activate Views API?
The Activate Views API is used to activate one or more product views on the Artifi platform. It allows previously deactivated views to be set back to an active state based on workflow triggers or manual actions.
Q2. What is a “view” in Artifi?
A view represents a specific side or customization area of a product, such as Front View, Back View, or Sleeve View, where users can apply designs.
Q3. When should this Activate Views API be used?
This API should be used when product views need to be re-enabled dynamically due to workflow triggers such as product updates, campaign launches, inventory changes, or error recovery.
Q4. What are the required parameters for this Activate Views API?
The required parameters include:
- websiteId (Header): Identifies the website
- webApiClientKey (Header): Used for authentication
- skus (Query): Product or variant SKU
- userEmailId (Query): Email of the admin making the request
- viewCodes (Query): Codes of the views to be activated
Q5. Can this API activate multiple views at once?
Yes, multiple view codes can be passed in the request to activate multiple product views in a single API call.
Q6. What type of SKU can be passed in the request?
You can pass either the base product SKU/ProductCode or a variant SKU. If a base SKU is provided and the product has variants, the default SKU details are considered.
Q7. What does a successful response look like?
A successful response returns a status indicating success along with a message confirming that the specified SKU views have been activated.
Q10. What kind of authentication is required?
Authentication is handled using the webApiClientKey and websiteId passed in the request headers.
Q10. What are common failure scenarios?
Common failures may occur when:
- Invalid or missing SKU is provided
- Incorrect or non-existent viewCodes are passed
- Missing or invalid authentication headers
- The specified product or views do not exist in the system